Skip to content

feat: show a pane beside its tab's desk in pair view - #2722

Merged
yansfil merged 15 commits into
feat/lane-deskfrom
m78-pair
Nov 20, 2026
Merged

yansfil merged 15 commits into
feat/lane-deskfrom
m78-pair

Conversation

@yansfil

@yansfil yansfil commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Related: PRD lane-desk-pair-view (B16-B29, D-41); stacked on #2705 (desk), part of the feat/lane-desk mission.

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

Before After
What the user gets The desk floats over the agents; a pane and its View never share the screen ◧, the desk's pin or ⌘. (Ctrl+Shift+. on Windows/Linux) puts the pane on the left half, with the keyboard, and its agent's View on the right
Screen before after
Screen (light, others menu) light
Flow ◧ on the pane head → left: the pane's own terminal, right: its View, strip + tab mark + sidebar mark → 원래 화면으로 ⌘. → same layout and sizes

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).

  • Each side keeps one owner: bringing another agent's desk tab forward moves that agent's pane to the left; the operator's own tabs leave the left pane (D-09, D-21).
  • In pair view the desk folds the tabs of another agent of the same Agent tab into 다른 것 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.
  • Choosing another pane of the tab from the sidebar, on this machine or a device, takes it to the left, or ends pair view when it has nothing to show (B25).
  • Pair view is the tab's own: it survives another tab and a restart, and ends without notice when its pane closes (B27, B28).
  • The terminal is moved, not copied, and its grid changes once on entry and once on exit; the tab's layout and zoom are untouched.
  • On the pane head, 뷰 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 ✕.
  • The core now decides which panes have something to show (pairable, one rule shared with the entries), which agent each desk tab belongs to (owner_pane) and which tabs fold (folded); the web's cardOwnerPane is gone (B24).
  • The left pane takes the keyboard on entry and when chosen from the sidebar; a desk tab chosen keeps it on the desk; leaving gives it back to the pane that had it before (B26).
  • Closing the lane with ⌘E takes the marks and the pressed ◧ with it; one ◧ or ⌘. then enters again. The menus' Zoom item is off with why in pair view.

Decide

  • The pair view accent is a new blue token pair (--pair-view, --pair-view-band) from the approved mockup. Is the strip strong enough in light mode?
  • The pair layer covers the whole body under the Agent tab row, including other View areas. Expanding the lane in pair view keeps the left pane at half so its terminal does not resize.
  • Escape does not close the lane while in pair view, and the Zoom pane chord does nothing there (D-16).

Hard to undo

  • New wire fields on the Workspace snapshot: pairable, per-display owner_pane and the pair view's folded (all omitted when empty).
  • New default chord ⌘. / Ctrl+Shift+. for Pair view; it is editable like the other pane commands.

Not verified

  • A connected device's pane in pair view (B31): the layer, the device canvas, the left pane's keyboard and the sidebar choice go through the device's focus request in code; no device run was made.
  • Windows and Linux: chord labels are unit-tested; the screen was only run on macOS.
Evidence
  • Verified: 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.
  • Verified: one grid change each way for the left pane, none for the hidden shell, the same live terminal set before and after (no copy), and every pane's box and grid equal after leaving; counted from the terminal_resize frames the page sends and the probe's live terminals.
  • Verified: core desk_views, pair, detail and issue tests, 189 pass, including seven new ones (owner pane of a card and a View, pairable leaving 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).
  • Verified: captures from the isolated candidate desktop app (Electron, private HOME, state folder and daemon), Korean, dark and light.

Pane head, unfocused / pointed at / focused / in pair view:

unfocused
hover
focused
pair view

light pair view
back to the usual view

Tests
  • Layer: e2e for the screen flow (the terminal's move, its grid and the marks are only visible in a browser); core unit tests for ownership and pairable.
  • Catches: a terminal remounted as a copy (live set changes), a resize on a hidden pane, a desk tab of another agent left on the strip, the keyboard left on a hidden pane, ⌘. entering from a shell, the pair view not surviving a restart.
  • Repeat: --repeat-each 3 9/9 on 34bc6ae and --repeat-each 2 6/6 on the last head, locally; CI repeat job on the PR.
  • Waits: quietFor(500) three times (every pane's first fit before the sizes are taken; no second resize after entry; none after the return) and quietFor(300) once (a refused ⌘. on a shell would have sent its event); one toBeVisible({ timeout: 20_000 }) with wait-ok for 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.rs gives the left pane the keyboard (work under the runtime mutex).
  • hide-core/src/runtime/workspace_view.rs, view_areas.rs - pairable, folded and owner_pane computed 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
  • Base 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.

…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.
…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.
Base automatically changed from m78-desk to feat/lane-desk November 20, 2026 01:42
…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.
@yansfil
yansfil merged commit 22e84f1 into feat/lane-desk Nov 20, 2026
51 checks passed
@yansfil
yansfil deleted the m78-pair branch November 20, 2026 05:38
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 |
![before](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/f686e6c/dark-1-before.png?raw=true)
| ![sidebar
follows](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/f686e6c/dark-3-sidebar-follows.png?raw=true)
|
| Screen (divider) |
![dragging](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/f686e6c/dark-5-divider-dragging.png?raw=true)
|
![dragged](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/f686e6c/dark-6-divider-dragged.png?raw=true)
|
| Screen (leave, light) | ![left, no
desk](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/f686e6c/dark-7-left-no-desk.png?raw=true)
| ![light, ratio
kept](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/f686e6c/light-1-pair-ratio-kept.png?raw=true)
|
| Screen (pane head) | ![head
before](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/fddf18b/dark-1-pane-button-off.png?raw=true)
| ![head
after](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/d879378/dark-head-1-unfocused.png?raw=true)
![in pair
view](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/d879378/dark-head-3-in-pair-view.png?raw=true)
|
| 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: ![light
head](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/d879378/light-head-1-unfocused.png?raw=true)
![light head in pair
view](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair-mode/d879378/light-head-2-in-pair-view.png?raw=true)

</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant