test(next): prove multi-view split drags keep focus and visible rows lit
Summary
Private design-reference comparison: done.
Leo’s item D prototype is already present on feat-cmux-next through the merged multi-view work (#23437, #23651, #24067): sidebar.multiView remains off by default; mouse-down does not navigate, mouse-up on the same row does; the window remembers its visible workspace set; workspace rows use the existing pane drop overlay; and a pane-edge drop keeps the current focus.
This first commit adds the missing real-window, per-frame regression:
- hold and drag a sidebar workspace toward a split edge;
- while the drag is held, the focused workspace stays focused;
- every workspace already in the view remains highlighted (focused row strong, other visible rows soft);
- the existing pane drop overlay shows its split indicator;
- releasing adds the workspace to the current view without changing focus or dropping visible-row highlights.
Leo’s words:
“do the Claude Code desktop multi-view better”
and:
“MOUSE DOWN DRAGGING ... SHOULDN'T BE IMMEDIATELY FOCUSING”
Before / after captures
These are the existing item-D dogfood captures for the behavior this test protects:
| Before (toggle off) | After (multi-view toggle on) |
|---|---|
| light · dark | light · dark |
Validation
- git diff --check passed.
- Focused fleet test still required at this exact head: SidebarMultiViewDropTests / SidebarMultiViewWindowTests on a GUI-capable Mac.
- Exact-head Astra high/fast review still required at 4726064a0669d09e2333b1cd07aca2bd4de09b3e.
- No production overlay was added; the test asserts the existing LayoutRootView drop overlay.
This is a draft until the focused fleet check and exact-head independent review are recorded.
agent-identity footer --repo manaflow-ai/cmux
Agent session: agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds a real-window regression test proving a multi-view sidebar drag keeps the focused workspace focused and every visible row lit for the whole drag, then joins the dragged workspace into the view on drop without moving focus.
Also fixes the test's highlight assertion: litRows now counts the soft fill of a workspace on screen beside the focused one (via WorkspaceRowView.isOnScreen), which SidebarPointerGestureTests.filledRows alone missed.