Skip to content

fix(sidebar): let folder bodies shrink to the lane after overflow: clip - #14579

Closed
chenmingwei23 wants to merge 1 commit into
mainfrom
fix/folder-body-min-width
Closed

chenmingwei23 wants to merge 1 commit into
mainfrom
fix/folder-body-min-width

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Every folder row in the Sessions sidebar shows its count, menu and add button again, and the sidebar can be narrowed.

Since #14099 landed on main, one long session title makes the whole sidebar wider than its pane: every folder row's session count, kebab menu and add button sit past the lane's right edge, session cards are cut off, and dragging the sidebar narrower does nothing.

Why it matters

The folder row cluster is the only way to rename, sort, hide or add to a folder from the sidebar, and the lane is unreadable when its rows are wider than the pane. Any workspace with a single long session title loses the whole cluster; a dashboard used for crew work has many.

Not a goal

What changed (motivation → approach → change)

Symptom: after #14099 the sidebar overflows horizontally and the folder row's trailing cluster is off-screen.

Root cause: #14099 switched the inner box of FolderBody from overflow: hidden to overflow: clip so a pinned folder header sticks to the sidebar lane instead of to that box. A clip box is not a scroll container, so its automatic minimum width is no longer 0 but the widest unbreakable line inside it. A session title is white-space: nowrap and only ellipsizes when its row can shrink, so one long title widens the folder body, the folder block above it and the sidebar itself, and every row's trailing cluster lands off-screen. The same commit already added min-height: 0 to that box for the same reason on the vertical axis (a clip box would also stop collapsing to the 0fr track).

Change: website/src/components/FolderBody.tsx adds min-width: 0 beside min-height: 0, so the box clamps to its grid column again and rows ellipsize as before.

Standalone reproduction, a 300px sidebar holding one long title, measured in Chromium:

FolderBody inner box inner width trailing button visible
overflow: hidden (before #14099) 300 yes
overflow: clip (main) 821 no
overflow: clip + min-width: 0 (this PR) 300 yes

Backwards compatibility

Compatible: one added CSS declaration on an internal layout box; nothing main accepts is rejected, renamed or removed.

Tests

  • website/src/test/ChatSidebar.collapsedFolderGhostHeight.test.tsx pins min-width: 0 on the inner box next to the existing overflow: clip and min-height: 0 pins. Mutation checked: removing the declaration makes that assertion fail.
  • vitest run on ChatSidebar.collapsedFolderGhostHeight, ChatSidebar.stickyHeaderCollision, ChatSidebar.emptyFolderNoBody, ChatSidebar.folderAlignment: 4 files, 26 tests passed.

Manual verification

Chromium measurement of the reproduction table above, plus the screenshots below from a pod running this branch.

Screenshots / video

Both shots are the Sessions lane of an isolated gateway built from this branch's tree (default theme, 260px lane), seeded with nested folders and one long session title.

Before (main, overflow: clip alone): the oss and command bar folder rows have lost their count and trailing buttons, and every title runs past the lane's edge without an ellipsis.

Sessions sidebar before the fix: folder rows without count, titles overflowing

After (this PR): each folder row shows its count at the lane's edge, titles ellipsize.

Sessions sidebar after the fix: folder counts visible, titles ellipsized

Measured in the same run: the oss and command bar rows' right edge sat 727px past the lane before, and 9px inside it after (matching every other row).

Related Issues

Regression from #14099.

Pattern harvest

Rule candidate: review-prompt
Pattern: switching overflow: hidden to overflow: clip (or removing a scroll container) on a flex or grid child changes its automatic minimum size on BOTH axes; check min-width/min-height together.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

…: clip change

FolderBody's inner box clips with overflow: clip so pinned folder headers
stick to the sidebar lane. A clip box is not a scroll container, so its
automatic minimum width is the widest unbreakable line inside it: one long
session title widens the folder body, its block and the sidebar, pushing
every folder row's count, menu and add button past the lane's right edge
and stopping the sidebar from being narrowed. min-width: 0 clamps the box
to its grid column again, the same way min-height: 0 keeps the 0fr
collapse working.
@chenmingwei23
chenmingwei23 requested a review from a team September 28, 2026 00:20
@chenmingwei23
chenmingwei23 requested a review from a team as a code owner September 28, 2026 00:20
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 7d92285010ea4516296c73de59ee841b5eb473a5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7d92285

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7d92285010ea4516296c73de59ee841b5eb473a5: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 7d92285010ea4516296c73de59ee841b5eb473a5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify a long-title sidebar in the real dashboard — the Chromium numbers come from a standalone reproduction, not the app itself.

Suggestions

[DESIGN-REVIEWED] 7d92285

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 7d92285010ea4516296c73de59ee841b5eb473a5 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the fix in the real sidebar, not just the standalone reproduction — the author's Chromium measurement was a 300px mock, and the passing Playwright spec measures height only.

What this change ships

Inventory (2 items) — 2 justified

Intent: restore the sidebar folder rows' ellipsizing and trailing controls, which #14099's overflow: clip switch pushed off-screen — a FIX.

  1. Folder rows ellipsize again; count, kebab and + buttons sit inside the lane; the sidebar can be narrowed — justified
  2. The ghost-height test now also pins min-width: 0 on the folder body's inner box — justified

The fix sits at cause level within scope: the box whose automatic minimum width changed is the box that gets the explicit 0, exactly mirroring the min-height: 0 the original commit already shipped. Sibling count: overflow: clip appears in one production component (website/src/components/FolderBody.tsx:79, grepped overflow:\s*clip across website/src), so no unfixed siblings. No new surface, no deleted pins, both items declared.

[FIRST-PRINCIPLES-REVIEWED] 7d92285

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of 7d92285010ea4516296c73de59ee841b5eb473a5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Verify in the running sidebar that long session titles ellipsize and the folder-row count/menu/add buttons return; the PR proves the fix only in a standalone reproduction.

[UX-REVIEWED] 7d92285

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 7d92285010ea4516296c73de59ee841b5eb473a5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7d92285

Verdict parsed from the review's SHA-scoped output markers for commit 7d92285010ea4516296c73de59ee841b5eb473a5.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7d92285010ea4516296c73de59ee841b5eb473a5: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 28, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #14550, which makes the same one-line minWidth: 0 fix in FolderBody.tsx, adds a Playwright e2e, was opened first, and is already rebased onto main with the Integration lane fix (#14578). The before/after screenshots in this body still apply to that PR.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 28, 2026
@bolichen97
bolichen97 deleted the fix/folder-body-min-width branch November 6, 2026 07:28
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.

1 participant