fix(sidebar): restore the folder row's two left alignment guides - #1906
Conversation
5c08a4d to
ab95fe3
Compare
UX Review (Fable 5) — ✅ PASSAdvisory UX-level review of Both screenshots confirm the claims: glyphs land on the session-text column in the after shot, and the modal reads cleanly as Name → Color → Project directory → Default agent with no dead control. The diff is pure geometry restoration (pad 16px, glyph 14, gap 5px), removal of the non-functional preview button, and the pruned i18n key — no new strings, no flow changes, no moved controls beyond the alignment fix itself. The removed preview eliminates a click-does-nothing affordance, which is a UX improvement, and the color swatches below already carry the identity-mark job. Nothing trips any lens. UX-Verdict: PASS Restores the sidebar's alignment guides exactly as claimed and deletes a click-does-nothing control; screenshots verify both, no new copy or flow risk. [UX-REVIEWED] 95267a3 |
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: |
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: |
Design Review (Fable 5) — ✅ PASSAdvisory design-level review of Design-Verdict: PASS A measured regression, fixed at its arithmetic root cause, with the load-bearing numbers locked by a test so it cannot silently recur. Watch
Suggestions
[DESIGN-REVIEWED] 95267a3 |
ab95fe3 to
189e21c
Compare
A folder row and the session rows around it share two left guides: the folder GLYPH's left edge sits on the text x of the sessions at the folder's OWN level, and the folder NAME's left edge sits on the text x of the sessions INSIDE it. Both hold only for the exact triple (16px header pad, 14px glyph, 5px glyph-to-name gap), because glyph 14 + gap 5 == the 19px indent step the nested body applies via `ml-3` + 1px border + `pl-1`. #1211 changed all three at once (9px / 17px / 7px) and broke both guides: measured in a real browser, the root folder glyph landed 7px left of the root-lane session text and the folder name 2px left of its children's text, at every nesting depth. This restores the triple (and the board view's 11px glyph), which puts the ladder back on 261 -> 280 -> 299 -> 318. Also removes the folder-settings modal's live glyph preview. #1211 deleted the folder icon/emoji system, so the preview advertises a control that no longer exists -- a folder's identity mark is now a palette color, which the swatch row below already shows. The name input takes the full width, and the now-orphaned `components.folderConfigModal.folder_preview` key is pruned from all 12 catalogs. Drive-by: `capture-folder-modal.mjs` has been broken since #1211 -- step 03 clicks `folder-config-icon`, a testid that removal deleted, so the harness times out. Repointed at the palette via the ADJACENT sibling (`+ button`) so it resolves to exactly the first swatch -- `~ button` would match all 12 and only survive on page.click non-strict first-match. Tests: new ChatSidebar.folderAlignment.test.tsx locks the three numbers and the 19px body indent they are derived from (jsdom has no layout engine, so it asserts the geometry INPUTS; the measured-pixel counterpart is scripts/capture-folder-glyph.mjs under MEASURE=1, and each points at the other). FolderConfigModal's preview-toggle test is replaced by a regression assertion that no preview control mounts.
189e21c to
95267a3
Compare
Problem
In the sessions sidebar, a folder row no longer lines up with the session rows around it. Measured in a real browser on
main:mainThe break repeats at every nesting depth, so the deeper the tree the more visibly the folder column drifts out of the session column.
Separately, the folder-settings modal still renders a clickable folder glyph preview — a control for an icon that no longer exists. #1211 deleted the folder icon/emoji system; a folder's identity mark is now a palette color, which the swatch row directly below the preview already shows.
Why it matters
The sidebar's left edge is its only structural guide — it is how you read the tree at a glance. Two independent guides ride on it:
With both off, every folder row is a small visual snag, and nesting compounds it. The stale modal preview is worse than cosmetic: it presents an interactive affordance whose backing feature was removed, so clicking it does nothing a user can name.
Fix (symptom → root cause → change)
Symptom. Folder rows sit left of where they used to, by 7px (glyph) and 2px (name).
Root cause. Both guides are satisfied by exactly one triple of numbers, and the code that established it said so:
The arithmetic: session rows reach their text x via
px-4(16px), so the header's pad must also be 16px for guide 1. The folder body indents byml-3(12px) + 1pxborder-l+pl-1(4px) = 19px, so glyph (14) + gap (5) must equal 19 for guide 2. #1211 changed all three at once — pad16px→9px, glyph14→17, gap5px→7px— which breaks guide 1 by 7px and guide 2 by 2px, and rewrote the comment to describe a 19px glyph the code never had.Change. Restore the triple (and the board view's
11pxglyph, changed to15by the same PR), and restore the comment that explains why the numbers are load-bearing. Nothing else moves:renderSessionRow'spx-4, the folder body'sml-3 pl-1 border-l, and the panel's own margins are untouched — the session rows are the reference, so the fix moves the folder header back onto them rather than moving them.Result — the 19px ladder closes at every depth:
mainVerified against the SVG's own box, not just the wrapper span:
folder-collapse-f1's<svg>left, its wrapper's left, and the root-lane session text left are all261.Modal. Remove the preview button, its
previewOpenstate, and the now-unusedFolderGlyphimport; the name label takes the full width, matching theflex flex-col gap-1.5shape of the Color / Project directory / Default agent fields below it. The orphanedcomponents.folderConfigModal.folder_previewkey is pruned from all 12 catalogs (one line each; no reformatting or key reordering).Drive-by.
capture-folder-modal.mjshas been broken since #1211: step 03 clicksdata-testid="folder-config-icon", a testid that removal deleted, so the harness times out before writing frames 03 and 04. Repointed at the palette using the adjacent sibling (+ button) —~ buttonmatches all 12 swatches and would only survive onpage.click's non-strict first-match.Tests
website/src/test/ChatSidebar.folderAlignment.test.tsx(new) — locks the three numbers (headerpaddingLeft: 16px, glyphwidth/height: 14px,gap-[5px]on the collapse toggle) and, separately, theml-3+border-l+pl-1body indent and the session row'spx-4that the gap is derived from. jsdom has no layout engine, so it asserts the geometry inputs; the measured-pixel counterpart isscripts/capture-folder-glyph.mjsunderMEASURE=1, and each references the other so a future editor finds both halves.FolderConfigModal.test.tsx— the preview-toggle test is replaced by a regression assertion that no preview control mounts, withfolder-config-color-resetasserted present as a positive control so the test cannot pass vacuously on a modal that failed to render.Gates:
tsc -bclean,npm run buildclean, vitest 9626 passed,lint:i18nOK (615 untranslated, baseline 1037), eslint 0 errors. Two vitest failures are pre-existing onmainand unrelated:catalogParity > ja(missing 11components.kiroPrerequisiteGate.*keys —ja.jsononorigin/mainhas nolinux_sandbox_guide) andformat.test.ts(Intl.DurationFormatpresent under Node 24). No backend files changed, so the Python gates are not exercised by this diff.Manual verification
Screenshots below were captured by running the built
distthrough the repo's own gateway-free harnesses and reading the frames, plus theMEASURE=1probe for the numbers in the tables above.capture-folder-modal.mjswas re-run after the selector change to confirm it now completes all four frames and that+ buttonselects the first swatch (the ring lands on red, not on the "no color" cell).Screenshots
Before / after at the same crop origin (
CLIP_X=210), so the columns are directly comparable — on the left the folder glyphs hang left of the session text; on the right they sit on it.mainFolder settings, with the icon preview gone and the name input spanning the dialog:
Realistic sidebar (colored + uncolored folders, depth 3, running session) and full-page context
Colored folders (Kiro purple, Sidebar blue, Updater amber, Design pink) and uncolored ones (
Folder glyph,Infra) both land on the guides — the palette tint is applied via inlinestyleand does not affect geometry.Out of scope (noted, not fixed here)
website/AUTOSDE.yaml'sno-emoji-as-iconsexception list still namesfolderEmoji.tsand the "FolderConfigModal folder icon picker", both deleted by feat: redesign sidebar folders and de-clutter the sessions sidebar #1211. The stale exception is inert (it can never fire), and editing an untouched rule file to prune it would widen this PR.