Repository navigation
Extension: work alongside password managers, never touch passwords, keep run traces - #42
Merged
Merged
Conversation
…ch passwords, keep run traces
- Page-script driver: Chrome refuses chrome.debugger on pages holding another
extension's frame (LastPass on Gmail, Grammarly...) and detaches it when one
appears mid-task. Those pages are now driven with chrome.scripting: the
visible DOM becomes the same snapshot format (own `d` refs, clickable rows
like Gmail's inbox), input is DOM events. Mid-task detaches hand over cleanly.
- Credentials: never type into password, code or card fields; the field writer
no longer invents usernames; clicking "Log in" on a filled-in sign-in form
asks first ("Hold on - sign in?"). Also guards the desktop planner.
- Conversations: failed turns stay in the history, so "no, it's on Gmail"
retries the request; a guessed start site that doesn't respond falls back to
a search; navigations time out on dead hosts.
- Planner: sees 8,000 characters of page text (was 1,500), is nudged to wrap
up after a minute, and answers with what it found when out of steps.
- Daily-use loop: each answer keeps a local trace (routing, Jev decisions with
probabilities and timings, planner tool results, errors); thumbs up/down,
notes and "/feedback" in the panel. Dev bridge: last, feedback, targets,
--then follow-ups, and a build-id check after reloads.
- Tests: page scripts run from their serialized source in jsdom; smoke test
loads a stand-in password manager and a pre-filled sign-in page (11 cases).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
In real daily use, WebPilot failed on Gmail in both Chrome and Edge with "Lost control of the tab (target_closed)". The cause was LastPass: it puts its own
chrome-extension://…/webclient-infield.htmlframe into Gmail, and Chrome refuseschrome.debuggeron any page that holds another extension's frame. When such a frame appears mid-task, Chrome detaches the debugger. Password managers and tools like Grammarly do this on many sites, so this hits most people.The same session showed three more problems:
What changed
Page-script driver (
extension/src/dom-browser.ts,page-scripts.ts)chrome.scripting.d…refs so a stale debugger ref can never hit the wrong element.[clickable]attribute.execCommand("insertText")for typing).scriptingplus all-sites host access.Credentials
Conversations and robustness
Planner
Daily-use loop
/feedback …from the chat box.last,feedback,targets(what blocks the debugger on a page),--thenfollow-ups, and a build-id check afterreload(Chrome sometimes ignores an extension reloading itself).Testing
npm test: 55/55. Includes jsdom tests that run the page scripts from their serialized source (so a function that depends on outside code fails), plus safety and run-task tests.npm run extension:smoke: 11/11 in headless Chromium, with a stand-in password manager (scripts/fixtures/frame-injector) and a pre-filled sign-in fixture:blocked_mail_relocation,blocked_buy_cancelledsign_in_asks_first(cancel → never signs in)sign_in_allowed(allow → signs in with the saved password untouched)npm run buildpasses.🤖 Generated with Claude Code