Skip to content

fix(sidebar): keep folder session rows inside the sidebar width - #14550

Merged
NicholasRBowers merged 1 commit into
mainfrom
fix/sidebar-folder-row-width
Sep 28, 2026
Merged

NicholasRBowers merged 1 commit into
mainfrom
fix/sidebar-folder-row-width

Conversation

@NicholasRBowers

@NicholasRBowers NicholasRBowers commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

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 from overflow: hidden to overflow: clip, so nested headers stick to the sidebar instead of to this box. A hidden box is a scroll container, and a scroll container's automatic minimum size is 0. A clip box is not, so its minimum size became its content's size. #14099 put back minHeight: 0 so 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: 0 beside minHeight: 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 in website/src/pages/ChatSidebar.tsx gets a data-testid="session-row-time" hook so the browser test can find it. test/test_playwright_e2e.py raises 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.
    • Against unfixed 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).
    • With the fix: passes.
    • Setting 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.
  • Existing vitest files for the sidebar folders and Design Tweak (ChatSidebar.folderAlignment, ChatSidebar.collapsedFolderGhostHeight, ChatSidebar.emptyFolderNoBody, ChatSidebarCoverage, ChatSettings, DesignTweakRequestsCov80, DesignTweakHistoryCov80, DesignTweakProjectRailCov80, integration/ChatSidebar.integration) pass.

Manual verification

  • Both Playwright specs were run against a disposable harness gateway serving this branch's build, once with FolderBody.tsx reverted to main (new spec fails) and once with the fix (both pass).
  • Design Tweak: its comment-row markup inside the same FolderBody styles, rendered in Chromium with the built stylesheet in a 320px panel. On main the 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.

Sidebar on main: folder rows overflow the sidebar, no timestamps

After: titles truncate and every row shows its time.

Sidebar with the fix: folder rows truncate and show their time

After, hovering the nested-folder row: the hide (x) button sits inside the sidebar.

Sidebar with the fix, hovering a nested folder row: action buttons in view

Design Tweak request panel, main (left) vs fix (right)

Design Tweak comment row in a 320px panel: main overflows, fix truncates

Related Issues

Fixes #14534

Pattern harvest

Rule candidate: lint
Pattern: a grid or flex item switched from overflow: hidden to overflow: clip (or visible) loses its automatic zero minimum size on both axes; it needs explicit min-width: 0 and min-height: 0.

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

@NicholasRBowers
NicholasRBowers requested a review from a team September 27, 2026 23:01
@NicholasRBowers
NicholasRBowers requested a review from a team as a code owner September 27, 2026 23:01
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

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

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] 4322a80

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 4322a80f3b7bc0c4eea045061aa8ae6b1261825b and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4322a80

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

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 4322a80f3b7bc0c4eea045061aa8ae6b1261825b — 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

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 ships

Inventory (6 items) — 6 justified

