aboutsummaryrefslogtreecommitdiff
path: root/extensions/chrome-profile-bridge/browser-extension
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-11-08 15:26:17 +0000
committerIgor Soarez <igor@soarez.org>2026-11-08 15:26:17 +0000
commit0edeb17be41b4f57e40b16b9c86bf5ce85add971 (patch)
tree2edbd79187d413a957da259fe5364128d89d92ee /extensions/chrome-profile-bridge/browser-extension
parent4d353df1a83e36b4e6b2edb0ba64190423e4a7f3 (diff)
overlay: the agent decides whether a password-manager prompt is in the way
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.
Diffstat (limited to 'extensions/chrome-profile-bridge/browser-extension')
-rw-r--r--extensions/chrome-profile-bridge/browser-extension/service_worker.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/chrome-profile-bridge/browser-extension/service_worker.js b/extensions/chrome-profile-bridge/browser-extension/service_worker.js
index 4aecf68..73aabc5 100644
--- a/extensions/chrome-profile-bridge/browser-extension/service_worker.js
+++ b/extensions/chrome-profile-bridge/browser-extension/service_worker.js
@@ -694,17 +694,17 @@ function extractForeignExtId(targets) {
const FOREIGN_EXTENSION_BLOCK = /Cannot access a chrome-extension:\/\/ URL of different extension/i;
// Another extension's frame on the page (a password manager's inline prompt, an autofill menu)
-// makes Chrome refuse the debugger on that tab. The user may be using that prompt this very
-// moment, so we never close it on our own: the error tells the agent to ask, and the agent can
-// then call overlay.clear (chrome_clear_overlay).
+// makes Chrome refuse the debugger on that tab. Nothing is closed automatically: the user may be
+// using the prompt (signing in, approving something for the agent). The error gives the agent the
+// facts and lets it decide, with overlay.clear (chrome_clear_overlay) to close it when it is only
+// in the way.
async function overlayBlockedError(tabId) {
const targets = (await findForeignExtensionTargets()).filter((t) => t.tabId === tabId);
const url = String(targets[0]?.url || "").replace(/[?#].*$/, "");
const id = extractForeignExtId(targets) || "unknown";
return new Error(
`Another extension (${id}${url ? `, ${url}` : ""}) has a prompt open on this tab, probably a password manager such as 1Password, and Chrome will not let the debugger work on the tab while it is there. ` +
- `The user may be using it right now, so do not close it on your own: ask the user, or wait for them to finish. ` +
- `When the user says to go ahead, or the tab is yours and idle, call chrome_clear_overlay for this tab. Navigating the tab away also works.`,
+ `If it is only in your way, call chrome_clear_overlay for this tab. If you are waiting for the user to sign in or approve something with it, leave it alone and tell the user. Navigating the tab away also frees it.`,
);
}