Repository navigation
Description
Summary
On the Agent Detail page, switching between the Chat tab and any other tab (Overview, Info, Tasks, Logs, Schedules, …) causes a visible horizontal jump — the content area changes width when you land on Chat and snaps back when you leave it. The max-w-[1400px] constraint is identical across tabs, but the Chat tab renders its content in a different layout mode and at a different inner width, so the content shifts left/right on every switch.
History / scope change: Originally filed covering both the Chat and Session tabs. Since #1112 merged Session into Chat (Session is now a mode toggle inside the single Chat tab, not its own tab), this bug is scoped to the Chat tab only. A first fix (#956,
scrollbar-gutter: stable) shipped and removed the ~15px body-scrollbar shift, but the jump still happens, so the issue was closed prematurely. Reopened, refocused on the Chat tab, raised to P1.
Context
src/frontend/src/views/AgentDetail.vue:358 flags the Chat tab as "fullscreen":
const isFullscreenTab = computed(() => activeTab.value === 'chat')When isFullscreenTab is true the page wrapper switches layout modes:
- Root (
:2):min-h-screen→h-screen overflow-hidden flex flex-col <main>(:5):overflow-visible→flex-1 flex flex-col overflow-hidden- Inner padded wrapper (
:6):overflow-visible→flex-1 flex flex-col overflow-hidden - Agent block (
:25): addsflex-1 flex flex-col min-h-0 - Panel card (
:73): addsflex-1 flex flex-col overflow-hidden
Two contributors:
-
Body scrollbar gutter — ADDRESSED (fix(ui): reserve scrollbar gutter on html (#954) #956). Non-Chat tabs are
min-h-screenand can scroll (scrollbar reserved); Chat ish-screen overflow-hidden(no scrollbar).scrollbar-gutter: stable(src/frontend/src/style.css:9) now reserves the gutter in both modes, so this ~15px shift is gone. Re-verify it's still in effect and sufficient — if the jump persists this may have regressed or be insufficient on some browsers. -
Inner-content padding mismatch — NOT ADDRESSED (likely the residual cause). Every other tab wraps its content in
class="p-6"(Overview:78, Info:83, Tasks:88, …), inset 24px on each side inside the panel card. The Chat tab wraps inclass="flex-1 overflow-hidden flex flex-col"(:94) with no horizontal padding — content runs flush to the card edge. That's a 48px inner-width difference, so the message thread / composer aligns differently from the body content of Info/Overview, reading as a horizontal jump on every switch.
Acceptance Criteria
- Switching between the Chat tab and any other tab (Chat ↔ Overview, Chat ↔ Info, Chat ↔ Tasks, …) does not visibly shift the content area left/right or change its width
- Confirm the
scrollbar-gutter: stablefix (fix(ui): reserve scrollbar gutter on html (#954) #956) is still in effect and sufficient; repair it if not - Chat-tab inner content aligns horizontally with the body content of the other tabs (Info / Overview), OR any intentional difference is animated smoothly rather than snapping
- Works in both light and dark themes
- Works at common breakpoints (
sm,lg, and wider thanmax-w-[1400px])
Technical Notes
- Layout-mode decision:
src/frontend/src/views/AgentDetail.vue:358(isFullscreenTab— Chat-only post-feat(ui): unify Chat + Session into one Chat tab with a session-mode toggle (default on) #1112) - Mode-switching class bindings:
AgentDetail.vue:2, 5, 6, 25, 73 - Padding mismatch:
:78/:83/:88(p-6) vs:94(Chat, no horizontal padding) - Don't just add
p-6to the Chat wrapper —ChatPanel/SessionPanelmanage their own padding and double-padding compresses the message area. Harmonize the inset another way (match horizontal padding only, or normalize the card content box across both layout modes). - Prior fix: fix(ui): reserve scrollbar gutter on html (#954) #956 (
scrollbar-gutter: stableinstyle.css).
Activity
fix(ui): reserve scrollbar gutter on html (#954) (#956)
vybe commentedon Jun 1, 2026
Fixed by #956 (merged to dev as 74ee275).
html { scrollbar-gutter: stable; }reserves the gutter at the document level, eliminating the horizontal panel jerk when switching to/from Chat/Session tabs.vybe commentedon Jun 1, 2026
Reopening — merged to
dev(74ee275) but not yet released tomain. Moving to in-dev until the release cut.feat(ui): add Guardrails tab to Agent Detail (#967) (#992)
[-]Agent Detail panel width jerks when switching to/from Chat or Session tab[/-][+]Agent Detail: Chat tab content width jumps when switching to/from any other tab[/+]fix(ui): stop Agent Detail card jumping on Chat tab switch (#954) (#1405
test(e2e): pre-dismiss onboarding wizard in auth setup so /-specs don…
fix(ui): Tasks tab flex-fills the viewport like Chat — max-h-96 cap b…
docs(design-system): principle 29 — a toggle should not shove the res…