Intent: FIX — folder-filed session rows fit the sidebar again so their timestamp and hide (x) button are reachable (regression from #14099, issue #14534).

  1. Folder rows shrink to the sidebar width; long titles truncate; timestamp and hide button back in view — justified
  2. Design Tweak request comments fit their panel again (same shared FolderBody box) — justified
  3. New Chromium spec measuring lane overflow, row edges, timestamp and close-button hit — justified
  4. Executed-spec floor raised 235→236 — justified
  5. Timestamp span gains data-testid="session-row-time" for the spec's selector — justified
  6. Opt-in ROW_WIDTH_EVIDENCE_DIR screenshot hook in the spec, mirroring STICKY_EVIDENCE_DIR — justified

Root-cause check: grepped overflow: 'clip'|overflow-clip in website/src — the only grid/flex item using it is FolderBody.tsx:79, the line fixed; zero unfixed siblings.

[FIRST-PRINCIPLES-REVIEWED] 4322a80

@NicholasRBowers

NicholasRBowers commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=acfaec69d5d8 Item 6 — undeclared ROW_WIDTH_EVIDENCE_DIR opt-in

fixed (description only, no code change): the PR body's Tests section now names the opt-in.
It mirrors STICKY_EVIDENCE_DIR in sidebar-sticky-folder-header.spec.ts, the same test-only pattern, and it produced this PR's screenshots.
With the variable unset (every CI run), the helper returns before touching the page, so no assertion depends on it.

@NicholasRBowers

Copy link
Copy Markdown
Contributor Author

Baseline run of the new spec against unfixed main (website/src/components/FolderBody.tsx reverted to f57c1dee40, everything else at this head), in real Chromium against a disposable harness gateway serving that build. Each line is one soft assertion that failed:

Error: root folder: lane must not overflow sideways
Error: root folder: row right edge inside the lane
Error: root folder: timestamp right edge inside the lane
Error: root folder: the timestamp is not clipped at its own centre
Error: root folder: close (x) button right edge inside the lane
Error: root folder: a click at the close button's centre hits it
Error: nested folder (depth 2): lane must not overflow sideways
Error: nested folder (depth 2): row right edge inside the lane
Error: nested folder (depth 2): timestamp right edge inside the lane
Error: nested folder (depth 2): the timestamp is not clipped at its own centre
Error: nested folder (depth 2): close (x) button right edge inside the lane
Error: nested folder (depth 2): a click at the close button's centre hits it
Error: unfiled: lane must not overflow sideways
1 failed

The first failure's measurement on main: lane clientWidth 258px, scrollWidth 931px, root-folder row spanning x 264-1168 against a lane edge at 495. With the fix, the same spec and sidebar-sticky-folder-header.spec.ts (3 surfaces) pass: 5/5 including the auth setup.

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

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

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

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 4322a80f3b7bc0c4eea045061aa8ae6b1261825b — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4322a80

Verdict parsed from the review's SHA-scoped output markers for commit 4322a80f3b7bc0c4eea045061aa8ae6b1261825b.

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

@NicholasRBowers
NicholasRBowers force-pushed the fix/sidebar-folder-row-width branch from 27e388a to cf7b66c Compare September 27, 2026 23:50
@NicholasRBowers

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/components/ChatInput.tsx, website/src/components/SidePanelLayout.tsx and website/src/pages/SettingsPage.tsx (same directories as this PR's files) since this head went green (f57c1de -> 61e100d); CI re-running. Before pushing, the rebased build passed both Playwright specs (sidebar-folder-row-width, sidebar-sticky-folder-header on all three surfaces) and the targeted vitest set.

@NicholasRBowers

NicholasRBowers commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Integration (in-process gateway) is red on this head for a reason this PR does not touch, and it is red on main too.

test/integration/test_route_sweep.py::test_every_parameterless_get_route_serves_on_a_fresh_home still lists /api/models as "503 on a fresh home". #14463 (de25db109a) taught the fake kiro-cli to answer chat --list-models, so that route now answers 200 with the fake models. Main's own CI run on de25db109a fails the same assertion: https://github.com/kirodotdev/KiroCrew/actions/runs/36358609884

This PR changes only FolderBody.tsx, a test id in ChatSidebar.tsx, a new Playwright spec and the E2E spec floor. The fix is #14578 (tracked in #14576). This PR's PR Readiness reads action required only because of that CI failure; every review lane has passed. I will rebase once #14578 lands on main.

@NicholasRBowers

Copy link
Copy Markdown
Contributor Author
  • span=9ddb9440b4db Item 6 — ROW_WIDTH_EVIDENCE_DIR screenshot opt-in rides along in the spec

rebutted (kept as is): a test-only opt-in, declared in the PR body's Tests section, not product code.
It mirrors STICKY_EVIDENCE_DIR in sidebar-sticky-folder-header.spec.ts, the repo's existing way to capture PR stills from a spec.
Unset (every CI run) it returns before touching the page, so it adds no assertion and no runtime path.

@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
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
@NicholasRBowers
NicholasRBowers force-pushed the fix/sidebar-folder-row-width branch from cf7b66c to 4322a80 Compare September 28, 2026 02:35
@NicholasRBowers

Copy link
Copy Markdown
Contributor Author

Rebased: onto main cd783d2235, which now includes #14578. That PR fixes the route-sweep test behind the inherited Integration red. The base went from 61e100dedd to cd783d2235, the diff is unchanged, and the new head is 4322a80f3b. CI is re-running.

Checked locally on the rebased head: tsc passes, 6 folder/sidebar vitest files pass (61 tests), npm run build passes, and sidebar-folder-row-width.spec.ts and sidebar-sticky-folder-header.spec.ts pass 4/4 in Chromium.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 28, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 28, 2026
@NicholasRBowers
NicholasRBowers enabled auto-merge (squash) September 28, 2026 03:30
@NicholasRBowers
NicholasRBowers merged commit f9bf876 into main Sep 28, 2026
142 of 143 checks passed
@NicholasRBowers
NicholasRBowers deleted the fix/sidebar-folder-row-width branch September 28, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar: sessions inside a folder overflow the sidebar, hiding the time and the hide (x) button

3 participants