Sidebar: a workspace hover preview lists its tabs, each one click away (carries #24785)

Draft
TE
5d ago
+1252-20

Problem

Leo said (2026-10-30): “and also why dont we have the rex thing yet of being abel to access the individual tabs in a workspace on its hover preview the best of both worlds thing”. He also said on 2026-10-24: “default just only show the inner tabs on hover and be able to go to and focus them when hovering ovre workspaces … wouldnt first prompt/input needing/whatever MAYBE be nice...? idk tho. we can tuck that behind toggle”.

Change

Carries #24785 (authorship preserved) and keeps its clickable workspace tabs, then applies Leo’s explicit default: the hover card opens with inner tabs first and details collapsed behind one click. Status, prompts, history, usage and custom content remain available through Show details. The existing workspace/tab selection intent is unchanged.

Gallery variants: tabs after status (4 + more), tabs below title (3 + more), compact tabs below details (6 + more), and tabs-first with details collapsed (chosen default). The card keeps the bounded Show more behavior.

Validation

  • python3 scripts/cmux-next/prepush-gate.py — pass.
  • git diff --check — pass.
  • WorkspaceTabHoverCardTests.cardStartsWithTabsAndCollapsedDetailsThenToggleRevealsDetails covers tabs-first default and the details toggle.
  • Independent Claude review requested at 120342cdc0743182cb319c39c0e856149c84d473; fleet macOS compile, WorkspaceTabHoverCardTests, and captures are pending at that head.
  • Regression coverage hosts the tab list inside WorkspaceHoverCardView to verify the first row, last visible row, and overflow hit targets; a click survives a same-tab refresh; terminal keys pass through while the pointer stays on the workspace row.
  • The tour asserts the selected tab index and workspace through debug.focus, including a second-tab precondition before clicking the first tab.
  • The defaults guard flags debug-report source hashes and awaits independent review; no settings default changed in the repair.
  • Mac capture states: workspace-hover-tabs, workspace-hover-gallery (coordinator).

Before/after captures and the four gallery variants are pending fleet runs at the current head. Risk: hover-card event routing; the focused terminal must retain its keys while the pointer rests on the workspace row.

The diff exceeds the size guideline because it carries the original implementation, its regression tests and gallery, plus the 21-locale details-toggle strings; these all belong to this one interaction.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Workspace hover previews now open tabs-first, letting you click or press Return to focus any inner tab directly; the richer status, prompt, and history content sits behind a one-click "Show details" toggle.

Behavior changes

  • The card collapses details by default and refits in place when "Show details" reveals them; collapsed details stay out of compact hover text and resource sampling.
  • Arrow keys navigate tabs only while the pointer is over the card. Enter selects a tab only after an arrow key has shown a keyboard selection; keys on the workspace row dismiss the card and pass through.
  • Overflowed tabs expand within the same bounded scroll area via "Show more"; row presses bind to the tab captured on mouse-down so reused rows can't release on stale selections.
  • Interactive cards now receive mouse events and may consume key events; debug.mouse supports a hover-card target to synthesize real clicks and moves against the card window.

agent session