The create dialog is mounted for the whole session, so its
defaultValues, and the uuid inside them, were evaluated exactly once.
A bare form.reset() then restored that same object, so every webhook
created without reloading the page shared one signing secret.
The secret is what proves a delivery genuinely came from us, so sharing
it across endpoints means compromising any one of them compromises the
rest.
Build the defaults fresh on each use, and reset with a new secret both
when the dialog opens and after a successful create.
The e2e guard was confirmed to fail against the previous code, with
both creates submitting an identical secret.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- webhooks/layout.tsx: section header + route tabs (Webhooks | Deliveries),
fixing the page that was previously titled "Webhook Notification Delivery
History" inside a component named MessagingPage
- /dashboard/webhooks now shows subscription management (WebhooksSection,
moved off the dashboard home); /dashboard/webhooks/deliveries shows the
delivery history
- webhooks-section slims down: the layout owns the title and the Deliveries
view, so its header is now just count + Create button; drops the unused
router/icon imports
- webhooks e2e rewritten for the two subroutes including a deliveries
deep-link refresh-survival test
Build, 25 unit tests, and 13 e2e green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Split app/(app)/dashboard/(components)/webhooks-history.tsx into a
webhooks-history/ folder (import path unchanged via index.tsx):
- use-filters.ts: filter state hook (device, webhook, event, status, preset
and custom date ranges) with page reset handled in one place
- filters.tsx: the five filter selects + custom-range popover, deduplicated
via a FilterField wrapper and option tables
- index.tsx: slim container on new useWebhooks / useWebhookNotifications
hooks in lib/api
- promote the numbered pagination (previously duplicated verbatim between
message-history and webhooks-history) to
components/shared/numbered-pagination.tsx
- drop dead code: empty useEffect, never-set isLoading state, ~10 unused
imports; replace the off-palette sky gradient with card tokens
- add a webhooks history e2e guard
Build, 25 unit tests, and 6 e2e green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>