Skip to content

fix(desktop): an overflowing Author tree scrolls instead of crushing rows - #484

Merged
physercoe merged 1 commit into
physercoe:mainfrom
agentfleets:agent/agentfleet/fix-author-nav-overflow
Jul 30, 2026
Merged

fix(desktop): an overflowing Author tree scrolls instead of crushing rows#484
physercoe merged 1 commit into
physercoe:mainfrom
agentfleets:agent/agentfleet/fix-author-nav-overflow

Conversation

@agentfleets

Copy link
Copy Markdown
Collaborator

What

The Author surface's workspace tree crushes rows when its content overflows instead of scrolling: root-level file rows render 11px tall while rows nested inside directory wrapper divs keep their full 26px — visible as two row heights in the same list, the squashed ones illegible (12px text in an 11px row).

Reported by a user whose research/ folder (expanded by default, like all top-level dirs) holds enough entries to overflow the nav: the expanded dir's children looked fine, every root-level file below was squashed.

Root cause

.author-nav-sec.grow (desktop/src/styles/partials/09-canvas-tail.css) is flex: 1; min-height: 0 — a flex column that fits its parent — but has no overflow-y. When the tree exceeds the available height there is nothing to scroll, so the flex layout compresses its children: direct-child file rows (.author-nav-item file buttons) shrink below their content height, while directory rows survive inside their plain-<div> wrappers (the wrapper shrinks; the row inside doesn't). Latent since the styles split (120937ff) — it fires only once a workspace grows enough entries to overflow.

Fix

  • .author-nav-sec.grow gets overflow-y: auto — the section scrolls.
  • .author-nav-sec.grow > * gets flex-shrink: 0 — rows always keep their content height even if the overflow rule is ever defeated.

Two-selector, six-line CSS change; no new tokens (ratchet clean).

Regression coverage

New e2e desktop/electron/e2e/author-nav-overflow.spec.ts: seeds a 65-file workspace (60 root files + a dir of 5), then asserts every .author-nav-item row is within 2px of the tallest and the section actually scrolls.

Verified locally (macOS, real Electron):

  • with the fix — 29/29 rows uniform 26px, scrollHeight > clientHeight
  • without the fix (fix stashed, rebuilt) — the spec fails at maxH - minH ≤ 2 (11px vs 26px rows) ✅ — the test pins the bug, not just the shape

The user's exact state (their workspace copy + their 5 open drafts) was also reproduced end-to-end during diagnosis; the fix renders it uniformly.

Verification

  • lint-desktop-tokens.sh clean (after npm run sync:tokens — the generated primitives file is git-ignored)
  • e2e passes locally as described above; CI is the xvfb gate per repo convention

…rows

The Author nav's .author-nav-sec.grow had flex:1 + min-height:0 but no
overflow-y: when the tree exceeds the section height the flex column
compresses its direct children — root-level file rows rendered 11px tall
while rows nested in dir wrapper divs kept 26px (visible as two row
heights, the shorter ones at the bottom of the list).

Give the section overflow-y:auto so it scrolls, and flex-shrink:0 on its
children so rows always keep their content height. Regression e2e: seed a
65-file workspace, assert uniform row heights + the section scrolls
(fails without the fix: maxH-minH of 26px vs 11px rows).
@physercoe
physercoe merged commit be66029 into physercoe:main Jul 30, 2026
8 checks passed
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