Skip to content

Client Settings: make the Webhook receiver a collapsible section (#3103) - #3104

Merged
cliffhall merged 4 commits into
v2/mainfrom
v2/feat/3103-collapsible-webhook-receiver
Nov 30, 2026
Merged

cliffhall merged 4 commits into
v2/mainfrom
v2/feat/3103-collapsible-webhook-receiver

Conversation

@cliffhall

@cliffhall cliffhall commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Closes #3103

What changed

Webhook receiver (Events) is now a fourth collapsible section in Client Settings, after Enterprise-Managed Authorization, OAuth Client ID Metadata Document and OAuth Redirect. Before, it was an always-open bordered panel below them.

  • ClientSettingsForm:
  • WebhookReceiverSettings renders only the section's body. Its bordered Paper and its own title are gone, since the accordion control is the heading now. Its behavior (apply, reset, refusal shown under the field) is unchanged.
  • ClientSettingsModal:
    • Passes webhookReceiver into the form.
    • The header's expand/collapse-all toggle counts the webhook section when it's present. "All expanded" now means every offered section is open, rather than a length comparison.
    • The section starts collapsed, like CIMD and Redirect.
  • clients/web/README.md: as requested on the side, public-address.ts, ensure-web-build.ts and vite-base-config.ts each get their own bullet in the server/ list instead of sharing one with the sandbox and app-origin controllers. This is a separate commit.
  • Tunnel setup docs, also requested on the side (335fe064):
    • clients/web/README.md gains Setting up a tunnel to the receiver in the Events tab section.
    • Which port: the receiver is a route on the UI listener, so the tunnel points at CLIENT_PORT, not a separate port and not the sandbox.
    • ngrok and cloudflared examples, the steps from starting the tunnel to subscribing with Use the Inspector's receiver, and re-pointing after a quick tunnel's URL changes.
    • What the tunnel exposes, checked against server.ts and vite-hono-plugin.ts:
      • under --web, a request with the tunnel's Host reaches only POST /webhooks/events and /healthz; the Host allow-list refuses the page, assets and /api/*
      • under --dev, the backend middleware runs ahead of Vite's allowedHosts check, so /api/* is reachable through the tunnel (token-protected); hence "use --web behind a tunnel"
    • docs/test-servers.md no longer implies path-level forwarding (forward <tunnel>/webhooks/events to …). It gives the port-level commands and links to the README.

Tests

ClientSettingsModal.test.tsx adds one test (#3103) covering:

  • the webhook section starts collapsed and opens and closes from its control
  • the Public address field shows when it is open
  • Expand all and Collapse all include it
  • opening only the three form sections still offers "Expand all" while the webhook section is closed

The existing #3064 test (section shown only when a receiver is given) and the WebhookReceiverSettings tests pass unchanged. npm run local:gate passes on 5db59b75 and again on 335fe064.

Screenshots (1280×900, Chromium)

Taken with an isolated HOME, so the footer shows the plaintext-file secret backend rather than the keychain.

All four sections collapsed:

client-settings-webhook-collapsed

Webhook receiver expanded:

client-settings-webhook-expanded

🤖 Generated with Claude Code

cliffhall and others added 2 commits November 30, 2026 15:27
The Events webhook receiver now renders as a fourth accordion item in
ClientSettingsForm, styled like Enterprise-Managed Authorization, CIMD
and OAuth Redirect, instead of an always-open bordered panel below them.
The modal's expand/collapse-all toggle counts it when it is present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
…g their own bullets

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
@cliffhall cliffhall added the v2 Issues and PRs for v2 label Nov 30, 2026
@cliffhall
cliffhall requested a balanced review from Copilot November 30, 2026 20:33
… exposes (#3103)

The web README now says which port to tunnel (the UI listener, not a
separate one), gives ngrok and cloudflared examples, walks through
setting the public address and subscribing, and states what a tunnel to
the port exposes under --web versus --dev. docs/test-servers.md no
longer implies path-level forwarding and points at the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified for the Webhook receiver accordion change.

No open issues 🎉

What changed in this PR

Makes the Webhook receiver a fourth collapsible section in Client Settings, addressing #3103 while preserving its visibility only when the backend offers a receiver.

Changes:

  • Moves receiver settings into the shared accordion and includes them in Expand all / Collapse all.
  • Adds coverage for the initially collapsed state, individual toggling, and toggle-all behavior.
  • Separates backend helper descriptions into individual README bullets.
File Description
clients/​web/​src/​components/​groups/​WebhookReceiverSettings/​WebhookReceiverSettings.tsx Removes the standalone panel and heading, retaining the settings body.
clients/​web/​src/​components/​groups/​ClientSettingsModal/​ClientSettingsModal.tsx Passes receiver settings into the form and updates toggle-all logic.
clients/​web/​src/​components/​groups/​ClientSettingsModal/​ClientSettingsModal.test.tsx Tests receiver expansion, collapse, and toggle-all inclusion.
clients/​web/​src/​components/​groups/​ClientSettingsForm/​ClientSettingsForm.tsx Adds the optional webhook accordion section.
clients/​web/​README.md Gives three backend helpers separate documentation bullets.

Review effort: Balanced

@cliffhall
cliffhall requested a balanced review from Copilot November 30, 2026 20:40

Copilot AI 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.

🟡 Changes recommended

The README omits ALLOWED_ORIGINS from its tunnel-exposure warning and fails to explain that changing receiver URLs requires resubscribing because Resume preserves the original callback.

2 open issues

Review effort: Balanced

Comment thread clients/web/README.md Resolved
Comment thread clients/web/README.md Resolved
…WED_ORIGINS also admits a host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
@cliffhall
cliffhall requested a balanced review from Copilot November 30, 2026 20:50
@cliffhall

Copy link
Copy Markdown
Member Author

Copilot round 2: both findings fixed in 177c179 (docs only; gate re-run green). Resubscribing after re-pointing the receiver is now documented, and the tunnel-isolation claim is qualified to the default settings, with a warning against admitting the tunnel host via MCP_INSPECTOR_ALLOWED_HOSTS or ALLOWED_ORIGINS. Replies are in each thread.

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the integration of Webhook receiver settings into the shared accordion.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@cliffhall
cliffhall merged commit 36434e2 into v2/main Nov 30, 2026
12 checks passed
@cliffhall
cliffhall deleted the v2/feat/3103-collapsible-webhook-receiver branch November 30, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs for v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client Settings: make the Webhook receiver section collapsible like the other sections

2 participants