Repository navigation
feat: keep Views on a desk per Agent tab - #2672
Merged
Merged
Conversation
…b desks The shelf takes its own area id so the first desk numbers from a1, and a command's area names a desk only. Tests compile against the desk model; the runtime suites that assert the checkout-wide list are rewritten next.
…through restarts and tab closes
…d the split/move refusal
…and test pair view and the split/move refusal
…m the web shell The viewing column draws the front Agent tab's desk; a card is a tab of the desk's View areas, drawn by CardBody and named by cardTitle. The rail counts this tab's desk, the slot's rail button, head, back and close are gone, and the Workspace lane no longer pins. Practice worlds, gallery scenes and unit fixtures follow the new wire.
… tabs Card flows find a card by its tab body and close it with its tab's x; the slot's back and close, the pin, docking and the checkout-wide bookmarks spec are gone with their behavior. Stored-state reads follow schema 6's per-tab desks. UI_BEHAVIOR's lane section drops the pin and the slot, and the UI parts baseline drops the removed controls.
yansfil
marked this pull request as ready for review
November 19, 2026 11:27
…st from the names allowlist
…maining e2e flows An open from the watched pane now waits on the desk with the lane closed, so flows that open a file through the CLI bring the desk up from the rail. The overlay covers the right of the agents, so live-pane clicks go to the first pane, and a keyboard walk leaves an editor without the Escape that puts the overlay away. A record card stays on its tab's desk after its pane closes. Desktop flows drop the pin and expect no terminal resize from the overlay divider; the pinned narrow-window test goes. Shard tables drop the deleted tests, and the overview chapter ends a step earlier.
… and park the background page test An open from the watched pane comes in front of its tab's desk only while the lane is up, so the desktop flows that open a page or file through the CLI enter their Workspace with the lane up, or bring the desk up from the rail where the Explorer would change the widths they measure. The test of a page shared across Agent tabs through a background open waits for pages that load off the desk.
… button's wait The desk button waits for an open typed into a pane to land, which only a time bound expresses; the closed pane's view goes with the next snapshot. The timed-waits baseline drops to what the tree holds.
…esk's card undrawn
…each tab shows its own desk
The lane remembers, per Workspace, the page it last drew in front of the desk (at most 256 Workspaces), and a lane call widens it only for a page it did not draw last: closing and opening the lane or folding and unfolding the desk over the same page keeps the width the operator dragged, while a page an agent opened as the lane was closed still widens when the desk button brings it up. The gallery's pinned lane states, the retired lane slot selector and the stale pin and slot wording go.
Folding the desk ends the core's read of the card in front of it, and the record card, finding no read behind it, asked for one with an open that brought the desk back up. A record card now asks only while it is the card the core reads. The mission map flow gives the keyboard back to the Conductor's pane before a new Agent tab, since the shortcut in a card on the desk opens a View tab there.
…the work map A start circle took only its own circle's room in the placement, while a session's words reach farther below its circle than its room, so the circle could land under a session's box and a press hit the session instead (overview-start failed the same way on main). The start circle's room now reaches a gap past the farthest corner of a root's or a child's box.
yansfil
added a commit
that referenced
this pull request
Nov 20, 2026
Related: PRD lane-desk-pair-view (B32, D-37); stacked on #2672 (core). ## Summary ### Problem With a desk per Agent tab (#2672), a page an agent opens while the operator watches another pane lands on no desk. The desktop app made a page only once a slot on screen showed it, so that page never loaded: `hide browser open --wait` timed out `pending`, and `snapshot`, `fill` and `click` had nothing to drive. The same held for a page on the desk of a tab or Workspace not in front. Found while building core; core parked its e2e on it (`browser.spec.ts:275`). ### Before → After | | Before | After | | --- | --- | --- | | What the user gets | An agent's page on no desk stays `pending`; `hide browser` cannot drive it | It loads hidden; `snapshot`, `fill`, `click` work on it | | Screen | (the page was never loaded) |  | | Flow | Agent opens page → **pending until shown** → load | Agent opens page → **loaded off screen, driven** → put on the desk → same page, nothing reloads | The Screen row is the candidate window after the operator puts the page on the desk (720 px run of the e2e). ## Decide - Only a load asked after the window has the core's inventory loads off screen: the host keeps the newest load stamp of that inventory (core stamps rise strictly), so a relaunch, a shell reload or a device checkout that comes back loads none of its pages at once; they load when shown or when an agent drives them. - A page Chromium never showed has no pixels: `hide browser screenshot` on such a page fails `display_hidden` ("ask the operator to show it") after the 8 s step; input and reads work. Measured on Electron 44.4.5: neither CDP capture nor Electron's `capturePage` returns an image. OK to leave as is? ## Hard to undo - Resident work: pages no slot shows now count in the existing 12 live pages (`MAX_LIVE_VIEWS`); past it the hidden page shown or loaded longest ago is unloaded, as before. No new timer: the off-screen check runs inside the existing sync over the retained rows and keeps one number. - Wire: `browser_views[]` rows gain `url` and `load` (additive). Core files are touched because that row is the only wire to the host; agreed with the mission's core node. Built on the existing inventory rebuild, which runs only on a View store generation change, outside the lock's serialization. ## Not verified - Windows and Linux: the host change is platform-neutral (no OS branch) and the off-desk e2e is `@platform`, but it ran only on macOS here; CI runs it on Windows. - Only the browser, browser-agent and browser-cdp desktop specs ran locally (29 tests, all pass after the fixes here); the rest of the desktop and web e2e suites did not. - Rust: only the desk tests of hide-core (29) and the browser and new relay tests of hided (64) ran; full lanes and clippy are left to CI. - A device pane's page on no desk (B31): `remote-browser-agent.spec.ts` now has that case, but no CI lane runs this spec and it did not finish here: against a local isolated sshd the device link came up (after pointing the fixture's SSH config at its own known_hosts, which ssh otherwise reads from the account's home), then the device project's registration timed out, a step before the new case. - Follow-up: an off-desk page an agent keeps driving is not counted as used for the 12-page cap, so twelve newer pages can unload it and lose what was typed (the agent's next command loads it again). Counting an agent's connection as use is left for a follow-up. <details><summary>Evidence</summary> - **Verified**: `desktop/e2e/browser.spec.ts` off-desk test, 1500 and 720 px, on a Playwright-launched candidate from this worktree's `desktop/dist` with private state: a fixture `claude` agent in a background tab opens `form.html --wait` → `loaded`, no tab on the front desk, the operator's page keeps its typed text; `snapshot`, `fill`, `click` succeed and the page shows `sent: 한글 이름`; from the agent's tab `hide view select` puts the same contents (same contents id) on the desk at the slot's size with the result kept. - `browser.spec.ts` hidden-page test: a background pane's page now loads hidden and the operator's keyboard target does not move. - `browser.spec.ts` and `browser-cdp.spec.ts` (21) pass; `browser-agent.spec.ts` 8/8 after entering with the lane up (its 3 page tests failed before, as their opens now wait on a closed desk). - Desktop unit 340 passed (+4 skipped); web `browserViews*` 32; hide-core desk tests 29; hided browser, relay and mobile tests 302; clippy on hided clean. - After review: the 1500 px off-desk e2e relaunches the app with another page on no desk and sees no `browser.loaded_off_screen` and no page until the agent's next command loads it. - Found on the way: a never-shown page has a 0 x 0 viewport (clicks land outside it), and emulating a page before its first commit stalls the Electron main process; both measured with a throwaway Electron probe, fixed by laying the page out by emulation from its first commit. </details> <details><summary>Tests</summary> - **Layer**: unit for the host's rules (`browser.test.ts`, driven through the sync channel in the shell's real order, `browserSync.test.ts`), the shell row and its `inventoried` mark (`browserViews.test.ts`, `browserViews.attachment.test.ts`), core's wire (`a_page_on_no_desk_names_its_address_and_load_for_the_host`), hided's input rule (`a_page_on_no_desk_takes_input_and_another_checkouts_page_is_missing`); e2e for the flow, since only a real Electron shows whether an off-screen page lays out and takes clicks (it did not, twice, while unit tests passed). - **Catches**: saved pages loaded at once after a relaunch, a reload or a device reconnect (planted: a baseline of 0 → the first unit test and the relaunch e2e fail; an empty pre-snapshot sync moving the baseline → the first unit test fails; no reset on shell reload → the reload test fails); a device-sized page emulated before its document (planted → the device test fails); a just-loaded page evicted first (the cap test); a page off screen that does not load or cannot be clicked (the e2e). - **Repeat**: CI's repeat job ([run 44562857281](https://github.com/with-hide/hide/actions/runs/44562857281)) on the first head; locally the off-desk e2e passed 3 runs in a row at 720 px and 4 at 1500 px, and both widths again after the review fixes. - **Waits**: none added; one `compositorPresents` before the native capture. </details> <details><summary>Risky files</summary> - `desktop/src/main/browser.ts` - page lifetime: off-screen creation, the cap, release on close, emulation. - `hided/src/server.rs` `takes_input` - which displays take an agent's input and a phone's picture (`mobile/page_shot.rs`). - `desktop/e2e/device-home.ts` - the SSH fixture's config now names its own known_hosts. - `hide-core/src/model.rs`, `runtime/workspace_view.rs` - snapshot wire (additive fields). </details> <details><summary>Verification record</summary> </details>
yansfil
added a commit
that referenced
this pull request
Nov 20, 2026
…r view (#2705) 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 |  | | 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. <details><summary>Evidence</summary> - **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.  Closed lane: the desk button counts this tab's 2 Views; `2 views` and `1 view` on the pane heads, ◧ beside zoom.  The desk button's hint: `Documents · Claude · 2 views open`.  The `…` menu leads with `Talk to another agent` (@) and `Pair view`.  The pane beside's `1 view` list; its row puts todo.md on this tab's desk.  Three desk tabs, names only; the 볼 것 eye leads an unseen one.  The keyboard in the pane beside: the desk is unchanged.  The second Agent tab shows its own desk, empty; the desk button is off.  Four tabs: the front one reads whole, the others shrink to their marks, each naming itself whole on hover.  A PR card tab reads `PR #31`; the path line `PR #31 · 머지할 수 있는 PR`; `View on GitHub` is its one GitHub button. </details> <details><summary>Tests</summary> - **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 #2720. </details> <details><summary>Risky files</summary> - `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. </details> <details><summary>Verification record</summary> 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). </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 (core, hided and web adapter half: B1, B2, B4, B9-B12, B27-B28, B33-B35); the desk node builds on this branch for the new screens, e2e and captures.
Summary
Problem
The right lane kept one checkout-wide list of Views, a separate card slot per pane and a pin that docked the lane.
Where an agent's open landed and what the operator saw depended on three rules, so a background agent's page could jump in front of the work the operator was watching, and switching tabs never changed what the lane showed.
The PRD replaces all three with one desk per Agent tab.
Before → After
No screenshot: the desk node draws the new screens and takes their captures (Conductor decision); this PR keeps the existing lane drawing working on the new model.
hide view splitandmovenow refuse a View that is on no desk, with anot on deskreason, andhide guidestates the new rule.The Overview's work map also keeps each project's start circle clear of every session: the circle was placed with only its own room while a session's words reach farther below its circle, so it could land under a session and a press opened the session instead (
overview-start.spec.tsfailed the same way on main locally).Decide
slot_cards.droppeddiagnostic, since a card can be opened again. Conductor decision.Hard to undo
workspace-views.jsonmoves to schema 6 (traysper Agent tab plus a shelf) once on first start;documents,pinned,detail_width,view_layoutandui_state.detailare no longer written, so an older build reads the new file as an empty lane.trays[].tab,trays[].pair.pane, the desks' and the shelf's Views, andmoving_cardsincore-state.json) throughnode_migration::KEYS.Not verified
overview-start.spec.ts(three runs with an isolated state folder, 9 passed); CI runs the web suite and the desktop@platformtests on Windows (Conductor decision).desktop/e2e/browser.spec.ts:275(both widths),test.fixme, "B32: 책상 밖 페이지 로드는 host 노드".desktop/e2e/remote-workspace.spec.ts:130opens pages from a device pane while the local Workspace is in front; whether it needs B32 is unchecked (macOS only).docs/INSTALL.mdsays so in the card cell with what closes it.docs/UI_BEHAVIOR.mdstill names the 보기 slot in the missions, tasks and Overview sections (about 23 lines); the desk node rewrites them with B36.Evidence
test_agent_live_protection, which needs Linux'sos.waitid.a_desk_and_its_pair_view_follow_their_tab_and_pane_to_the_new_owners_ids); it fails with thetrays/*/tabrow removed.claudethat the engine registers as Claude Code. With tab 1 in front and its pane selected, tab 2's agent ranhide file open notes.md: the front desk stayed empty (count 0, no display) andhide view listshowed the View off every desk. Tab 1's agent then ranhide file open other.md: it landed on tab 1's desk (count 1) and the closed lane stayed closed.hide guidestates the watched-pane rule and thatview split/movearrange only Views on the tab's desk.Inventory cells this PR changes or deletes:
detail_widthdeleted), R36 (an agent open never calls a closed lane).←, no slot head); S05 slot cards move to the tab desk once; S08, S09, S21 a card opens as a desk tab; S23 a card whose subject is gone keeps its tab; S24 reads follow the card tab in front.not on desk, guide rewritten; A13 a row opens on its agent's tab desk.Moved e2e:
view-bookmarks.spec.tsnow checks the new rule (a background agent's open leaves the desk, its front tab, the Agent tab and the lane as they were; each Agent tab shows its own desk).Deleted e2e (behavior gone): right-lane "the pin docks the lane once..."; overview-device "a record shown in the lane's 보기 slot stays through pin, unpin and a window too narrow to dock the lane"; the narrow-window pin steps in
s6.spec.tsands7.spec.ts; unitTools.test.tsx(pin only).Deleted desktop e2e: right-lane "a pinned lane stacks its columns in a narrow body..." and the pin steps of the other desktop right-lane, new-tab, memory-reconcile, session-work-ledger, terminal-links and browser page-width tests.
Moved e2e: the slot's
←and✕became closing the card tab (session-work-ledger, link-graph, mission-map, sidebar-status);[data-detail]lookups became[data-card]; docked expectations became overlay, where a click on a live pane goes to the first pane the lane leaves uncovered and the overlay divider resizes no terminal; stored reads followtrays; an open from the watched pane waits on the desk until the rail's desk button brings it up (right-lane, mission-merge-owner); a record card stays on its tab's desk after its pane closes (session-record-restore).Practice: the Overview chapter's pin step is removed (chapter version 5 → 6, so saved progress restarts that chapter, which now ends at step 8 with three tasks); the mission and find chapters point at the card tab and its ✕.
Tests
view-bookmarks.spec.ts).a_background_agents_open_lands_on_no_desk_and_moves_nothing); a schema 5 file losing documents or comments (a_schema_5_checkout_moves_its_documents_to_the_tab_last_seen_once); slot cards lost on upgrade (the_slots_an_older_build_kept_move_onto_their_panes_desks_once), or documents closed for them (a_slot_moving_onto_a_full_desk_closes_no_document_and_keeps_its_newest_cards); a desk left on an old tab id after a core move; an agent's View the cap takes off a desk vanishing (an_agents_view_the_cap_takes_off_a_desk_stays_in_its_panes_list); a start circle under a session's circle or words, over 40 maps with different ids (overviewGraphLayout.test.tsx, fails with the old room).wait-okbecause two agents start before its first step.Risky files
hide-core/src/workspace_views.rs- saved state format and the one-time migration.hide-core/src/node_migration.rs,node_migration/reown.rs- ownership: the new keys a core move rewrites.hide-core/src/runtime/view_callers.rs- who counts as watched decides every agent open's placement.hide-core/src/runtime/desk and card handling - work under the runtime mutex on every open and tab switch.web/src/workspace.ts,web/src/ViewAreas.tsx- snapshot wire for the lane.Verification record