Skip to content

fix(web): apply all event types when updating a webhook - #9620

Open
Khizarshah01 wants to merge 1 commit into
makeplane:previewfrom
Khizarshah01:fix/webhook-update-all-events
Open

fix(web): apply all event types when updating a webhook#9620
Khizarshah01 wants to merge 1 commit into
makeplane:previewfrom
Khizarshah01:fix/webhook-update-all-events

Conversation

@Khizarshah01

@Khizarshah01 Khizarshah01 commented Aug 15, 2026

Copy link
Copy Markdown

Description

When editing an existing webhook in Settings, selecting the "Send me everything" (All events) radio button and saving the form did not actually update the backend. Instead, it ignored the radio button selection and sent the previous individual boolean values from the checkboxes.

This happened because handleUpdateWebhook inside page.tsx did not accept the webhookEventType parameter that the WebhookForm component was passing to it on submit.

This PR fixes the issue by updating handleUpdateWebhook to match the exact logic already used during Webhook creation: it now correctly accepts webhookEventType and overrides the payload to set all individual event flags to true when "Send me everything" is selected.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Before

Screen.Recording.2026-08-15.at.12.35.33.PM.mov

After

Screen.Recording.2026-08-15.at.12.38.13.PM.mov

Test Scenarios

  1. Open a Settings -> Webhooks.
  2. Edit an existing webhook (or create a new one).
  3. Under Events, choose "Select individual events" and check only one or two events.
  4. Click Update, then refresh the page to confirm it saved correctly.
  5. Now, edit the webhook again and switch the radio button to "Send me everything".
  6. Click Update.

References

Summary by CodeRabbit

  • Bug Fixes
    • Improved webhook event configuration when updating webhooks.
    • Selecting all events now enables every available event type.
    • Unselected event options are reliably saved as disabled.

Copilot AI lite review requested due to automatic review settings August 15, 2026 07:26
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ca5d8c7-2056-495b-81fb-3149f54103e0

📥 Commits

Reviewing files that changed from the base of the PR and between 1c8a60f and 1e9f016.

📒 Files selected for processing (1)
  • apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/webhooks/[webhookId]/page.tsx

📝 Walkthrough

Walkthrough

The webhook update handler now accepts an event type. It enables all supported events for "all" and defaults missing event flags to false for specific event types.

Changes

Webhook event handling

Layer / File(s) Summary
Webhook event flag update
apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/webhooks/[webhookId]/page.tsx
The handler imports TWebhookEventTypes, accepts the event type, enables all event flags for "all", and defaults missing flags to false for other types. URL and active-state handling remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1e9f0

This localized fix makes the webhook update form apply the selected event mode correctly; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: sriramveeraghanta

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the webhook update fix for applying all event types.
Description check ✅ Passed The description explains the bug, implementation, change type, screenshots, and test steps; the final all-events verification could be more explicit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes webhook editing so that selecting “Send me everything” (All events) correctly updates the webhook’s event flags on the backend, matching the behavior already used during webhook creation.

Changes:

  • Update handleUpdateWebhook to accept webhookEventType from WebhookForm submission.
  • Build the update payload so that selecting "all" forces all per-event flags to true; otherwise, use the individual checkbox values (defaulting undefined to false).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants