Repository navigation
fix(ui): keep sidebar icon endcap intact in single-line session rows - #126567
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 10:29 AM ET / 14:29 UTC. ClawSweeper reviewWhat this changesThe branch makes one-line session-sidebar titles truncate before status icons and marks native catalog session rows as compact single-line rows. Merge readinessNo blocking findings. This maintainer-owned PR remains necessary because current main still lets a long compact-row title shrink the status endcap and leaves native catalog rows without the compact-row marker. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Control UI renders gateway sessions and native coding-catalog sessions into a shared sidebar row design. Renderer decisions select the row shape, and the sidebar CSS allocates width between the title and its status-icon endcap. flowchart LR
A[Gateway session data] --> B[Live session renderer]
A --> C[Catalog session renderer]
B --> D[Subtitle decision]
C --> E[Compact row class]
D --> F[Sidebar flex layout]
E --> F
F --> G[Title and status endcap]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +39. Total +42 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the explicit native-catalog compact marker and the zero-basis title rule, preserving the generic subtitle owner for rows that intentionally remain two-line. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main uses an automatic flex basis for compact titles and omits the compact class from native catalog rows; the branch adds focused browser assertions for both outcomes. Is this the best way to solve the issue? Yes. The patch changes the layout owner to match the existing subtitle shrink contract and marks only the native renderer that cannot produce preview text, leaving meaningful generic subtitles unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 267ffc4754a0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
With message preview off, rows collapse to one line and the second-row icon logic (spinner, unread dot, badges, facepile, trail) rides beside the title. Two defects broke that: - Long titles crushed the icon endcap: the single-line title used flex-basis auto, so overflow shrink was distributed onto the endcap (24px -> ~7px), clipping the status icons. Basis 0 now mirrors the two-line subtitle contract: text absorbs all shrink before icons do. - Native catalog session rows always rendered the two-line skeleton with an empty details line (46px vs 30px) and never collapsed, in both preview modes. Catalog rows never carry preview text, so they are now always single-line. Regression coverage: long-title endcap geometry in chat-flow.sidebar-presentation.e2e.test.ts (fails pre-fix), and codex-sessions.e2e.test.ts density assertions updated to the new all-single-line contract.
b87979f to
3e59f7e
Compare
|
ClawSweeper rank-up moves applied: rebased onto current |
|
Merged via squash.
|
…penclaw#126567) With message preview off, rows collapse to one line and the second-row icon logic (spinner, unread dot, badges, facepile, trail) rides beside the title. Two defects broke that: - Long titles crushed the icon endcap: the single-line title used flex-basis auto, so overflow shrink was distributed onto the endcap (24px -> ~7px), clipping the status icons. Basis 0 now mirrors the two-line subtitle contract: text absorbs all shrink before icons do. - Native catalog session rows always rendered the two-line skeleton with an empty details line (46px vs 30px) and never collapsed, in both preview modes. Catalog rows never carry preview text, so they are now always single-line. Regression coverage: long-title endcap geometry in chat-flow.sidebar-presentation.e2e.test.ts (fails pre-fix), and codex-sessions.e2e.test.ts density assertions updated to the new all-single-line contract.
What Problem This Solves
Audit of the sessions sidebar with Show message preview turned off (single-line rows). With preview off a row has only one line, but the icon logic that normally lives on the second row (running spinner, unread dot, badges, facepile, trail) must survive on that single line. Two defects broke that:
--single-linerows the title usedflex: 1 1 auto(flex basis = full text width), so when the title overflowed, shrink was distributed onto the icon endcap too — a 24px endcap collapsed to ~7px and the spinner/unread/badge icons were clipped away. The two-line layout never has this problem because the subtitle uses basis 0 and absorbs all shrink first.renderCatalogSessionRowemitted the two-line skeleton unconditionally and never received--single-line, so Codex/Claude Code catalog rows sat at 46px with an empty 18px details line under the title — misaligned with every other subtitle-less row (30px), in both preview modes.Why This Change Was Made
Preview-off is a supported display mode; the status icons are exactly what remains actionable in that mode and must never be silently clipped. Catalog rows never carry preview text at all, so they should always collapse to the one-line shape.
User Impact
session-row-subtitle.ts) and verified.Evidence
Mocked Control UI (
pnpm dev:ui:mock) + Playwright geometry audit across preview on/off, dark theme:--single-line, uniform with gateway rows.Long-title row, before (spinner crushed to a sliver) vs after:
Catalog section (CODEX / CLAUDE CODE), before (phantom second line under each row) vs after:
Validation:
chat-flow.sidebar-presentation.e2e.test.ts(long-title row: endcap keeps intrinsic atom width, title reports overflow) — verified to FAIL on pre-fix CSS and pass after.codex-sessions.e2e.test.tsdensity assertions updated to the new contract (all subtitle-less rows single-line at ~30px).codex-sessions,chat-flow.sidebar-presentation,session-management.trailing-state(17 tests).pnpm check:changedgreen (format, i18n verify, tsgo core+UI, lint lanes).Production LOC delta: net ~+4 (3 comment lines + 1 class token); the rest is test coverage.
Opportunistic CI fix (called out per Pathfinder rule)
First CI attempt failed in
checks-node-compact-small-6onsrc/gateway/server.sessions.compaction-read-errors.test.ts— unrelated to this UI diff and passing locally (also with--isolate=false). Residual flake class after e294c15: a stray transcript read on a slow shared worker consumes the queuedmockRejectedValueOnce, so the compaction read hits the real store and succeeds (expected true to be false). Fixed in this PR by making the rejection sticky (mockRejectedValue);beforeEachalready resets the mock per test, so nothing leaks across tests.