aboutsummaryrefslogtreecommitdiff
path: root/extensions/chrome-profile-bridge/browser-extension
AgeCommit message (Collapse)Author
35 hourstabs: back to one window per session; keep new tabs out of the user's windowHEADmasterIgor Soarez
A window shows only one tab, so sessions sharing one hid each other's tabs: no real input and blank screenshots for every session but the one whose tab was active (castle-pirc-web, 2026-11-08). Time-sharing the active tab would flip tabs under the user while they sign in for an agent, so revert 66fbd30: a session gets its own unfocused window. Kept: chrome_tab new for a session with no window opens one for it instead of landing in the user's focused window. The primer and chrome_tab description now say why to reuse a tab.
36 hoursoverlay.clear: read closed shadow roots and remove the host elementIgor Soarez
Diagnostics on 1Password's inline prompt: the page holds a <com-1password-uso> element and no iframe in its own DOM; the frame is inside a closed shadow root. Run in the isolated world, where chrome.dom.openOrClosedShadowRoot can read it, and remove the element that hosts a foreign extension frame. Drop the body-click events: they were never shown to help.
36 hoursoverlay.clear: match the prompt's frame by the tabId in its URL, and report ↵Igor Soarez
what it saw The password manager's frame target can come without a tabId, so it was missed (error said 'unknown', remaining targets empty). Match by the ?tabId= in the frame URL too, and when the tab stays blocked report every foreign target and what the injected script saw, so the next step is based on data.
36 hoursoverlay.clear: run in the page's own world with the click the fallback usesIgor Soarez
The isolated-world body events did not free a 1Password-blocked tab; the DOM click fallback (MAIN world, full pointer event shape, el.click()) did. Use that shape, aimed at the page root so no control is clicked.
37 hoursoverlay.clear: click the page body outside the prompt, and wait for it to goIgor Soarez
Measured on 1Password's inline menu: blur and Escape did not free the tab, a click outside did. overlay.clear now also sends pointer/mouse events to the body and polls the debugger for about a second instead of checking once.
37 hoursoverlay: the agent decides whether a password-manager prompt is in the wayIgor Soarez
The error, the tool description and the primer no longer tell the agent to ask the user first. It clears the prompt when it is only in the way, and leaves it alone and says so when it is waiting for the user to sign in or approve.
37 hoursoverlay: tell the agent about a blocking password-manager prompt; ↵Igor Soarez
chrome_clear_overlay closes it on request Another extension's frame (1Password's inline prompt) makes Chrome refuse the debugger on the tab. The old path sent Escape on its own, which cannot reach that frame and would close a prompt the user may be using. Now nothing is closed automatically: the error says what is blocking and tells the agent to ask the user; chrome_clear_overlay removes the frame, blurs the field, sends Escape and reports whether the tab is usable again.
37 hoursnavigate: do not require the debuggerIgor Soarez
Attaching first (for the Leave-site prompt) made chrome_navigate fail on a tab whose page holds another extension's frame, such as a 1Password inline prompt, which is exactly when navigating away is the way out. Attach is now best effort.
40 hourstabs: agent sessions share one window instead of opening one eachIgor Soarez
A session's first tab used chrome.windows.create, so every new session name (and every Claude Code process) got its own window. It now goes into the window that already holds any 'Pi Session:' group; a window is created only when none exists. chrome_tab new for a session with no group also uses that window, not the user's focused one. The primer and the chrome_tab description say so.
41 hoursnavigate: answer a page's Leave-site prompt instead of hangingIgor Soarez
A page with a beforeunload handler shows 'Leave site?' when the extension navigates away. Nothing answered it, so chrome_navigate waited out its timeout and the agent never learned why. The worker now hears Page.javascriptDialogOpening and dismisses the dialog (stay/cancel); page.navigate fails at once and says so. leaveIfAsked: true, for that call only, accepts a beforeunload prompt. Tool description and primer tell agents when to use it and to ask the user when unsure.
2026-09-28Release 0.15.57 (#28)Tianren Dong
2026-09-28Drop the full-screen tab rule for automation targets (#27)Tianren Dong
0.15.54 opened Pi's automation target as a tab in the user's window while it was full screen, assuming macOS would merge a new window into it as a hidden window tab. Chrome disables automatic window tabbing (app_controller_mac.mm), so that never happens; the hidden tabs came from the tab-group bug fixed in 0.15.56. Always prefer Pi's own window.
2026-09-28Report hidden Pi tab in /chrome doctor (#26)Tianren Dong
Chrome ignores clicks and typing in hidden pages. Doctor now asks the worker whether this session's own tab is visible (automation.status includeVisibility, which never creates or activates a tab) and reports the reason and fix when it is hidden.
2026-09-28Keep tab ownership across extension reloads (#25)Tianren Dong
storage.session is wiped when the extension reloads, which it does on every pi-chrome update, so Pi lost track of its automation window and session tabs and left them behind. Mirror ownership to storage.local, restore it only when the session copy is missing, re-check every restored tab (same window; adopted tabs still in Pi's group), and drop the local copy on browser startup.
2026-09-28Create session tab groups in the tab's own windowTianren Dong
chrome.tabs.group without createProperties.windowId creates the group in the current (user's) window and moves the tab there, so a session's automation tab left its dedicated window and became a hidden inactive tab. Make the unit mock match Chrome's behavior.
2026-09-28Release 0.15.56Tianren Dong
2026-09-28Fill whole textareas; cover new tabs' first page with early captureTianren Dong
chrome_fill's triple-click selected one line of a multi-line textarea, so fill replaced only that line. Select value fields with the selectAll editing command before deleting. Early capture now waits for in-flight tab.new creations, so a first page that commits before the tab is tracked is still captured.
2026-09-26Release 0.15.55Tianren Dong
2026-09-26Stop console capture from tripping DevTools detection; scope early capture ↵Tianren Dong
to Pi tabs Fixes #9. Sites like BOSS Zhipin log an object with a getter/toString trap and close the tab if it is read. Store captured console args raw and serialize them on read without running page code (data properties only, accessors as [getter], built-ins via native getters). Inject document-start capture only into Pi's automation tab and session-tracked tabs.
2026-09-26Report hidden-tab input, append targeted typing, smarter uploads, prune ↵Tianren Dong
screenshots; release 0.15.54 - Check page visibility before trusted input: Chrome drops input to hidden pages (inactive tabs, covered/minimized windows, macOS window tabs behind full screen). Type/key/hover/scroll/tap/drag fail fast with the reason; click/fill use their DOM fallback immediately (or reject with domFallback:false). - Use an inactive tab instead of a new window for the automation target while the user's window is full screen. - chrome_type with uid/selector moves the caret to the end (moveToEndOfDocument) after its focus click. - chrome_upload_file: labels/wrappers resolve to their file input, same-origin iframe search, and intercepted file chooser for upload buttons (trusted click when visible, user-gesture click when hidden); reject multiple paths for single-file inputs; no duplicate change event. - Prune default-folder chrome_screenshot captures (7 days, newest 20 kept, retentionDays override). - input.debug without a target no longer calls tabs.get(-1). - New hidden-input unit suite.
2026-09-26Absorb fork fixes and features; release 0.15.53Tianren Dong
Adapted from community forks (ardhiqii, kkunkunya, nihar-oracle, steimerbyte): - Abort stalled /next long polls after 45s; time out, retry, and single-post results. - Fall back to CDP Runtime.evaluate when chrome.scripting is refused (about:blank automation tabs). - Load pi-chrome in same-process subagent sessions as a bridge client; client chrome_launch reports owner status. - Add chrome_cdp (validated raw CDP passthrough, background-guarded, payload summarization) and chrome_cdp_targets. - chrome_type reports before/after values, insertedAt, splice/unchanged warnings; add replace=true. - includeSnapshot waits for navigations started by the action; tab.new reports the settled tab. - CDP timeouts surface as timeouts and are not re-sent after the cleanup detach. - Activate/deactivate chrome_find and chrome_inspect with the rest of the chrome_* tools. - New unit suites: bridge-resilience, cdp-passthrough, type-evidence.
2026-09-10Simplify Chrome status commands and release 0.15.51Tianren Dong
2026-09-10docs: clarify background controls and release 0.15.50Tianren Dong
2026-09-10Improve Chrome input reliability and release 0.15.49Tianren Dong
2026-09-09Enforce hard background and release 0.15.48Tianren Dong
2026-09-09Fix session cleanup and release 0.15.47Tianren Dong
2026-07-07Fix Chrome authorization update loggingTianren Dong
2026-07-07Record Chrome tool authorization state explicitlyTianren Dong
2026-07-07Log Chrome tool authorization changesTianren Dong
2026-06-25Release v0.15.43Tianren Dong
2026-06-25Release v0.15.42Tianren Dong
2026-06-25Release v0.15.41Tianren Dong
2026-06-220.15.40: keep automation targets in session groupTianren Dong
2026-06-22Keep Pi-created tabs in one session groupTianren Dong
2026-06-220.15.39: dedicated pi-chrome automation tab/window isolation (#6)TJ Dong
Stop pi-chrome from hijacking the user's active tab. Page/navigation actions with no explicit target now route to a dedicated automation window owned by the calling Pi session (falling back to a dedicated tab if a window can't be made), instead of overwriting whatever the user has open. - Session-scoped ownership: Map<sessionKey, target> in the service worker, keyed by a sessionKey forwarded from index.ts, so concurrent sessions (one shared extension) never fight over a window or close each other's tabs. - Persistence: ownership mirrored to chrome.storage.session so a service-worker restart re-hydrates and reuses the window instead of orphaning it. Cleared on full browser restart; restored windows are then left alone (never reclaimed). - getTabByParams default branch resolves the owned target; tab.activate/close/ group/ungroup pass createOwnedTarget:false so management never auto-creates a throwaway tab or falls back to the user's active tab. - Session-group integration: the dedicated-window tab still joins this session's tab group, in its own window; grouping stays best-effort. - Lifecycle: cleanup on /chrome revoke and real session end (not /reload); fire-and-forget so it never blocks /quit, /reload, or shutdown. - Tests: new test-suite/unit/automation-target.test.mjs (isolation, reuse, concurrency, restart/reconnect re-hydration, guarded tab.*, group integration, window->tab fallback, robust cleanup). Docs + CHANGELOG updated.
2026-06-070.15.38: harden chrome input overlay handlingTianren Dong
2026-06-070.15.37: harden Chrome input targetingTianren Dong
2026-06-070.15.37: clarify README installation instructions (#4)Tianren Dong
2026-06-060.15.36: richer chrome_snapshot + chrome_find/chrome_inspectTianren Dong
- chrome_snapshot returns a concise observation (layout, hints, actions, forms, page map, query matches, diff) with mode/query/maxTextChars params - new chrome_find (query -> ranked uids) and chrome_inspect (deep element context, with page.inspect fallback) - includeSnapshot on click/type/fill/key now embeds the formatted snapshot - snapshot/inspect logic shipped as eval-free packaged snapshot_injected.js, sharing window.__PI_CHROME_STATE__ (el- uid scheme) with existing input helpers
2026-06-010.15.35: persist /chrome authorize grant across /reload (re-register ↵Tianren Dong
chrome_* tools on session_start)
2026-06-010.15.34: tabs Pi uses join session group; fix punctuation dropped by ↵Tianren Dong
chrome_type/chrome_key (US-layout keymap)
2026-05-310.15.33: default background mode on (chrome_* run without focusing Chrome)Tianren Dong
2026-05-310.15.32: session tab-group title uses 'Pi Session: <name-or-id>' (colon)Tianren Dong
2026-05-310.15.31: per-session tab groups named 'Pi Session <name-or-id>'Tianren Dong
2026-05-310.15.30: chrome_tab grouping — auto-group Pi tabs, group/ungroup actions, ↵Tianren Dong
merge by title
2026-05-310.15.29: CSP bypass via CDP Runtime.evaluate for ↵Tianren Dong
evaluate/snapshot/waitFor/initScript - evaluateInTab/executeInTab now run through CDP Runtime.evaluate instead of new Function() in MAIN world, so chrome_evaluate/chrome_snapshot work on pages that block unsafe-eval (github.com, many bank/SaaS apps). Preserves value markers (undefined/function/symbol/bigint/Error), DOMRect expansion, and the expression/statement fallback; keeps {ok,value} error envelope. - page.waitFor polls via service-worker-side CDP evaluation. - chrome_navigate initScript uses Page.addScriptToEvaluateOnNewDocument. - Add npm test (test-suite/unit/csp-eval.test.mjs) and in-browser regression challenge 42 strict-csp-evaluate; update challenge 39 notes + docs/primer.
2026-05-310.15.28: bridge self-heal, timeout diagnostics, pressKeyInPage helper, ↵Tianren Dong
DOMRect serialization, stale-target errors, pageMutated wording
2026-05-17chore: release v0.15.27Tianren Dong
2026-05-160.15.26: update docs for benchmark gatesTianren Dong
2026-05-160.15.25: fix reload after stale singletonTianren Dong