Repository navigation
fix(sidebar): keep folder session rows inside the sidebar width - #14550
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 4322a80 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Confirm the new spec really fails on unfixed base (13 failures claimed) — it is the defect's checkable provenance beside issue #14534. What this change shipsInventory (6 items) — 6 justifiedIntent: FIX — folder-filed session rows fit the sidebar again so their timestamp and hide (x) button are reachable (regression from #14099, issue #14534).
Root-cause check: grepped [FIRST-PRINCIPLES-REVIEWED] 4322a80 |
|
|
Baseline run of the new spec against unfixed The first failure's measurement on |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Design Tweak's fix was verified against extracted markup, not the live page — confirm the real request panel at 320px once. [UX-REVIEWED] 4322a80 |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
27e388a to
cf7b66c
Compare
|
Rebased: main moved in |
|
This PR changes only |
|
FolderBody's grid item switched to overflow: clip in #14099 so nested sticky headers pin to the lane. A clip box is not a scroll container, so its automatic minimum width became the content's min-content width, and the rows' single-line titles made every row in a folder as wide as its longest title. Add min-width: 0 beside the existing min-height: 0. Adds a real-Chromium spec for a long-titled row in a root folder, a nested folder and unfiled, and raises the E2E executed-spec floor by one. Fixes #14534
cf7b66c to
4322a80
Compare
|
Rebased: onto main Checked locally on the rebased head: |
Problem / Motivation
Goal: Session rows filed in a sidebar folder fit inside the sidebar again, so their time and hide (x) button are visible without scrolling sideways.
Since #14099 (sticky folder headers), a session row inside a folder is as wide as the longest title in that folder. Titles run past the sidebar's right edge, the timestamp is off-screen, and the hide (x) button can only be reached by scrolling the sidebar sideways. Unfiled rows are fine.
Why it matters
Every session a user files in a folder is hit. The timestamp is gone, and hiding a session means scrolling the sidebar sideways to find its button.
Not a goal
What changed (motivation → approach → change)
A folder's rows now shrink to the sidebar's width and truncate their title, as they did before #14099.
The folder body is a one-column CSS grid (
website/src/components/FolderBody.tsx). #14099 changed its grid item fromoverflow: hiddentooverflow: clip, so nested headers stick to the sidebar instead of to this box. Ahiddenbox is a scroll container, and a scroll container's automatic minimum size is 0. Aclipbox is not, so its minimum size became its content's size. #14099 put backminHeight: 0so the collapse animation still works. It did not put back the width half. The rows' titles never wrap, so the grid item grew to the longest title.The fix adds
minWidth: 0besideminHeight: 0. The same box wraps Design Tweak's request comments (website/src/apps/design-tweak/DesignTweakPage.tsx), which had the same overflow and gets the same fix. The session row's timestamp inwebsite/src/pages/ChatSidebar.tsxgets adata-testid="session-row-time"hook so the browser test can find it.test/test_playwright_e2e.pyraises the executed-spec floor by one for the new spec.Backwards compatibility
Compatible: a style-only change that restores the width behaviour folder bodies had before #14099; no data, API or config changes.
Tests
website/playwright/sidebar-folder-row-width.spec.ts(new, real Chromium) seeds a long-titled session in a root folder, in a nested folder (depth 2) and unfiled. For each row it checks that the sidebar lane has no sideways overflow, that the row's right edge and the timestamp are inside the lane and not clipped, and that on hover the hide (x) button is inside the lane, fully faded in, and is what a click at its centre hits. It never scrolls the lane sideways, so a hidden overflow cannot pass.main: fails, 13 failures (6 for the root-folder row, 6 for the nested row, and the lane overflow for the unfiled row: 931px of content in a 258px lane).ROW_WIDTH_EVIDENCE_DIR=<dir>saves a still of the lane at each check, the same opt-in the sticky-header spec has (STICKY_EVIDENCE_DIR); the PR screenshots were captured this way, and the assertions ignore it.website/playwright/sidebar-sticky-folder-header.spec.ts(existing) still passes on all three surfaces, so sticky headers still pin.ChatSidebar.folderAlignment,ChatSidebar.collapsedFolderGhostHeight,ChatSidebar.emptyFolderNoBody,ChatSidebarCoverage,ChatSettings,DesignTweakRequestsCov80,DesignTweakHistoryCov80,DesignTweakProjectRailCov80,integration/ChatSidebar.integration) pass.Manual verification
FolderBody.tsxreverted tomain(new spec fails) and once with the fix (both pass).mainthe panel scrolls sideways (748px of content) and the send button runs off the edge. With the fix the panel fits and the meta line ends in an ellipsis.Screenshots / video
Before (unfixed
main): folder rows run past the edge, and the timestamps and the nested folder's count are gone.After: titles truncate and every row shows its time.
After, hovering the nested-folder row: the hide (x) button sits inside the sidebar.
Design Tweak request panel, main (left) vs fix (right)
Related Issues
Fixes #14534
Pattern harvest
Rule candidate: lint
Pattern: a grid or flex item switched from
overflow: hiddentooverflow: clip(orvisible) loses its automatic zero minimum size on both axes; it needs explicitmin-width: 0andmin-height: 0.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)