Skip to content

fix(computer): popups the browser's control connection attaches to navigate, and its record's tab titles stay current - #463

Merged
earakely-scale merged 5 commits into
mainfrom
edgararakelyan/fd-4952-m85-the-front-door-for-a-browser-running-alone
Nov 3, 2026
Merged

earakely-scale merged 5 commits into
mainfrom
edgararakelyan/fd-4952-m85-the-front-door-for-a-browser-running-alone

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

This PR fixes two bugs in the browser's control connection from M5.10 (#459). I found them while building M8.5, the front door for a browser running alone.

The front door itself is no longer in this PR. A browser running alone will be a computer instead: a browser-24.04 base with a page driver, deployed like any other computer. That plan is M8.53, and there's a design note and an evaluation. 38cb86db removes the front door, so only the fixes are left.

  • A popup never navigated. The connection attaches to each page as it opens. Chrome held each such page (waitingForDebugger) until it was told to run, even though the connection asked for waitForDebuggerOnStart: false. Start tabs were attached after they had loaded, so this never showed for them. A page opened by window.open stayed blank, though. Now each page the connection attaches to is sent Runtime.runIfWaitingForDebugger.
  • The record's tab titles were stale. Headless Chrome sends no targetInfoChanged when a page's title changes. So the record kept the title Chrome gave a tab when it opened, which is its URL. Now the record reads each tab's URL and title (Target.getTargets) whenever it's read. A page's load refreshes its own tab too, so a tab that closes later keeps the title it had.

The protocol README describes both fixes.

How it was tested

  • ruff check: clean.
  • Protocol tests: 991 passed. Two of them are new:
    • each page the connection attaches to is told to run;
    • the record reads titles when it's read and when a page loads, and a closed tab keeps its last title.
  • Integration, slow tier, on agent-environments-admin VMs (amd64 c6i.2xlarge, arm64 c7g.2xlarge): chromium_app_test, website_browser_test and computer_app_test: 12 of 12 passed on each arch, at b54fce11. The new test_a_popup_a_page_opens_loads_with_its_control_attached serves a page on loopback that opens a popup when Enter is pressed. It presses Enter through the computer's tools, then checks the record (both tabs, each at its URL with its title) and the window title. On amd64, with the runIfWaitingForDebugger call removed, the test fails: the popup's window stays "Untitled", and the record never shows its title.
  • Earlier on this branch: the front-door runs on the VMs found both bugs. Greptile's first round (4/5) found two problems, both in front-door code that's now removed. It gave 5/5 once they were fixed.
  • CI and Greptile on b54fce11: CI is 24/24, CodeBuild included. Greptile gave 5/5 with no findings.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the latest test changes preserve the checks that the opened page loads.

Summary

The browser control connection now resumes newly attached pages and refreshes tab URLs and titles.

  • Newly attached pages resume so popups can finish loading.
  • Browser records keep tab titles and URLs current.

Reviews (5) · Last reviewed commit: "test(computer): the popup test's page op..." · Reviewed by Greptile

python -m agentenv_protocol.computer.front_door <folder> <file>:<Class> [--site-proxy COMMAND] runs from the app's
venv as its container's command. It runs the app's server and the site proxy, starting each again whenever it ends
(0.5 s, then longer while it keeps ending soon, up to 30 s). On :8000 it serves the app's card, with no interface for
agents and with computer-ready/v1, whose status is the app's readiness and the site proxy's, and failed for good once
the app's launch log has an exit, since nothing alone launches it again. Every other path goes on to the app's server,
its answer streamed back, behind the control token, which no forwarded request and none of its programs is given.

computer-ready/v1's URN moves to operations, beside ReadyCheck, so the front door runs on the app extra; card still
exports it. The browser's record reads each tab's URL and title from the browser when it's read and when its page
loads, since Chrome sends no event when a page's title changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 3, 2026 07:47
earakely-scale and others added 3 commits November 3, 2026 00:04
…, and kills a program that won't stop on 3.10

A header that Connection names belongs to that hop, so neither a request nor an answer sends it on. asyncio.wait_for
raises asyncio.TimeoutError, not the builtin before 3.11, which the protocol still supports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s it opened navigates

The control connection auto-attaches to every page, and Chrome holds a page it attached that way, a popup that
window.open() opens say, until the attached client says to run. It never did, so every scripted popup stayed at no
URL and never painted, in a computer as alone. Each attached page is told to run (Runtime.runIfWaitingForDebugger).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e a computer

A website browser running alone becomes a computer with no display and a page driver whose screen is its page (decided
Nov 3), so the computer's own driver fronts it and nothing will run agentenv_protocol.computer.front_door. Its module,
tests and README section go, with what only it needed: apps.served_card and computer-ready/v1's URN in operations. The
popup fix and the record's current titles stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(computer): the front door of a website browser running alone fix(computer): popups the browser's control connection attaches to navigate, and its record's tab titles stay current Nov 3, 2026
…e click before a key press can't open it early

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 35ca046 into main Nov 3, 2026
27 of 28 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-4952-m85-the-front-door-for-a-browser-running-alone branch November 3, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant