Skip to content

companion: dedicated agent tab + split setup/connect install flow#50

Merged
Anton-Horn merged 1 commit into
mainfrom
companion-extension-install
Jun 4, 2026
Merged

companion: dedicated agent tab + split setup/connect install flow#50
Anton-Horn merged 1 commit into
mainfrom
companion-extension-install

Conversation

@Anton-Horn
Copy link
Copy Markdown
Contributor

Follow-up fixes from real-Chrome testing of the companion extension (#49).

Navigate from any tab

chrome.debugger can't attach to chrome:// pages, so the first "open URL" from a fresh Chrome (active tab = new-tab page) failed with "Can't control this page (chrome://newtab/)". Navigation now goes through chrome.tabs (no attach needed); we attach only afterwards, once it's a real page, for the snapshot.

Dedicated agent tab

The agent drives its own tab — created on the first navigate and reused across actions — instead of hijacking whatever the user is looking at. Cookies/logins are profile-wide so it's fully signed in, the user can keep using and switching between their other tabs, and a closed agent tab is reopened on the next navigate.

Rebuilt install flow (the big one)

Chrome 137+ silently disabled --load-extension (it's parsed but the extension never loads), so the auto-relaunch default was a doomed step that quit the user's Chrome for nothing before failing. Removed it (and chrome-launch.ts).

Install is now a one-time guided Load-unpacked that persists, split into two flagless commands:

Command Role
zero browser setup one-time: materialize the extension, open chrome://extensions, reveal the folder in Finder for drag-drop, and block until it connects (confirming it works)
zero browser connect everyday: link to the already-installed extension; if nothing connects, points at setup

The worker now reconnects every ≤5s so connect links promptly after setup. All companion flags removed (--cdp / --chromium / --no-launch / --no-open).

Verified

  • Both packages build and tsc --noEmit clean.
  • setup / connect / browser help render correctly with no flags.
  • Manually exercised end-to-end against real Chrome 148: extension installs via Load-unpacked, connect links, and the agent opens + drives its own tab (navigate → snapshot → screenshot → evaluate).

Note

Still the no-store path, so the one-time setup needs Chrome's Developer-mode toggle (and Chrome shows the recurring "disable developer mode extensions" nag). The Chrome Web Store is the eventual one-click end-state — deferred per discussion.

🤖 Generated with Claude Code

Follow-up fixes from real-Chrome testing of the companion extension.

Navigate from any tab. chrome.debugger can't attach to chrome:// pages, so
the first "open URL" from a fresh Chrome (active tab = new-tab page) failed.
Navigation now goes through chrome.tabs (no attach needed); we attach only
afterwards for the snapshot.

Dedicated agent tab. The agent drives its OWN tab — created on the first
navigate and reused across actions — instead of hijacking whatever the user is
looking at. Cookies/logins are profile-wide so it's fully signed in, and the
user can keep using (and switching between) their other tabs freely. A closed
agent tab is reopened on the next navigate.

Rebuilt install flow. Chrome 137+ silently disabled --load-extension, so the
auto-relaunch default was a doomed step that quit the user's Chrome for nothing.
Removed it (and chrome-launch.ts). Install is now a one-time guided Load-unpacked
that persists, split into two flagless commands:

  zero browser setup    one-time: materialize the extension, open
                        chrome://extensions, reveal the folder for drag-drop,
                        and block until it connects (confirming it works)
  zero browser connect  everyday: link to the already-installed extension;
                        if nothing connects, points at `setup`

The worker reconnects every <=5s so `connect` links promptly after `setup`.
All companion flags removed (--cdp/--chromium/--no-launch/--no-open are gone).
@Anton-Horn Anton-Horn merged commit 5b44a6c into main Jun 4, 2026
1 check passed
@Anton-Horn Anton-Horn deleted the companion-extension-install branch June 4, 2026 17:55
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