Skip to content

bug: page body scrolls horizontally on Settings and Agent Detail below 1024px #2197

Closed

Description

@vybe

Summary

Two pages break the design-system rule that the page body must never scroll horizontally (wide content scrolls inside its own container). Both tab strips overflow the viewport at tablet and phone widths. Separately, at 640px the Dashboard grid toolbar overlaps the stats cluster.

Context

Found during an exploratory E2E sweep of dev @ c1cc22bc, measured with document.documentElement.scrollWidth - clientWidth.

Horizontal body overflow

Viewport Page Overflow Worst offender
375×812 /settings +563px BUTTON :: "Activation" (tab strip)
375×812 /agents/{name} +517px BUTTON.ml-auto :: "More"
768×1024 /settings +178px tab strip
768×1024 /agents/{name} +132px NAV.-mb-px.flex :: "Overview Tasks Chat Repor…"
≥1024px all pages 0 —

Dashboard (all three modes), Library, Operations and Workspace are clean at every size — so this is specific to these two tab strips.

Note that Agent Detail already uses OverflowTabs (#1114), which is meant to collapse overflow into a "More ▾" menu. At 375px the overflowing element is the "More" button, so the collapse is not preventing body overflow at narrow widths.

Toolbar/stats overlap at 640px (grid mode)

Reproduced independently via getBoundingClientRect():

viewport 640 · grid mode
stat "agents"  x  94.5 → 132.9   (y 79)
button "Tags"  x 103.4 → 178.6   (y 77)
→ ~30px horizontal overlap in the same vertical band

Create Agent also ends at x=95.4 against a stat starting at x=94.5 — touching.

This is exactly what e2e/dashboard-stats-overflow.spec.js (#1830) exists to catch; the spec measured 9px at its own layout and currently fails on dev.

Acceptance Criteria

  • document.documentElement.scrollWidth === clientWidth on /settings and /agents/{name} at 375px and 768px
  • Tab strips scroll inside their own overflow-x: auto container, or collapse, rather than widening the body
  • OverflowTabs collapses correctly at 375px — the "More" trigger itself must fit
  • Grid toolbar controls and the stats cluster never overlap at any viewport; e2e/dashboard-stats-overflow.spec.js passes
  • Verified in both light and dark themes

Technical Notes

Activity

  1. added
    priority-p2
    type-bug
    theme-ui-ux
    complexity-medium
    status-ready
    on Aug 15, 2026
  2. dolho commented on Sep 14, 2026

    @dolho
    Contributor

    /claim

  3. added
    status-in-progress
    on Sep 14, 2026
  4. github-actions commented on Sep 14, 2026

    @github-actions

    Claimed by @dolho. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/2197-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #2197
  5. removed
    status-ready
    on Sep 14, 2026
  6. dolho commented on Sep 14, 2026

    @dolho
    Contributor

    Handled as a stacked draft: #2782 (on #2781 / #1925 → #2780 / #1924 → #2778 / #1923).

    The report names the wrong element, and it is worth recording why. OverflowTabs was collapsing correctly the whole time, 375px included — I asserted the More trigger fits its container. What the sweep found was the primitive's hidden mirror row: a width: max-content measuring row inside a 0×0; overflow: hidden box, invisible to the user and to scrollWidth alike, but reported as by far the widest element by any probe that does not skip clipped subtrees. My first probe reproduced the identical artifact before I filtered for clipping, so this is a trap in the measurement, not a mistake in the report.

    Measured properly, the causes are rigid non-wrapping flex rows:

    Page @375 Cause
    Agent Detail +496px three AgentHeader rows (identity + Workspace/Talk/Running, toggles + Tags + live CPU/MEM/uptime, lifetime cost) — ~790px of min-content combined
    Settings +157px the Default Model <select>: flex-1 with default min-width: auto, whose min-content is its widest option (~417px). min-w-0 is the whole fix.

    The Dashboard overlap is the same shape one level up. #1830 made the stats cluster elastic so it degrades rather than clips — but elastic with no floor collapses to zero, so the pressure never reached the controls and the row never wrapped. At 640px: stats cluster 0px wide (its clipped children still under the controls' first button — the 8px the spec reports) while the controls sat pinned at 692px max-content, ~70px past the row's right edge. Fixed by wrapping the row, giving the stats cluster the ladder's own agents-only floor (~71px) so the overflow becomes a wrap, and letting the controls shrink and wrap their own buttons. Single 30px row above ~900px is unchanged; at 640 the stats cluster now gets full width and shows more than before.

    All five ACs verified against a local dev instance:

    • scrollWidth <= clientWidth on Settings, Agent Detail, Dashboard, Operations and Library at 375/640/768/1024, in both themes.
    • Strips collapse rather than widening the body; the More trigger fits at 375.
    • e2e/dashboard-stats-overflow.spec.js — red on dev, green here.
    • New e2e/body-horizontal-overflow.spec.js as the durable gate. It measures the document scroll width and names the widest unclipped element on failure, precisely because an element-shaped assertion is what produced the wrong diagnosis.

    Two things worth review attention:

    1. Running the negative control caught a vacuous arm of my own new spec: the widest markup on both pages renders late (Settings' admin-only select behind /api/users/me, Agent Detail's stats behind the poll), so on a fixed settle the Settings arm passed with its own fix reverted. The ready predicates are load-bearing, not politeness.
    2. smoke.spec.js › @smoke api keys page loads fails on plain dev as well (verified by building origin/dev against the same backend) — pre-existing, out of scope, probably worth its own issue.
  7. added
    status-in-dev
    and removed
    status-in-progress
    on Sep 22, 2026
  8. removed
    status-in-dev
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-ui-uxtype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions