app
Adom Bridge
Public Made by Adomby adom
Adom Bridge unleashes your AI onto your full PC: full power, full safety. The AI breaks out of the container it runs in and onto your real machine, managing and running your entire laptop as you: launch apps, move files, drive any window, control KiCad, Fusion 360 or your real signed-in browser. Works with any AI, cloud or local (Claude Desktop, Claude Code, Codex), no Hydrogen required. Bridge and its bridges are an operating system for AI, with managed Node and Python runtimes, and a human-onl
← Commit history
one-capture surface flow (no per-poll consent spam)
1 file changed
+10−20
web-control-demo.html+10−20@@ -738,26 +738,16 @@ for (const w of mine) { // modal dialog remains, then take the real capture. Errors fall through to a // direct capture so a bridge without includeImages support still renders. function settleThenCapture(c, stateCmd) { - var lastCount = -1, tries = 0; - function capture() { return postVerb(stateCmd, { maxWidth: 900 }); } - function poll() { - tries++; - return postVerb(stateCmd, { includeImages: false }).then(function (pr) { - var d = (pr.j && (pr.j.state || pr.j)) || {}; - var shots = d.shots || d.windows || []; - var modals = d.modalDialogs || []; - var count = shots.length; - var settled = modals.length === 0 && count > 0 && count === lastCount; - lastCount = count; - if (settled || tries >= 8) { - if (!settled) clog(c, " (capturing after " + tries + " polls without full settle)"); - return capture(); - } - if (modals.length) clog(c, " waiting for a dialog to clear: " + modals.map(function (m) { return m.title || m; }).join(", ")); - return new Promise(function (r) { setTimeout(r, 1500); }).then(poll); - }, capture); - } - return poll(); + // ONE capture after a fixed settle delay - NO probe polling. The old loop + // polled the state verb up to 8x waiting for the window set to stabilize, + // and under an "Allow once" grant EVERY poll was its own consent prompt: + // John got NINE toasts for one screenshot (2026-08-17). Each cross-origin + // call costs one consent, so the page makes as few as possible. The + // bridges are being asked to own settle+capture inside the show verbs + // (capture:true) so this becomes zero extra calls. + clog(c, " waiting ~3.5s for the surface to settle, then ONE capture ..."); + return new Promise(function (r) { setTimeout(r, 3500); }) + .then(function () { return postVerb(stateCmd, { maxWidth: 900 }); }); } // summaries