Repository navigation
feat: load an agent's page on no desk and let its agent drive it - #2701
Merged
Merged
Conversation
…host A page on no desk has no slot on screen, so the host never learned its address or the load the core asked of it. The browser_views rows now carry both (additive; core files touched because the inventory row is the only wire to the host, agreed with the mission's core node).
The desktop host made a page only once a slot on screen showed it, so a page an agent opened while the operator watched another pane stayed pending and hide browser could not drive it. The host now loads a retained web page hidden when the core asks for a load, inside the 12-page cap, and the desk later shows the same contents; hided lets a page on no desk take input. The parked off-desk e2e is rewritten for the desk model and runs.
Chromium gives a page it never showed a 0x0 viewport, so a click on a page loaded off screen landed outside it. Such a page is laid out at the lane's width by device emulation once its document commits, until a slot shows it.
…k page's frame Under per-tab desks an open with the lane closed waits on the desk, so the agent page spec enters with the lane up as the other browser specs do. The docs and the agent help say a page no slot has shown has no pixels yet.
yansfil
marked this pull request as ready for review
November 19, 2026 16:09
…wser commands A page on no desk takes page commands; the phone's picture now reads that rule from the one function the CLI relay uses.
…irst inventory The host keeps the newest load stamp of the core's inventory and sets it from the first sync that carries that inventory, so a relaunch, a shell reload or a device checkout that comes back loads none of its pages at once. One step now creates, remakes or reloads a page on a slot or off screen, and a page with no document is never emulated.
…on its own known_hosts
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 (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 --waittimed outpending, andsnapshot,fillandclickhad 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
pending;hide browsercannot drive itsnapshot,fill,clickwork on itThe Screen row is the candidate window after the operator puts the page on the desk (720 px run of the e2e).
Decide
hide browser screenshoton such a page failsdisplay_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'scapturePagereturns an image. OK to leave as is?Hard to undo
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.browser_views[]rows gainurlandload(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
@platform, but it ran only on macOS here; CI runs it on Windows.remote-browser-agent.spec.tsnow 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.Evidence
desktop/e2e/browser.spec.tsoff-desk test, 1500 and 720 px, on a Playwright-launched candidate from this worktree'sdesktop/distwith private state: a fixtureclaudeagent in a background tab opensform.html --wait→loaded, no tab on the front desk, the operator's page keeps its typed text;snapshot,fill,clicksucceed and the page showssent: 한글 이름; from the agent's tabhide view selectputs the same contents (same contents id) on the desk at the slot's size with the result kept.browser.spec.tshidden-page test: a background pane's page now loads hidden and the operator's keyboard target does not move.browser.spec.tsandbrowser-cdp.spec.ts(21) pass;browser-agent.spec.ts8/8 after entering with the lane up (its 3 page tests failed before, as their opens now wait on a closed desk).browserViews*32; hide-core desk tests 29; hided browser, relay and mobile tests 302; clippy on hided clean.browser.loaded_off_screenand no page until the agent's next command loads it.Tests
browser.test.ts, driven through the sync channel in the shell's real order,browserSync.test.ts), the shell row and itsinventoriedmark (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).compositorPresentsbefore the native capture.Risky files
desktop/src/main/browser.ts- page lifetime: off-screen creation, the cap, release on close, emulation.hided/src/server.rstakes_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).Verification record