Skip to content

fix(ui): reserve scrollbar gutter on html (#954) - #956

Merged
vybe merged 1 commit into
devfrom
fix/954-agent-detail-panel-jerk
Jun 1, 2026
Merged

fix(ui): reserve scrollbar gutter on html (#954)#956
vybe merged 1 commit into
devfrom
fix/954-agent-detail-panel-jerk

Conversation

@dolho

@dolho dolho commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • One-line CSS fix: html { scrollbar-gutter: stable; } in src/frontend/src/style.css.
  • Stops the horizontal panel jerk on the Agent Detail page when switching between Chat / Session tabs and the rest (Info, Tasks, Dashboard, …).
  • Root cause is exactly as the issue diagnosed: Chat/Session use h-screen overflow-hidden on the root (no body scrollbar), other tabs use min-h-screen (scrollbar appears). Reserving the gutter at the document level keeps the centered max-w-[1400px] panel pinned.

Did not touch the Chat/Session padding — issue notes "the inner panels manage their own padding and double padding will compress the message area." The remaining padding gap is intentional UX (edge-to-edge message thread vs p-6 body content); the no-jerk criterion is satisfied without harmonizing it.

Related to #954

Test plan

  • Agent Detail: Info → Chat → Info → Session → Info — panel left edge does not move
  • Same sequence in dark mode
  • Same sequence at narrow (<1400px) and wide (>1400px) viewports
  • Spot-check other pages (Dashboard, Agents list, Settings) — no visible regression; right-edge gutter is reserved but content not visibly cramped

🤖 Generated with Claude Code

Adds `scrollbar-gutter: stable` to the document root so pages that
toggle between scrolling and non-scrolling layouts don't shift
horizontally. Specifically, Agent Detail's Chat / Session tabs use
`h-screen overflow-hidden` (no body scrollbar) while other tabs use
`min-h-screen` (scrollbar appears). The unreserved gutter caused the
centered `max-w-[1400px]` panel to jerk ~15px on each tab switch.

Related to #954

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dolho
dolho requested a review from vybe May 29, 2026 12:00

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM — minimal CSS fix, root cause matches the issue diagnosis, clean diff, no security exposure. Validated via /validate-pr.

@vybe
vybe merged commit 74ee275 into dev Jun 1, 2026
14 checks passed
vybe pushed a commit that referenced this pull request Jul 2, 2026
)

The Chat tab flips the page into a fullscreen flex-column layout; `mx-auto` on
<main> (auto inline margins) then overrides align-items:stretch on the flex
item, collapsing <main> to content width and centering it — so the whole tab
card shifted right and narrowed on every Chat<->other-tab switch (measured:
x 189->359, width 1272->930 at 1600px).

Fix: pin <main> to `w-full max-w-[1400px]` in both layout modes (harmless in
the non-fullscreen block mode; restores full width in fullscreen). Verified
across 1024/1440/1600/1920px — the card now has zero x/width delta between
Overview and Chat and snaps back identically. Complements #956
(scrollbar-gutter), which fixed the separate body-scrollbar shift.

Adds an @Interactive e2e guard measuring card-box parity across the switch.

Related to #954

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants