companion: dedicated agent tab + split setup/connect install flow#50
Merged
Conversation
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).
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.
Follow-up fixes from real-Chrome testing of the companion extension (#49).
Navigate from any tab
chrome.debuggercan't attach tochrome://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 throughchrome.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 (andchrome-launch.ts).Install is now a one-time guided Load-unpacked that persists, split into two flagless commands:
zero browser setupchrome://extensions, reveal the folder in Finder for drag-drop, and block until it connects (confirming it works)zero browser connectsetupThe worker now reconnects every ≤5s so
connectlinks promptly aftersetup. All companion flags removed (--cdp/--chromium/--no-launch/--no-open).Verified
tsc --noEmitclean.setup/connect/browserhelp render correctly with no flags.connectlinks, and the agent opens + drives its own tab (navigate → snapshot → screenshot → evaluate).Note
Still the no-store path, so the one-time
setupneeds 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