Repository navigation
improve(ui): reveal session actions without sacrificing titles - #123586
vyctorbrzezowski wants to merge 4 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: found issues before merge. Reviewed August 16, 2026, 1:15 AM ET / 05:15 UTC. ClawSweeper reviewWhat this changesThe PR replaces fixed sidebar action reserves with measured title fading and traversal so session actions can appear without shifting session titles. Merge readinessThe prior P2 blocker remains: a catalog session’s top-layer menu does not keep its owning row revealed, so the cover and visible actions can disappear during menu interaction. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI sidebar renders recent and catalog session rows with title links, run state, and management actions. Row interaction measures action overlap to fade and reveal truncated titles while context menus open outside the row in the top layer. flowchart LR
Sessions[Recent and catalog sessions] --> Rows[Sidebar session rows]
Rows --> Reveal[Measured title reveal]
Reveal --> Actions[Pin and menu actions]
Actions --> Menus[Top-layer session menus]
Menus --> Owner[Active menu owner state]
Owner --> Rows
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +298, Tests +401. Total +699 across 16 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Carry the active catalog menu key through the catalog controller and renderer, mark the matching row as the menu owner, include catalog menus in sidebar suppression, and prove the popup-focus handoff. Do we have a high-confidence way to reproduce the issue? Yes, from source: open a catalog row’s More menu and transfer focus or the pointer into its top-layer popup; the row lacks the owner class that prevents reveal cleanup. Is this the best way to solve the issue? No. The current sidebar-wide marker covers only regular session menus; the catalog controller must publish owner identity rather than relying on hover suppression alone. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eae415b6213b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (24 earlier review cycles; latest 8 shown)
|
b6d2414 to
ef98836
Compare
ef98836 to
1769c84
Compare
1769c84 to
cf76d7c
Compare
cf76d7c to
c11ae1c
Compare
c11ae1c to
1dd5542
Compare
38e693a to
4cbc158
Compare
4cbc158 to
81e22d9
Compare
81e22d9 to
5816aba
Compare
5816aba to
77f7fb0
Compare
77f7fb0 to
7ac8848
Compare
7ac8848 to
034a3b2
Compare
034a3b2 to
347fa8b
Compare
A session row now rests with as much readable title as it can hold and reveals Pin and More without moving anything. - The trailing endcap returns to the flow, so a row reserves exactly the state it is showing: an idle row keeps the full width, and a running row gives up only the width of its own spinner instead of a fixed 68px guess. - Management actions float from that endcap rather than claiming a column, so hover, focus, and an open row menu change nothing but opacity — the title baseline, the subtitle, and every sibling row hold still. - The fade under the actions is measured on entry from where they actually land, replacing the fixed 80px/52px ramp, and the same measurement tells a clipped title exactly how far it has to travel to clear them. - Traversal now follows distance at roughly 10ms per pixel between 900ms and 1.6s, reverses for a right-to-left title, and does not start at all when the reader asks for reduced motion. - Pointer and keyboard each hold the reveal open, so reaching for Pin no longer snaps the title back mid-read. - Pinned state is reported by the pin silhouette itself, filled versus hollow, in the ordinary control color rather than a tint. - Catalog rows join the same reveal instead of carrying a marquee class that nothing ever started.
Two regressions from the reveal work, both from splitting one decision in two. The hover fade stopped at rows whose sibling held an open menu. The suppression bailed out of revealSessionRow before it published the measured action overlap, but CSS reveals Pin and More on :hover on its own, so those rows kept the controls and lost the mask that ramps at that measurement -- the buttons landed on unfaded title text. The cover is now published for every hovered row, and only the traversal, which is the part an open menu owns, stays suppressed. Hoisting the endcap into a variable also moved it ahead of the child disclosure button. Nothing pins the endcap: it holds the trailing rail by being last, so a parent row's state was pushed inboard while childless rows kept the true edge, which is the misaligned spinner an operator sees. The endcap is emitted last again. Both tests that locked the broken shapes are rewritten to the invariant they were meant to protect.
No caller draws a filled 16px glyph, so the shell was dead surface.
af2de8c to
af4363c
Compare
|
Closing this stacked chain: the sidebar work is being rebuilt as independent PRs against |
What Problem This Solves
A session row spends most of its life at rest, but it was budgeting for a state it was not showing. Rows with any operational state reserved a flat 68px of trailing space whether they carried a spinner, a dot, or nothing at all, and rows without state grew a second 52px reserve the moment the pointer arrived. Two consequences followed:
The fade drawn under the revealed actions was a fixed
80px → 52pxramp that matched neither the real control cluster nor the endcap already reserved beside it, so on a row with state the fade started well before anything was covering the text, and the traversal distance derived from those numbers could not reach the end of a long title.Separately, the traversal itself read as arbitrary: every clipped title moved at the same 80px/s regardless of how much was hidden, short ones flicked past in 300ms, and neither right-to-left text nor a reduced-motion preference changed anything. Catalog rows carried the marquee class but nothing ever started them, so a truncated Codex or Claude Code title had no way to be read at all.
Why This Change Was Made
The row now measures instead of guessing, and the endcap owns its own width.
The trailing endcap returns to the row's flow, so the reserved space is the state being rendered: an idle row reserves nothing and keeps the full title width, and a running row gives up exactly its spinner. Management actions float from that endcap rather than claiming a column, which is what makes rest and reveal geometrically identical — hover, keyboard focus, and an open row menu now change opacity and nothing else. The two
padding-rightapproximations and the child-toggle offset rule they needed are deleted rather than retuned.Entering a row takes two measurements, because the fade and the traversal answer different questions. The fade rides on the link box and only needs to know where the controls begin, so it ramps 10px at the real action edge on any endcap. The traversal may move only text the reader cannot see, so it measures the title's own rendered span — a range over the label's contents rather than the flexible box holding them, which stretches to the full row width whatever the title says. A title that ends before the controls is therefore provably still, and a clipped one travels exactly what it owes: the tail past the clip plus the part the actions sit on.
Traversal was rebuilt around distance: roughly 10ms per pixel, floored at 900ms and capped at 1.6s, so a slightly clipped title reads deliberately and a very long one still finishes. A right-to-left title reveals from the opposite side, and a reduced-motion preference stops the traversal while keeping the clipping and the title attribute intact.
Pointer and keyboard now each hold the reveal open, so reaching for the row actions no longer snaps the title back while the pointer is still on the row. Catalog rows were wired into the same reveal.
Following the maintainer amendment of 2026-08-14, pinned rows render exactly as
mainrenders them after #123530 restored the interleaved sidebar zone. The pin-silhouette treatment this branch originally carried — a filled/hollow pin pair replacing the accent tint — has been removed, andmain's single pin glyph and accent rule are restored.The module that owned the marquee now owns the whole reveal — measurement, fade, traversal, and the pointer/focus handoff — and is named for it.
User Impact
No configuration, protocol, or persisted state is involved.
An open menu owns the pointer. Maintainer decision of 2026-08-14, taken against the mock: while any session menu is open, no other row reveals its title. The suppression is published by the sidebar as
data-hover-suppressedon its root and read by the reveal, so it is one owner rather than a guard repeated per row — which also settles the catalog gap raised in review, since catalog rows live under the same root and need no menu state of their own. The menu owner keeps its own reveal; every sibling stays inert until the menu closes.Evidence
Unit —
ui/src/lib/session-row-reveal.test.ts(10 cases)The fade edge and the travel distance are asserted separately: a title that ends before the controls publishes the full control edge to the fade and arms no traversal at all, while a clipped one travels its hidden tail plus the overlap that lands on it. Duration is floored at 900ms and capped at 1.6s; right-to-left reveals from the other side; reduced motion measures but does not move; pointer and focus each hold the reveal against the other's departure. The harness reports
scrollWidththe way a browser does — the label, never the text, once the title fits — so a measurement taken from the flexible box fails these cases instead of passing them.Rendered rows —
ui/src/test-helpers/app-sidebar-cases/session-management-reveal.ts(5 cases, in the sidebar suite)The endcap precedes the child disclosure; an open row menu holds its own row revealed and no other; entering a row publishes the overlap and leaving clears it; catalog rows take part in the same measurement. 263 cases pass in that suite.
Real layout —
ui/src/e2e/session-management.overflow.e2e.test.ts(5 cases)Against a fixture covering an empty endcap, a live run, and a blocked unread run: the link stops exactly where the endcap begins, the link box is byte-identical before and after reveal, an empty endcap measurably yields more title width than a live one, and reduced motion holds a clipped title still while still measuring the overlap.
Two cases carry the invariants this layer exists for.
travels only titles that are genuinely clippedproves a short title neither moves nor is even armed — no shift is published for it.hands the trailing edge to the actions exactly when it reveals themhit-tests the centre of the More control: at rest that point belongs to the row's link, so an invisible control never silently eats a click, and once revealed it belongs to the button and clicking it opens the menu — asserted on the menu items themselves, not on a dispatched event.Static —
tsgoUI and test-shard lanes,oxlint, andstylelintclean on the changed surface.pnpm buildis not implicated: no module boundary or dynamic import changed.Production LOC delta: +2 (
ui/src/lib/session-row-reveal.ts, +34/−32). The measurement is now indent-invariant by construction, which removed the compensation the previous shape needed.Visual matrix
Captured in real Chromium on a Linux proof host under
OPENCLAW_CAPTURE_UI_PROOF=1, each frame clipped to the union of the surfaces it exists to show.The reveal invariant, measured against the right thing
Two spec repairs land with this layer, both because the padding swap this change
deletes was still what the older cases asserted.
ui/src/e2e/session-management.trailing-state.e2e.test.tsasserted apadding-rightof52px/68pxthat no longer exists — the row now publishesthe measured overlap in
--session-row-action-coverand the mask consumes it.Those cases now assert the published overlap is the real one
(
link.right - actions.left), which is the property that puts the fade on theaction edge rather than at a reserved width. The resting assertion changed from
a constant padding, which had become true of every row, to the row publishing no
overlap at all.
ui/src/e2e/session-management.overflow.e2e.test.tscompared a resting box witha hovered one and saw the row drift a fraction of a pixel. Nothing in the row
moved: the shell plays a 300 ms mount entrance (
dashboard-enter) thattranslates the whole page into place, and the resting read happened while it was
still running, whereas Playwright settles the page itself before it will hover.
Instrumented in a browser,
.shelldecays3.006px → 0.634px → 0.239px → 0.008px → 0withscrollTopat zero and every sidebar height constant. Thecase now settles the entrance before it measures: 8 failures out of 8 runs
before, 6 passes out of 6 after, on the same host.