# Split chat workspace primitives `chat_workspace.dart` exposes `ChatWorkspace`, `ChatWorkspaceController`, pane/split node types and `ChatSplitAxis`. The visit-local controller opens/replaces the active pane, focuses an already-open chat, splits the active pane to its right or below, replaces a session identity after `/new`, activates panes and closes/collapses splits. Pane IDs survive tree edits. The renderer computes tree geometry but keeps every chat view as a stable keyed sibling in one Stack. Nested splits, divider drags and closing adjacent panes never reparent the existing chat view. When the viewport cannot fit the tree's minimum sizes, only the active chat paints, with all other leaves retained offstage and excluded from focus. The root screen supplies its pane switcher and per-pane bars. Each divider has a 12px grab area, a native theme separator, horizontal/vertical resize cursors, pointer dragging, arrow-key adjustments, accessibility increase/decrease values and double-click reset. Geometry clamps visible panes to 240px wide and 200px high while preserving the saved ratio across viewport changes. Ctrl+Shift+Arrow navigates spatially between panes. Command+Shift+Arrow also works on macOS. Chords are consumed at edges so they do not alter composer selection. The handler is gated by workspace focus and `shortcutsEnabled`; pointer activation does not request composer focus. The owner supplies `onFocusPane` for keyboard-only composer focus after layout. No sockets, requests or timers are introduced by these primitives. Checks: bounded analysis clean; eight watchdog tests passed, peak663MB,3s (`/tmp/memwatch/out.7uae7k`). Tests assert actual horizontal/vertical dragging and clamping, nested close collapse, leaf State/draft identity, narrow fallback/restoration, keyboard divider resizing/reset, spatial geometry, Ctrl navigation and macOS Command navigation without changing drafts. Commands from app/: `tool/analyze.sh lib/features/chat/workspace test/features/chat/workspace` and `tool/memwatch/full.sh 'test/features/chat/workspace --no-pub'`. Full-app integration and rendered captures are the manager's next check; no production services or chats were touched. ## Moving panes Each tiled pane's More menu has **Move up**, **Move down**, **Move left** and **Move right** (Material lists the chord beside each). A move swaps the pane with the one across that edge: `ChatWorkspaceGeometry.adjacent` takes the pane separated only by a divider, preferring the one spanning the moved pane's centre line, then the longest shared edge, then reading order. A direction with no pane is disabled (Cupertino's action sheet leaves it out). Single panes and the phone's one-at-a-time layout offer nothing. Swapping was chosen over detach-and-reinsert because it keeps every split's id, axis and ratio, so tile sizes never change. `ChatWorkspaceController.swap` trades the two leaf nodes in the tree. Pane ids stay with their chats, so the keyed sibling views (scroll, composer draft, running turn) are reused, and the moved chat stays active and focused. The binding persists the swapped tree like any other edit (the federated store writes the same snapshot). `ChatPaneMoveMotion` glides the two retained views between their tiles over `Motion.standard`; reduced motion swaps instantly. Keyboard: Ctrl+Alt+Shift+Arrow (Command+Option+Shift+Arrow on macOS, where Ctrl also works) moves the active pane. It extends the Ctrl/Command+Shift+Arrow focus chord, is consumed at outer edges, and does not clash with Ctrl+Tab, Alt/Ctrl+T or Ctrl+1–9. Linux desktops that bind Ctrl+Alt+Shift+Arrow to "move window to workspace" keep that chord for themselves; the menu still works there. Checks: analysis clean; `tool/memwatch/full.sh 'test/features/chat test/shell'` 1328 passed (peak 1911 MB). New tests: `test/features/chat/workspace/chat_pane_move_test.dart` (nested adjacency, edges, swap both ways, persistence round trip, chord, mid-glide state/draft, reduced motion) and `test/features/chat/chat_pane_move_test.dart` (menu items enabled/disabled with shortcut, state/draft/stream/focus kept, persisted order, keyboard move, phone shows none). Fixture captures at 1280x800 (`chats=3&rich=1&colors=1`): before, menu open, after Move left, menu after. In headless Chrome the chord glyphs are tofu, and a right-edge menu is sized too narrow, until the symbol fallback font has loaded once.