Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks, this covers #911 well. The backfill keeps every existing webhook on the events it gets today, and adding action_task.sent is right, since it goes through dispatchBrandWebhook too.
To change:
- Migration number. Open PRs already use 00188–00197, so please rename the file to
00198_webhook_event_subscriptions.sql, fix its header, and rebuildsupabase/schema.sqlwithbash supabase/build-schema.sh. If the number moves again before merge, I'll tell you. - Send to webhook with the event unticked.
hasActiveWebhook(web/src/lib/actions/action-task-send.ts) ignoresevents, so the drawer still offers the button. Clicking it then returns 409no_webhook: "This brand has no active webhook…". Content has the same problem (content.js:856,:1039: "No workflow connected"). Check the event inhasActiveWebhook, and return a distinct "not subscribed" message on both paths.
Smaller:
- Constrain
eventsto the three names: acheck (events <@ array[...]), or a whitelist insaveWebhookConfig. - Saving with no event ticked leaves a webhook that looks connected but gets only test events. Require one, or say so.
- In
docs/guides/daily-pulse.mdx:105, add "if subscribed".webhooks.mdxneeds a blank line before### webhook.test. - Use
components/ui/checkbox.tsxinstead of the raw checkbox.
|
I addressed the review points on this PR and corrected the branch's upstream conflict.
Validation: server lint, format, and all 1,821 server tests passed locally; web formatting and ESLint on the changed TypeScript files passed; the focused Action Center test passed (3/3). The latest CI run has server and schema jobs green; web checks are running. The |
00198 went to the webhook event subscriptions (ansvisor#1239), so this migration moves to 00199. schema.sql is rebuilt with build-schema.sh. Claude-Session: https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A
… to 00200 main now has 00198 (ansvisor#1239) and 00199 (ansvisor#1131), so the soft-404 migration moves from 00198 to 00200, with the comments that name it, and schema.sql is rebuilt from the migrations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
eventsarray and requireopportunity.sentfor single and bulk content sends.webhook.testindependent of saved subscriptions.supabase/schema.sql.Related issue
Closes #911
Type of change
Validation
The web checks still need confirmation from CI. The migration was added and
supabase/schema.sqlwas regenerated as required by CONTRIBUTING.md.