Repository navigation
feat(ui): add consistent session information cards - #123594
vyctorbrzezowski wants to merge 3 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 15, 2026, 10:04 PM ET / August 16, 2026, 02:04 UTC. ClawSweeper reviewWhat this changesThis PR adds shared delayed hover cards to Control UI session rows, exposing full titles and Gateway-provided checkout context without opening the session. Merge readinessKeep this maintainer-authored PR open: the delayed tooltip still opens after a session menu becomes active, so the card can reappear over the menu. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway supplies session rows to Control UI, which normalizes them into sidebar rows. The new tooltip card is rendered beside normal and catalog session rows so operators can inspect session context while scanning the sidebar. flowchart LR
A[Gateway session rows] --> B[Sidebar session model]
B --> C[Normal and catalog row renderers]
C --> D[Shared hover tooltip]
D --> E[Session information card]
D --> F[Session menu suppression]
E --> G[Operator sidebar scan]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +626, Tests +406. Total +1032 across 27 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make the shared tooltip reject opening whenever suppression is active at open time, then add a regression that opens a menu during the cold-delay interval. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: hover a row, open its session menu before the 400 ms timer fires, and the callback can still invoke show() without rechecking suppression. Is this the best way to solve the issue? No. The shared tooltip should enforce suppression at the final opening boundary, not only when the delay is scheduled. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2585edba2efd. 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 (17 earlier review cycles; latest 8 shown)
|
f8bd7e3 to
20752a2
Compare
9b71022 to
50d3646
Compare
50d3646 to
40aa1ab
Compare
40aa1ab to
810e281
Compare
|
Addressed on this head, with one item held for a product decision. Describe the focusable session links — fixed, at the tooltip rather than in the rows. The premise holds: the card's description landed on the slotted row wrapper, which carries no The finding suggested applying the description in the row templates, which cannot be done: the description id is minted inside the component and is not knowable by the caller. The owner is the tooltip, which now resolves its description to the trigger's first focusable descendant when the trigger itself is not focusable. That fixes both row kinds and any future wrapper trigger in one place, and touches no pixel — the hidden description span already existed and stays hidden. New case in Suppress catalog cards when their menu opens — held for a maintainer decision, not applied. The premise holds, and catalog rows do render a card ( @clawsweeper re-review |
b56b2a1 to
3b79388
Compare
3b79388 to
c50ed45
Compare
c50ed45 to
da62a86
Compare
da62a86 to
3cc077c
Compare
3cc077c to
8b34559
Compare
8b34559 to
e70bc7d
Compare
6b2f401 to
401de38
Compare
Hovering a session row now opens a card with the context the row had to leave out: the whole title, when the session last moved, and every fact the Gateway actually reports about it. - One anatomy for ordinary, pinned, Coding, and provider-catalog rows, so scanning down the list reads as one surface following the pointer. - Content is facts only: creator when the list is showing attribution at all, the full checkout path and branch the row abbreviates, who else is watching, draft and incognito context, pull requests, and cloud placement — with a workspace conflict or a failed placement stated as danger rather than filed under ordinary context. - Unread and Active run are deliberately absent; they are row state the reader is already looking at. A session with nothing more to say gets a header and no body instead of invented filler. - The card asks for a deliberate 400ms hover, then rides the shared skip-delay window so scanning siblings is immediate until the reader stops. Pin and More stay inside the same hover target, and opening a row menu stands the card down at once. - The sidebar's session model now carries the checkout and working directory the Gateway already sends, replacing the id-only field that could name a worktree but not describe it. - The tooltip primitive gains a per-trigger delay, a suppression flag, a placement, and skinnable padding and radius, so a card-shaped surface no longer has to fork the label-shaped one. An automation's name is still not reachable from a session row - the Gateway projects only a boolean - so the card says nothing about automations rather than printing a generic line. Naming them needs the cron binding index to carry job identity; tracked as follow-up work.
Extracting sessionPresenceViewers dropped the excludeUserId filter, so the chat header would count the session owner it already renders as another watcher. Requiring every worktree field also left the typography fixtures short an id.
401de38 to
a945765
Compare
|
Closing this stacked chain: the sidebar work is being rebuilt as independent PRs against |
What Problem This Solves
A sidebar row is a name and a state dot. Everything else a session knows — which checkout it runs in, which branch, who started it, who else is watching, whether its cloud workspace is blocked — either never reached the sidebar or reached it only as a truncated subtitle. A reader wanting to tell two similarly-named sessions apart had to open both.
The row also could not tell the whole truth about itself. Its title is one clipped line, and its subtitle collapses repository, branch, and node into a single string that is itself truncated. The one place those facts could be read in full did not exist.
Two of those facts were not even reaching the browser. The sidebar's session model kept
worktreeId— enough to ask another service about a checkout, not enough to name it — and droppedworktree.branch,worktree.repoRoot, andexecCwdentirely, although the Gateway sends all three on every row.Why This Change Was Made
Hovering a row now opens a session information card.
One anatomy, every row. Ordinary, native Coding, and provider-catalog sessions render through the same card, so scanning down the list reads as a single surface following the pointer rather than a different panel per section. The card leads with the complete title over up to two lines and the session's age at the top right, then a divider, then context rows.
Facts only. Each row is backed by something the Gateway reports: the creator, but only when the sidebar is showing attribution at all — a solo Gateway shows none, and the card respects that rather than re-deriving it; the full checkout path and branch, which is what makes the card a reveal rather than a repeat of the subtitle's abbreviation; who else is currently watching; draft and incognito context; pull requests; and cloud placement, where a workspace conflict or a failed placement is stated as danger while a healthy placement stays quiet context.
What it refuses to say.
UnreadandActive runare absent by construction: they are row state the reader is already looking at, and repeating them would spend the card's space on nothing. A session with no facts beyond its name renders a header and no body at all — an empty card is a truthful answer, and filler invented to avoid one is not.Timing is a deliberate ask, then a fast scan. A cold row waits roughly 400ms, long enough that crossing the sidebar on the way somewhere else opens nothing. Once a card has opened, the shared skip-delay window lets adjacent rows open immediately, so comparing three sessions is one motion; when the window lapses the next row is cold again. Pin and More sit inside the same hover target rather than punching dead zones through it, and opening a row menu stands the card down at once so two surfaces never argue over the same pointer.
Owner boundaries. The session model now carries the checkout and working directory the Gateway already sends, and
worktreeIdis gone — one fact, one field, with its three call sites readingworktree.id. The tooltip primitive gained a per-trigger delay, a suppression flag, a placement, and skinnable padding and radius, so a card-shaped surface skins the existing primitive instead of forking it.This PR also repairs something the layer below it dropped: with the trailing endcap rewrite, a cloud session with a filling or critical disk lost its row marker along with healthy-placement chrome. Healthy placement is context and correctly left the row; a disk about to fill is an action the operator has to take, and it now keeps its marker alongside workspace conflicts.
User Impact
Known gap, stated rather than papered over: an automation's name is not reachable from a session row. The Gateway projects a single boolean, because the cron binding index collapses jobs to a set of session keys and discards their identity. Rather than print a generic "Automation attached" line, the card says nothing about automations. Surfacing the name needs that index to carry job identity and an additive session-row field; tracked as follow-up work.
Pinned rows are not a target of this branch. They render through the shared session-row renderer, so the card reaches them as a consequence of that shared path rather than by any pinned-specific code here.
An open menu owns the pointer. Maintainer decision of 2026-08-14: while any session menu is open, no row opens a card. The tooltip now stays closed whenever an ancestor publishes
data-hover-suppressed, which the sidebar sets while a row menu is open. That is one gate in the surface that owns hover, so it covers native and catalog rows alike and closes the catalog gap raised in review without giving either renderer its own menu state.Evidence
Content model —
ui/src/components/session-row-hover-card.test.ts(9 cases)Header carries the full title and an age; the body collapses entirely with no facts; project derives from the checkout and falls back to the working directory; the creator appears only when the caller says attribution is on screen; unread, active-run, and error state produce no rows; a workspace conflict and a failed placement are danger while a healthy one is not; a local session never enters the cloud vocabulary; draft, incognito, and pull-request rows read from real fields; a catalog session gets the same anatomy and the same empty-body behavior.
Rendered sidebar —
ui/src/test-helpers/app-sidebar-cases/session-information-card.ts(5 cases)Rows ask for the 400ms cold delay and open beside themselves; a work session's card names the checkout the row abbreviated; child rows get no card; opening a row menu suppresses the card; catalog rows carry the same card built from
cwdandgitBranch.Real browser —
ui/src/e2e/session-information-card.e2e.test.tsUnder a controlled clock: nothing opens at 300ms and the card opens by 450ms; a sibling hovered inside the skip-delay window opens immediately with its own content; after the window lapses the next row is cold again. Separately: the card shows the untruncated title over two measured lines with the full project and branch rows; hovering Pin keeps the card open; opening the row menu closes it.
Regression repaired —
ui/src/components/session-row-badges.test.tscovers disk warning and critical keeping the placement marker, and the placement-state table now asserts the shipped rule that placement alone stays quiet.Static —
tsgoUI and test-shard lanes,oxlint,stylelint, and the keyless i18n verify all clean. Fullui/src/componentssuite: 1458 passed, with 3 failures that reproduce identically on currentorigin/main(app-sidebar-session-catalogstimestamp and twoapp-sidebar-session-narrationcases) and are untouched by this stack.The spec now seeds the stored collapse set before the page loads. Coding ships collapsed on a first visit, so a fresh browser context never rendered the session in a checkout that most of these cases depend on. The dismissal case also waits on the menu's items rather than on the menu host, which owns a popover and carries no box of its own.
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 row and the surface it opened.Variants whose facts this scenario cannot produce — creator attribution, presence, draft, incognito, pull requests, and cloud placement — stay proven by
ui/src/components/session-row-hover-card.test.tsrather than by a frame that would need a fixture the Gateway does not return here.A worktree without an id took the sidebar down
Moving the row's pull-request lookup from the flat
worktreeIdtoworktree.idmade an existing unsoundness reachable:SessionPullRequestIndicatorsController.statecomparesentry?.worktreeIdagainst the id it was given, so an absent entry and an absent id compared equal
and the next read dereferenced the entry that was not there. The render threw,
and the whole session list disappeared — 1 row painted where 38 belonged.
The lie was in the fixtures, not the controller:
SessionRowSchemarequiresid,branch, andrepoRoottogether, and two scenarios were building aworktree with only two of them. Both now carry the shape the Gateway actually
sends, and the
sessionRowhelper's option type requires all three so no laterscenario can invent a row the wire cannot produce.
expandStoredSessionSectionsalso returned
page.addInitScript'sDisposablethrough aPromise<void>signature, which the UI test typecheck lane rejected; it awaits now.
ui/src/e2e/session-management.sidebar.e2e.test.tspasses 11 of 11 and thetsgoUI and UI-test-shard lanes are clean.