Repository navigation
feat: show a pane beside its tab's desk in pair view - #2722
Merged
Merged
Conversation
…ne's own terminal The core now names the pane each desk tab belongs to (owner_pane, one rule for an agent's View and a card) and which panes have something to show beside the desk (pairable), so the pane head, both menus and the card's path line read one answer instead of deciding it in the web. Choosing another pane of a paired tab takes it to the left (B25).
…e each way Also lets a connected device's pane go beside its desk, fills the pressed ◧ with the pair view accent, and keeps the Zoom pane chord from changing the tab's zoom while it is in pair view.
…owing the operator's focus
…d zoom buttons An unfocused pane kept their hidden places between the reload icon and the overflow control, which read as a gap. With them first, the controls always drawn sit at the end and the hidden places join the title's margin.
…e folded desk tabs Entering pair view and every change of its left pane, on this machine or a device, now gives that pane the keyboard, so the keys and pane commands reach the pane on screen. The core lists the desk tabs another agent of the paired tab owns and the web only reads that list; a tab of an agent in another tab stays on the strip. One rule says which panes have something to show, a card's owner is read from borrowed data with the live sessions read once per desk, the marks and the pressed ◧ follow what is drawn, the menus' zoom item is off in pair view, and the desk draws no pin in pair view (D-42).
… desk tab Leaving pair view, or closing the desk's last tab, gives the keyboard back to the pane that held it before entering; a desk tab the operator brings in front moves the left pane and leaves the keyboard on the desk. ◧ counts as pressed only while pair view is drawn, so after ⌘E one press enters again.
…wo-cell button The left cell lists what the agent opened as before; the right cell, ◧, is always drawn and puts the pane beside its desk, filled with the pair view accent while pressed. An agent with no View keeps ◧ alone, and a pane with nothing to show draws neither, so the head no longer shows an off ◧.
…nd keep the keys on the desk A desk tab brought in front in pair view now makes its agent's pane the tab's keyboard pane, so pane commands and the sidebar reach the pane on screen, while the shell leaves the keys on the desk the operator pressed; an entry hands them to the pane first. Pair view's ends are one enum, the pane head's split button reads the views from the same selector as the views chip, and below the narrow breakpoint the button and its border give way together.
… by the pointer's move Over the agents the divider stood inside the lane's 1px left border, so a drag landed a pixel narrower than the pointer moved and a press with no move narrowed the lane. The divider now draws the lane's edge line itself, outside the frame, and a drag moves it by what the pointer moved since it grabbed.
The pair layer reused one pane view for whichever pane was on the left, so a pane chosen from the sidebar took the left and the keyboard pane without the keys reaching its terminal. The view is now keyed by its pane, as on the tab's own canvas.
…view is on screen The shell no longer marks the keyboard ownerless before the core answers an entry; the pair layer tells its pane whether it opened with the layer or took the left since, and only the latter leaves the keys on a desk that holds them.
…e terminal uncovered The lane over the agents carries the page and the tool column, 768 wide, and covers every pane of the 1024 window this test clicked a terminal in.
This was referenced Nov 20, 2026
yansfil
added a commit
that referenced
this pull request
Nov 20, 2026
…#2748) Related: PRD lane-desk-pair-view (B16-B29), operator decisions D-44..D-49 (interview Addendum); follows #2722, part of the `feat/lane-desk` mission. ## Summary ### Problem The operator tried pair view in the integration build and hit four problems. Leaving pair view left the file View floating on the right. Pair view was remembered per Agent tab: ⌃⇥ to another agent dropped it, and coming back to the first tab turned it on again by itself. ⌘E and several other gestures ended it, so it was unclear how to leave. The split was fixed at half and half. The pane head's two-cell button sat in a bordered box, heavier than the head's other icons. In the installed build, closing the lane with ⌘E hid pair view without ending it, so pressing a View on the usual screen later jumped back into pair view. ### Before → After | | Before | After | | --- | --- | --- | | What the user gets | Pair view is a tab's state; ⌘E, the desk's ✕ and the rail fold end it; leaving leaves the desk open; fixed 50/50 | Pair view is one mode for the window: ⌃⇥, the sidebar and a tab switch keep it on the agent gone to; only ⌘., ◧, `원래 화면으로`, the pane closing or the last View closing end it; leaving closes the desk; a draggable divider whose ratio the mode keeps | | Screen |  |  | | Screen (divider) |  |  | | Screen (leave, light) |  |  | | Screen (pane head) |  |   | | Flow | ◧ → pair view → ⌃⇥ / sidebar / tab → **same mode, that agent on the left** → ⌘. → **usual layout, no desk** | | Look at the divider between the terminal and the desk (its ⇆ grip on hover), and the right side after leaving. - Mode location: one saved value, `pair_view {on, ratio}` in `workspace-views.json`, next to the lane's own state; the left pane is runtime only and follows the operator's look. - Per-tab pair memory is gone, with its id-migration row; an older file with a tab's `pair` loads with the mode off. - A pane with nothing to show, a shell or an agent that opened no View, draws its tab's own layout and the mode stays on; pair view opens no record card of its own, and such a pane has no ◧ (D-49). A record card the operator opened counts as the agent's View. - Leaving folds every desk pair view drew, in any Workspace, not only the last one (D-44); a tab it passed drawing the usual screen keeps the lane the operator opened there. - Pair view ends when the left agent's last View closes or leaves the desk, even with the operator's own files still on it (D-46, read by the pane). - D-48: the head's `N views` and ◧ cells are drawn without a box, like the head's other icons, with one hairline between them (`Separator`). - The divider reuses `LaneDivider` (`kind="pair"`): a guide while dragging, one landing and one terminal resize on release. ## Decide - With the mode on and a shell pane in front, nothing on screen says the mode is on, and ⌘. there turns it off with no visible change (D-45 as decided). Add a mark for that state, or keep it quiet? - After leaving, a tool column opened during pair view stays open (only the desk closes). Keep, or close the whole lane? - Pane head light captures: `light-head-1-unfocused` / `light-head-2-in-pair-view` (in the Evidence block). Does the hairline read in light mode? - Is the divider's grip visible enough at rest (it shows on hover only, like the lane's)? ## Not verified - Windows and Linux: no native run; the chord and layout code is shared and CI's web e2e lanes run the spec there. - A device (remote) pane in pair view only through the core test, not a live device. - The Escape check in e2e presses Escape on a desk tab; Escape inside a document editor in pair view was not driven. <details><summary>Evidence</summary> - **Verified**: `web/e2e/pair-view.spec.ts` 3/3 pass, twice in a row; the 16 lane-related web specs (right-lane, lane-desk, s3/s4/s6/s7, close-policy, view-close-focus and others) 204/206 locally, the two `s3` misses timing out on the sidebar's project row while other runs loaded the machine and passing alone; core `cargo nextest` on the pair, desk, workspace view and migration suites (502 tests) pass; `clippy -D warnings` on hide-core clean; web unit tests and the design contract check pass. - Isolated candidate: the desktop host launched through `desktop/e2e/fixture.ts` on a private HOME, state folder and Electron profile, renderer captures of that window in dark and light: pair entered, sidebar follow, divider hover, drag and landing, leaving with no desk, ratio kept on re-entry. - Light pane head:   </details> <details><summary>Tests</summary> - **Layer**: core unit (`hide-core/src/runtime/tests/desk_views.rs`, `workspace_views.rs`) for the mode, its ratio, the follow and the ends; web unit (`workspace.test.ts`) for the split math; e2e (`pair-view.spec.ts`) for the flows only a page shows: the tab switch, ⌃⇥ and the sidebar keeping the mode, ⌘E and Escape not ending it, the divider drag with one resize, the desk closing on leave. - **Catches**: a lane the operator opened on a tab pair view did not draw closed by the mode passing; pair view left on, hidden, after the left agent's last View closed beside the operator's file; the mode left on, hidden, after the last View of a pane with no session closes; a desk in another Workspace left open after leaving; a record card opened for an agent with no View; a core that treats the desk as drawn while a shell is on screen (unseen Views marked seen, a desk tab opening pair view, the mode ending on an emptied desk), a lane left open on a desk pair view put a record card on, the paired terminal resized by Expand, a tab-level pair coming back on return (the off-stays-off steps), a hidden pair view drawn again when a desk tab is pressed on the usual screen, ⌘E closing the lane in pair view, a resize per pointer move, the ratio lost on leave. - **Repeat**: the pair spec ran five times across the changes; a run of the lane-related specs alongside it had not finished when this opened. - **Waits**: `quietFor` 300-500 ms where the spec proves something did not happen (⌘E, Escape, a second resize). </details> <details><summary>Risky files</summary> - `hide-core/src/runtime/look.rs`: every completed selection now runs `follow_pair_look`, which returns at once while the mode is off. - `hide-core/src/workspace_views.rs`: saved file shape (`pair_view` at the top level; trays lose `pair`). - `hide-core/src/runtime/pair_view.rs`: the mode, its ends and its follow. - `web/src/LaneDivider.tsx`, `web/src/workspace.ts`: shared divider and lane frame; `laneFrame` now carries the paired pane's width in the expanded frame too. </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: PRD lane-desk-pair-view (B16-B29, D-41); stacked on #2705 (desk), part of the
feat/lane-deskmission.Summary
Problem
An agent's terminal and the documents it opened could not be seen side by side without rearranging panes.
The desk only floats over the agents, so reading a plan while watching the agent that wrote it meant flipping back and forth.
The mission's approved PRD asks for one gesture that puts a pane beside its tab's desk, unmistakably, and one gesture back to the same layout.
Before → After
Look at the blue strip at the top of the body, the ◧ before the tab name and on the sidebar row, and the filled ◧. The desk's pin is a way in only and is not drawn in pair view (D-42).
다른 것 N ▾, grouped by agent; the core names them (D-41). A tab of an agent in another tab stays on the strip, like the operator's own.뷰 N개and ◧ are one two-cell button, always drawn (D-43): the left cell lists the agent's Views, the right enters pair view and is filled blue while pressed. A pane with nothing to show draws neither; the right side keeps only zoom, … and ✕.pairable, one rule shared with the entries), which agent each desk tab belongs to (owner_pane) and which tabs fold (folded); the web'scardOwnerPaneis gone (B24).Decide
--pair-view,--pair-view-band) from the approved mockup. Is the strip strong enough in light mode?Hard to undo
pairable, per-displayowner_paneand the pair view'sfolded(all omitted when empty).Not verified
Evidence
web/e2e/pair-view.spec.ts, 3 tests, pass on an isolated hided, 2 runs each on the last head (6/6): entries by ◧ on a pane without the keyboard, the pin and ⌘., the left pane taking the keyboard after each and giving it back on leaving, a desk tab chosen keeping it, ◧ once after ⌘E, the off ◧'s hint, ⌘. on a shell sending nothing, one owner, the owner-less tab, the fold menu, sidebar choice, no pin in pair view, another tab and a daemon restart, the way back, and the left pane closing.terminal_resizeframes the page sends and the probe's live terminals.desk_views, pair, detail and issue tests, 189 pass, including seven new ones (owner pane of a card and a View,pairableleaving out a plain shell, the pair following the operator's focus here and on a device, the keyboard on entry and back on leaving, the folded tabs, another tab's agent staying on the strip).Pane head, unfocused / pointed at / focused / in pair view:
Tests
pairable.--repeat-each 39/9 on 34bc6ae and--repeat-each 26/6 on the last head, locally; CI repeat job on the PR.quietFor(500)three times (every pane's first fit before the sizes are taken; no second resize after entry; none after the return) andquietFor(300)once (a refused ⌘. on a shell would have sent its event); onetoBeVisible({ timeout: 20_000 })withwait-okfor the restarted daemon drawing pair view again; the rest are Playwright expectations on attributes.Risky files
hide-core/src/runtime/session.rs,agents.rs- an operator focus, local or a device's, now moves the pair view;pair_view.rsgives the left pane the keyboard (work under the runtime mutex).hide-core/src/runtime/workspace_view.rs,view_areas.rs-pairable,foldedandowner_panecomputed on every Workspace view publish, from borrowed data with live sessions read once per desk (snapshot wire).web/src/PaneGrid.tsx- the paired tab's canvas parks its terminals; the pair layer draws the left one.Verification record
feat/lane-desk, head 8965364.pnpm exec tsc --noEmit, eslint (src, e2e), vitest on shortcuts, shortcutsDoc, PaneRelations, actions, TabBar and desktop menu: pass.node scripts/check-design-contract.mjs: pass.