Skip to content

fix(dashboard): correct webhook example payload to match v2 schema#324

Merged
beran-t merged 1 commit into
mainfrom
webhook-event-docs
May 14, 2026
Merged

fix(dashboard): correct webhook example payload to match v2 schema#324
beran-t merged 1 commit into
mainfrom
webhook-event-docs

Conversation

@beran-t

@beran-t beran-t commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Updated the webhook example payload shown in the webhook add/edit dialog to match the actual payload emitted by the backend.
  • Bumped the version to v2, switched all field names to snake_case, removed the non-existent eventData field, and added the new event_category and event_label fields.

Test plan

  • Open the dashboard webhook settings, start adding a webhook, and verify the example payload matches a real delivery.

@beran-t beran-t requested a review from ben-fornefeld as a code owner May 14, 2026 12:11
@cla-bot cla-bot Bot added the cla-signed label May 14, 2026
@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment May 14, 2026 0:13am
web-juliett Ready Ready Preview, Comment May 14, 2026 0:13am

Request Review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, trivial fix to a static example payload string.

Extended reasoning...

Overview

This PR updates a single static string constant (WEBHOOK_EXAMPLE_PAYLOAD) in src/features/dashboard/settings/webhooks/constants.ts to match the actual v2 webhook payload schema emitted by the backend. It bumps the version field from v1 to v2, switches all field names to snake_case, removes the unused eventData field, and adds event_category and event_label. Also drops a trailing whitespace from a comment.

Security risks

None. This is purely a display-only example string shown in the webhook add/edit dialog. There is no execution path, no user input, no auth or crypto involved.

Level of scrutiny

Minimal. This is a documentation-style change to a hardcoded example. Worst case is that the example is slightly inaccurate, which is exactly what this PR is fixing.

Other factors

The diff is contained to one file, ~12 line change, and the intent is clearly stated in the PR description. No bugs were found by the bug hunter.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8c54d5e98

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +17 to +18
"event_label": "create",
"sandbox_id": "<SANDBOX_ID>",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve event_data in the v2 example

For v2 deliveries that include sandbox metadata or execution details, the webhook schema exposes that data under snake_case event_data; this update removes the old eventData field but never adds its v2 replacement. Users copying this example for payload validation or handler typings will reject or ignore real deliveries that contain event data, especially paused/killed events and sandboxes with metadata.

Useful? React with 👍 / 👎.

@beran-t beran-t merged commit ab740ed into main May 14, 2026
15 checks passed
@beran-t beran-t deleted the webhook-event-docs branch May 14, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants