Skip to content

fix(connectors): keep webhook fields, actions and recent calls readable in a narrow sidebar - #48348

Merged
nwparker merged 1 commit into
mainfrom
bugbash/issue-48288
Nov 24, 2026
Merged

nwparker merged 1 commit into
mainfrom
bugbash/issue-48288

Conversation

@nwparker

@nwparker nwparker commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When the right sidebar was dragged narrow, a bot's Webhooks page got squeezed so hard that values showed one letter per line and buttons ran off the edge, making the whole panel scroll sideways. Now, in a narrow sidebar, each label moves above its value, buttons wrap onto a new line, and recent-call times wrap in their own column. Nothing sticks out sideways at any sidebar width.

Files Added Deleted Net
Test 0 0 0 0
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​80 $\color{#cf222e}{\Huge{\mathbf{−}}}$​28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​52

What Changed

Before: at the sidebar's 220 px minimum, "The key in the URL or header" rendered one letter per line, "Add a signature…" and the hook's action row (Send a sample call, Rotate key…, Pause, Delete hook…) overflowed the card, and the panel scrolled horizontally. Overflow persisted up to about a 380 px sidebar (the default 350 px overflowed by 36 px).

After: the panel's content always fits its width.

Mechanism (CSS classes and fixtures only; no JS, effects, polling or I/O):

  • webhook-key-fields.tsx: WebhookField uses the existing @container/connectors-panel container (declared by BotConnectorsPanel). Under @max-xs/connectors-panel (panel content < 20rem, about a 336 px sidebar) the row wraps, the label takes the full width so it sits above the value, the value gets basis-24, and actions get ml-auto so they wrap below, right-aligned, when there is no room beside the value.
  • WebhookHookRow.tsx: the hook's action row gets flex-wrap.
  • WebhookRecentCalls.tsx: grid tracks max-content 6rem 1fr -> auto minmax(min-content,6rem) 1fr, and the timestamp can wrap (whitespace-normal). In a narrow pane the time column gives way, so a dated stamp like "Dec 28, 2025, 12:47 PM" wraps instead of pushing the list past the card or breaking labels mid-word. At 300 and 420 px every track reaches its limit, so the layout is unchanged.
  • Fixtures: new bots/webhooks/BotWebhooksCard:page{220,300,420} fixture. The shared fixture Panel takes an optional width and declares @container/connectors-panel like BotConnectorsPanel; BotSlackSection.fixture.tsx reuses it instead of its private copy. StubOptions gained webhooks to feed webhooks.list / webhooks.calls.

Outside the connectors panel (Settings > Bots, native-chat webhook setup cards) there is no matching container, so those layouts are unchanged.

Why

The field was a single non-wrapping flex row: a fixed w-24 shrink-0 label, a min-w-0 flex-1 value with overflow-wrap:anywhere, and shrink-0 actions. In a ~180 px card the value got almost no width and broke between letters, while actions and the action row could not shrink, so they overflowed. Stacking via a container query keeps the side-by-side layout wherever it already fit and only changes narrow panels. The existing @max-[284px] threshold would have left a 300 px sidebar broken; 20rem keeps side-by-side values at least ~74 px wide.

Linked Issue

Fixes #48288

Visual Proof

Headless component fixture shots (pnpm fixtures:shot, dark), main vs this branch.

Sidebar Before (main) After
220 px before 220 after 220
300 px before 300 after 300
420 px before 420 after 420

At 420 px the before and after differ only in the relative recent-call times and the fixture's last-year call (the "before" shot predates that fixture row).

Testing

  • Repro: an overflow probe on the fixture swept sidebar widths 220-460 px. Main at 220 px: panel scrollWidth 386 vs 220, worst overflow 166 px, Checks value 0 x 352 px (one letter per line); overflow persisted up to 380 px. Branch: scrollWidth == clientWidth at every width, no element past the panel edge.

  • 300 and 420 px webhook shots are byte-identical between the final code and the previous review round; all 10 Slack panel fixtures (panel350*, panel280*) and the 28 BotConnectorsPanel fixtures are byte-identical before and after.

  • vitest (--config config/vitest.config.ts) on src/renderer/src/components/bots and NativeChatWebhookSetupCard.test.tsx: 37 files, 191 tests pass.

  • oxlint, oxfmt --check, anti-slop, code-quality native plugins, ast-grep and the changed-code quality gate: clean on all 6 touched files. Renderer typecheck clean.

  • No unit test added: this is layout only and jsdom cannot evaluate container queries; the new fixture is the regression artifact.

  • Platforms: macOS (headless Chromium fixture renders). CSS-only, so no platform-specific paths.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns (no tests added; see above)

Performance

None measurable, because this only changes static CSS classes in the Webhooks connector page; layout re-runs only while the sidebar is resized with a hook open. A headless probe forcing layout over 400 sidebar-width toggles (220 <-> 420 px) measured the same cost old vs new: 5 rows median 0.1-0.2 ms, 100 rows 0.8-0.9 ms, 500 rows (adversarial; the UI shows 5 until Show all) median 4.6-5.6 ms, p95 6.6-8.6 ms. Crossing the 336 px container breakpoint adds a style recalc of ~0.05 ms, well below 16 ms.

Risk

Level: Low

  • Below about a 336 px sidebar the open hook is taller, since labels stack above values. That is the intended trade for readable values.
  • At the narrowest width the Recent calls detail text still has no room and truncates, as on main (follow-up).
  • A single label word wider than the space left at 220 px would overflow rather than break; the widest current label ("Refused ×6") is ~75 px.
  • Back out with a plain revert; no saved data, settings, IPC or remote protocol is touched.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Reported by @mmarabel

…le in a narrow sidebar

In a narrow connectors panel a webhook field's label now sits above its
value, and actions without room beside the value wrap below it. The
hook's action row wraps instead of overflowing the card, and the recent
calls time column gives way and wraps so labels keep whole words. Adds
a Webhooks page fixture at 220, 300 and 420 px and shares the sidebar
Panel fixture with the Slack section.

Fixes #48288
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The connector fixture host now accepts webhook data and an optional panel width. The Slack fixture uses the shared panel. Webhook fields, action buttons, and recent-call timestamps have layout changes for narrow panels. A Webhooks fixture covers panel widths of 220, 300, and 420 pixels.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 88316

This change adjusts how the Webhooks connector panel wraps in narrow sidebars and adds fixtures for three widths. It is a presentation-only change with a low chance of production impact and no evident blockers to merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the connectors fix and the three affected areas (webhook fields, actions, recent calls) for a narrow sidebar. The changeset matches this: container-query CSS in webhook-key-fields, fle…
Description check Passed The description follows the template closely. It covers ELI5, What Changed (before and after with mechanism), Why, Linked Issue (Fixes #48288), Visual Proof (before/after table), Testing, Performance,…
Linked Issues check Passed Issue #48288 requires that values wrap or move above labels in a narrow panel, that field and hook action buttons wrap, and that the card and panel do not overflow sideways. At head 88316b0, the chang…
Out of Scope Changes check Passed All changed files relate to the Webhooks narrow-panel layout or its verification:
- webhook-key-fields.tsx, WebhookHookRow.tsx, WebhookRecentCalls.tsx: the layout fixes named in issue #48288.
- BotWeb…
Full details: Title check

Explanation

The title names the connectors fix and the three affected areas (webhook fields, actions, recent calls) for a narrow sidebar. The changeset matches this: container-query CSS in webhook-key-fields, flex-wrap in WebhookHookRow, grid changes in WebhookRecentCalls, plus fixtures. It is specific and accurate, though long at 91 characters.

Full details: Description check

Explanation

The description follows the template closely. It covers ELI5, What Changed (before and after with mechanism), Why, Linked Issue (Fixes #48288), Visual Proof (before/after table), Testing, Performance, Risk with level and rollback, and Notes. The AI Disclosure section is left blank, and the template's checkbox for the skill upstream boundary is not ticked. The Checklist is not addressed. Those gaps are minor, since the AI Disclosure section is conditional on team membership.

Full details: Linked Issues check

Explanation

Issue #48288 requires that values wrap or move above labels in a narrow panel, that field and hook action buttons wrap, and that the card and panel do not overflow sideways. At head 88316b0, the changes implement each requirement with CSS classes only:

  • webhook-key-fields.tsx: WebhookField adds @max-xs/connectors-panel:flex-wrap. The label becomes w-full, so it sits above the value. The value gets basis-24. Actions get ml-auto, so they wrap below and right-aligned when no room remains beside the value. This uses the existing @container/connectors-panel declared by BotConnectorsPanel. The 20rem (@max-xs) threshold is the Tailwind v4 xs container breakpoint.
  • WebhookHookRow.tsx: the hook action row takes flex-wrap, so its buttons wrap (summary evidence; not re-read in this assessment).
  • WebhookRecentCalls.tsx: the grid changes to auto / minmax(min-content,6rem) / minmax(0,1fr), and the timestamp uses whitespace-normal. The time column can give way in narrow panes.
  • The new BotWebhooksCard fixture at 220, 300, and 420 px provides a regression artifact.
    The no-overflow result relies on the author's headless overflow sweep (220-460 px, scrollWidth equal to clientWidth) and on CSS reasoning. This assessment did not run the fixture. The code paths match the issue's suggested CSS-only fix. The remaining residual is that a single label word wider than the space left at 220 px can still overflow; the PR states this as a known risk, and the widest current label fits.
Full details: Out of Scope Changes check

Explanation

All changed files relate to the Webhooks narrow-panel layout or its verification:

  • webhook-key-fields.tsx, WebhookHookRow.tsx, WebhookRecentCalls.tsx: the layout fixes named in issue #48288.
  • BotWebhooksCard.fixture.tsx: a regression fixture for those widths.
  • bot-connectors-host-fixture.tsx: adds an optional width and container class to the shared Panel, and webhooks stub options. This supports the new fixture.
  • BotSlackSection.fixture.tsx: reuses the shared Panel instead of a private copy. This is a fixture refactor that keeps the existing Slack panel fixtures in use.
    The PR states that layouts outside the connectors panel are unchanged because they lack the matching container. No change was found that is unrelated to the issue.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 46f999ea-1870-40bd-8b49-1fa478dfe77d
Commits

Reviewing files that changed from the base of the PR and between 150d1c3 and 88316b0.

Files selected for processing: 6

  • src/renderer/src/components/bots/bot-connectors-host-fixture.tsx
  • src/renderer/src/components/bots/slack/BotSlackSection.fixture.tsx
  • src/renderer/src/components/bots/webhooks/BotWebhooksCard.fixture.tsx
  • src/renderer/src/components/bots/webhooks/WebhookHookRow.tsx
  • src/renderer/src/components/bots/webhooks/WebhookRecentCalls.tsx
  • src/renderer/src/components/bots/webhooks/webhook-key-fields.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@nwparker
nwparker merged commit 55049f5 into main Nov 24, 2026
54 checks passed
@nwparker
nwparker deleted the bugbash/issue-48288 branch November 24, 2026 15:03
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.

[Bug]: Webhooks connector page squeezes hook values to one letter per line and overflows sideways in a narrow right sidebar

1 participant