Skip to content

Webhook management in the debug dashboard#3

Merged
Segfaultd merged 10 commits intomainfrom
webhook-dashboard-management
Apr 10, 2026
Merged

Webhook management in the debug dashboard#3
Segfaultd merged 10 commits intomainfrom
webhook-dashboard-management

Conversation

@Segfaultd
Copy link
Copy Markdown
Contributor

Summary

  • Refactored the dashboard monolith (server.ts) into modular files under src/dashboard/html/ — styles, helpers, and per-tab components
  • Added a dedicated Webhooks tab to the dashboard with full endpoint management: create, edit, delete, enable/disable toggle, secret reveal + copy
  • Built unified and per-endpoint delivery history views with one-click retry for failed deliveries
  • Added send test event action with selectable event type dropdown (13 common Stripe event types)
  • Added 7 new dashboard API endpoints: webhook CRUD, delivery listing, test event, retry
  • Added WebhookEndpointService.update() and extracted WebhookDeliveryService.deliverToEndpoint() for targeted delivery

Test plan

  • 5 unit tests for WebhookEndpointService.update() (url, events, status, preserve unchanged, 404)
  • 1 unit test for WebhookDeliveryService.deliverToEndpoint() (creates delivery record)
  • 7 integration tests for dashboard webhook API (CRUD lifecycle, delivery listing, test event, retry, error cases)
  • Full suite: 493 pass, 0 fail
  • tsc --noEmit clean

Segfaultd added 10 commits April 9, 2026 22:05
Extracted the monolithic DASHBOARD_HTML template literal from server.ts
into separate files: styles.ts, helpers.ts, tabs/activity.ts,
tabs/resources.ts, tabs/actions.ts, and shell.ts which assembles them.
No behavior changes — output HTML is identical.
Supports partial updates to url, enabled_events, and status. Uses
retrieve() to validate existence and get current state, then writes
patched data back to the DB.
…casting

The /actions/retry-webhook endpoint accepted an endpoint_id but ignored it,
calling deliver() which fans out to all matching endpoints. Now uses
deliverToEndpoint() to target only the specified endpoint. Also removes
redundant retrieve() calls and adds integration tests for the action.
@Segfaultd Segfaultd merged commit d8e5bce into main Apr 10, 2026
2 checks passed
@Segfaultd Segfaultd deleted the webhook-dashboard-management branch April 10, 2026 07:49
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.

1 participant