Skip to content

improvement: group webhook events into cards with an example body, and let an extension add events to any group - #1032

Merged
croffasia merged 1 commit into
mainfrom
feat/webhook-dialog
Nov 28, 2026
Merged

croffasia merged 1 commit into
mainfrom
feat/webhook-dialog

Conversation

@croffasia

Copy link
Copy Markdown
Owner

What

The webhook dialog lists its events as cards, one per group (Issues, Comments, Agent runs), each with a box that takes the whole group, human labels and a { } button that opens an example of the body the event sends. An extension of the api can add events to a core group or to a group of its own.

Why

The dialog showed every event as a raw name in one flat list, with nothing about what a receiver gets. An extension's events had no place of their own in it.

  • API. WebhookEventDefinition gains group and example (the envelope's data). GET /projects/:projectKey/webhooks/event-types (and the MCP tool list_webhook_event_types) returns { event, group, example }, the example being the whole body, built by webhookBody() in modules/webhooks/events.ts, which the deliveries use too. The core definitions and their examples live in that file.
  • Web. SettingsWebhookEvents lays out the cards in two balanced columns (one list in the api's order on a narrow screen). An event the instance no longer offers stays in its card while the webhook has it. The edit dialog shows the signing secret with show, copy and regenerate, and the Active switch in the footer. Group and event names come from settings.webhooks.eventGroups and eventTypes; one without a name is named from its key.
  • Texts. The webhook strings were reworded: one name for the URL, "Inactive", how to check a signature, the body's status values. All 14 languages.

How to test

  1. Project settings › Webhooks › New webhook: the events show as three cards. A group box selects or clears its group, and shows a mixed state when some events are on.
  2. Hover an event and open { }: the event name, when it is sent, the example body and how the request is signed.
  3. Edit a webhook: URL and signing secret side by side, Regenerate opens the confirmation, the Active switch saves.
  4. cd apps/api && bun test --env-file=../../.env.test src/modules/webhooks src/modules/agents/core/__tests__/integration/run-finished.test.ts: each example is compared key by key, nested objects included, with a body the webhook was really sent.

Checklist

  • bun run typecheck passes
  • bun run lint and bun run format:check pass
  • Developed with an AI agent: tidy, code-review and security-audit from .agents/skills/ ran on the new code
  • Tests added or updated for the changed behaviour
  • Database schema changed: migration generated with bun run db:generate and committed
  • New environment variables documented in .env.example
  • Docs updated (README.md or docs/). AGENTS.md changed only as docs/dev/agents-md.md allows

bun run lint passes; format:check was not run by hand, Prettier ran on the changed files in the pre-commit hook.

Screenshots

Not captured. The approved mockup is the reference.

@croffasia
croffasia merged commit 74dcec2 into main Nov 28, 2026
7 checks passed
@croffasia
croffasia deleted the feat/webhook-dialog branch November 28, 2026 20:10
@github-actions github-actions Bot mentioned this pull request Nov 28, 2026
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