Skip to content

feat: draw an Agent tab's desk, its card tabs and the pane head's pair view - #2705

Merged
yansfil merged 25 commits into
feat/lane-deskfrom
m78-desk
Nov 20, 2026
Merged

yansfil merged 25 commits into
feat/lane-deskfrom
m78-desk

Conversation

@yansfil

@yansfil yansfil commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Related: stacked on feat/lane-desk (the core's desk, #2672); paired with with-hide/hide-private#952, which rewrites the 보기 slot section of docs/tasks-and-pr-list.md into card tabs on a desk.

Summary

Problem

The core keeps one desk per Agent tab and opens cards as tabs on it, but the screen still drew the old shape.
Card tabs carried the project in their names, the rail counted every tab's Views, the pane head kept @ beside zoom with no pair view, and Escape in the lane closed it even from inside a document's editor, so the editor had no keyboard exit.
Only the desk's front card is read, yet a record or PR card in another area spun until pressed.

Before → After

Before After
What the user gets Card tabs PR #N · project, Record · <title>; rail counts all tabs; @ on the head Short card tabs (PR #N, 기록) and a path line naming the card's target and owner; rail counts this tab's desk; @ and pair view in …, ◧ beside zoom
Screen Card tabs read PR #N · project; the rail counted every tab's Views; @ sat on the pane head desk with a record card tab
Flow rail desk button → keyboard in the editor → Escape closes the lane rail desk button → keyboard on the front tab → Escape closes the lane; in the editor Escape, Tab leaves it

Look at the desk's tab strip (the front tab whole, the others shrunk), the path line (Session record · Claude with its owner's logo) and the pane head's right side.

Decide

  • A card shows its agent's logo (hint 이 카드의 에이전트) only when an agent here owns it by the core's rule (a record's or a plan's session, a mission's Conductor, the agent that made a pull request); a card with no such agent, such as a person's pull request, has none. Matches the mockup?

Not verified

  • The pair layer itself: ◧ sends pair_view to the core and node pair draws it; where ◧ is offered is decided in two places (web and core), which node pair folds into the core.
  • A card's owner is read in the web from the same rows the core's detail_owner_pane reads (web/src/cardTitle.ts cardOwnerPane, held equal by cardTitle.test.ts); node pair moves it onto the card's display from the core (B24), so the rule lives in one place.
  • A pane of a connected device (B31): no e2e here; node together checks it.
  • The 볼 것 press (B4) has a core test only, no e2e.
  • The packaged desktop window: captures come from the web shell on a private hided in headless Chromium.
  • Windows and Linux: web-only change with no system-specific code; covered by CI's lanes, not run here.
Evidence
  • Verified: Playwright e2e on a private hided per test (own HIDE_STATE_DIR, debug build): lane-desk, work-prs, agent-reference-drop, right-lane, lane-last-tool, mission-map, session-record-restore, view-bookmarks, 36/36 on 688f717, and lane-desk, tab-strip-fit, work-prs, mission-map, view-opener, overview-map again on b9f7367; web unit tests 3086 passed; web typecheck, lint and design contract.

rail and pane heads
Closed lane: the desk button counts this tab's 2 Views; 2 views and 1 view on the pane heads, ◧ beside zoom.

rail hint
The desk button's hint: Documents · Claude · 2 views open.

pane menu
The … menu leads with Talk to another agent (@) and Pair view.

views list
The pane beside's 1 view list; its row puts todo.md on this tab's desk.

three tabs
Three desk tabs, names only; the 볼 것 eye leads an unseen one.

other pane
The keyboard in the pane beside: the desk is unchanged.

second tab
The second Agent tab shows its own desk, empty; the desk button is off.

crowded desk
Four tabs: the front one reads whole, the others shrink to their marks, each naming itself whole on hover.

PR card tab
A PR card tab reads PR #31; the path line PR #31 · 머지할 수 있는 PR; View on GitHub is its one GitHub button.

Tests
  • Layer: e2e for the desk across panes and Agent tabs, the rail count, the crowded strip and Escape, which need a real daemon's desk and real keys; unit for the strip's widths, the pane menu's offers and a record card out of front.
  • Catches: a desk that follows the keyboard to another pane (B8), a tab showing another tab's desk (B9), a rail count of every tab (B2), a front tab cut short on a crowded desk (D-30), the rail press leaving the keyboard in the editor, the @ list taking the keyboard from where a press landed, a record out of front spinning or reading.
  • Repeat: lane-desk, right-lane, lane-last-tool, agent-reference-drop x3, 39/39 on cd63a8d; the crowded desk test x3, 3/3.
  • Waits: none new besides Playwright's own expect polls.
  • Not ours: on 0fad84c the repeat lane failed work-prs.spec.ts:192 once in three, at teardown (hided … did not stop in hided-fixture.ts:87, from openWork); that test is unchanged here and passed its other two runs; it fails 1 in 30 on the base too, recorded as test: work-prs unreadable facts spec reads before the next poll after a fake gh failure #2720.
Risky files
  • web/src/components/ui/tooltip.tsx - a hint's Escape dismiss is marked so the lane, Desk and the mission map still answer the same press (escapeConsumed).
  • web/src/AreaTree.tsx, web/src/areaLayout.ts - the View strip measures the front tab's whole name on every fit change; Agent and Desk strips pass no need and keep their stages.
  • web/src/deskFront.ts, web/src/PrCard.tsx, web/src/SessionRecord.tsx - one place says which card the core reads; cards out of front keep their last drawing, eight each.
Verification record

PRD agents/prd/lane-desk-pair-view/prd.md (local), base feat/lane-desk, head 0fad84c. Review round 1 (5c7d1ec): findings 1-6 and 8 fixed here; 7 handed to node pair. Review round 2 (864dc79): A (card owner rule and hint) fixed in 26430ee, the core display field handed to node pair; the front tab's name measured one way (6bc9f3b).

Base automatically changed from m78-core to feat/lane-desk November 19, 2026 22:48
@yansfil
yansfil marked this pull request as ready for review November 19, 2026 22:57
# Conflicts:
#	docs/ARCHITECTURE.md
#	docs/PERFORMANCE_TESTING.md
#	docs/UI_BEHAVIOR.md
#	web/src/SessionRecord.test.tsx
#	web/src/SessionRecord.tsx
#	web/src/Tools.tsx
…ded, and let cards out of front wait quietly
…, and expect the View strip's whole front name
@yansfil
yansfil merged commit 7a8029f into feat/lane-desk Nov 20, 2026
119 of 122 checks passed
@yansfil
yansfil deleted the m78-desk branch November 20, 2026 01:42
yansfil added a commit that referenced this pull request Nov 20, 2026
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](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/fddf18b/dark-1-pane-button-off.png?raw=true)
|
![after](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/fddf18b/dark-2-pair-view.png?raw=true)
|
| Screen (light, others menu) | |
![light](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/fddf18b/light-3-others-menu.png?raw=true)
|
| 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.

<details><summary>Evidence</summary>

- **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](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/8965364/head-1-unfocused.png?raw=true)

![hover](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/8965364/head-2-hover.png?raw=true)

![focused](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/8965364/head-3-focused.png?raw=true)
![pair
view](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/8965364/head-4-pair-view.png?raw=true)

![light pair
view](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/fddf18b/light-2-pair-view.png?raw=true)
![back to the usual
view](https://github.com/yansfil/pr-assets/blob/main/hide/m78-pair/fddf18b/dark-4-back.png?raw=true)

</details>

<details><summary>Tests</summary>

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

</details>

<details><summary>Risky files</summary>

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

</details>

<details><summary>Verification record</summary>

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

</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