← Commit history

The floaty pencil tucks away (John: it will interfere with page UI): hidden by default, revealed by a corner hover zone tracked via passive mousemove so nothing ever intercepts a page click, the taskbar-tuck pattern, auto-hiding 1.2s after the mouse leaves. When revealed it carries the floating-windows-skill drag grip (six-dot glyph); dragging pins it visible wherever the user places it, viewport-clamped. Also the floaty ralph harness is fixed: pup_eval wraps expressions as return(expr), so the harness's statement-chain emits were silent syntax errors that never set the result, which was the entire phantom failure while the real path worked

John Lauer ·b61c16b9cf ·2mo ago ·parent b2b2bf6
4 files changed +54−19
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "2.0.83",-  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.83/adom-bridge-puppeteer-v2.0.83.zip",-  "sha256": "acfc2fc8fba8509bdd5f81540fbe173b240418dd2338f1cd2e65d833a855dc34",-  "size": 835279,+  "version": "2.0.84",+  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.84/adom-bridge-puppeteer-v2.0.84.zip",+  "sha256": "4e61738287c9ef6adbdf34896d7678dbe2807ad4428e867708b70697e1dc3788",+  "size": 835858,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-2.0.83+2.0.84
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "2.0.83",+  "version": "2.0.84",   "description": "Drives a browser ALREADY on the machine \u2014 installed Chrome, else Microsoft Edge (every Windows PC ships with Edge) \u2014 launched with a FRESH isolated profile, so the common case has NO ~150 MB Chrome-for-Testing download and it never touches the user's real tabs/logins. Binds its local server to LOOPBACK (127.0.0.1) only, so no Windows Firewall 'allow Node through the firewall' prompt ever pops. Chrome for Testing is fetched only as a LAST RESORT if the machine has no Chromium browser at all. SPAWN-VERIFIED fallback: pup tries each detected browser (Chrome \u2192 Edge \u2192 CfT) and actually launches it, falling through to the next if one won't start (and handling browsers like Edge that relaunch onto another PID), so a corrupt/partial install never hard-fails an open. The browser that launches is cached as the default (persisted across restarts) so it isn't re-probed each time. On spawn the bridge SELF-WARMS: detects browsers + disk, and only if the box has no Chrome/Edge and no cached CfT does it background-fetch CfT so the first open is instant. pup_use pins a specific browser (chrome | edge | cft | auto); {browser:'chrome',install:true} downloads & installs REAL Google Chrome (user-scoped, no admin) on an Edge-only box. pup_readiness (READ-ONLY) reports which browser will be used + the full candidate list + the default + free disk. Every failure returns a specific errorCode + _hint (chrome_install_no_disk, chrome_download_network, chrome_install_permission, chrome_stable_not_detected, \u2026). Launches with FULL browser permissions by default for full debug (strictPermissions:true opts out). Headful automation: open/close windows+tabs, navigate, screenshot, eval JS, record. pup is a GENERIC, non-profile browser only \u2014 every session is a fresh isolated Chrome/Edge process, never the user's real signed-in browser; profile defaults to sessionId. To drive the user's REAL Chrome/Edge (their profile, cookies, SSO), use the Adom browser EXTENSION's nbrowser_* verbs \u2014 a separate bridge, not pup's job. macOS (v1.9.74+): full parity with mac-native mechanics \u2014 background-by-default is the app-level hide (windows stay drivable/screenshottable while hidden), raise/lower map to unhide+activate/hide, pup_alert_window posts a native toast whose click focuses the window, pup_use {browser:'chrome',install:true} installs Chrome from the official dmg, and taskbar identity/badging remains Windows-only.",   "homepage": "https://wiki.adom.inc/adom/adom-bridge",   "author": "Adom Inc.",
src/server.js+48−13
@@ -5664,33 +5664,68 @@ const FLOATY_JS = `(() => {     if (!document.body) { setTimeout(add, 400); return; }     var host = document.createElement('div');     host.id = '__pup_floaty';-    host.style.cssText = 'position:fixed;top:14px;right:14px;z-index:2147483645;pointer-events:auto;';+    // v2.0.84 (John): TUCKED AWAY by default so it never interferes with page UI — a corner+    // hover zone reveals it (the taskbar-tuck pattern), tracked via mousemove (zero hit-testing+    // interference). Once dragged (grip, floating-windows skill), it pins visible where placed.+    host.style.cssText = 'position:fixed;top:14px;right:14px;z-index:2147483645;pointer-events:auto;display:flex;align-items:center;gap:4px;opacity:0;transform:translateY(-6px);transition:opacity .2s ease,transform .2s ease;';     var root = host.attachShadow({ mode: 'closed' });+    var row = document.createElement('div');+    row.style.cssText = 'display:flex;align-items:center;gap:4px;';+    var grip = document.createElement('div');+    grip.setAttribute('aria-label', 'Move the annotate button');+    grip.style.cssText = 'width:12px;height:22px;cursor:grab;display:none;grid-template-columns:1fr 1fr;gap:2px;align-content:center;justify-items:center;';+    for (var gi = 0; gi < 6; gi++) { var gd = document.createElement('div'); gd.style.cssText = 'width:2.5px;height:2.5px;border-radius:50%;background:#8b949e;'; grip.appendChild(gd); }     var btn = document.createElement('button');     btn.setAttribute('aria-label', 'Annotate this page');-    btn.style.cssText = 'width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:rgba(13,17,23,.72);border:1px solid rgba(0,184,177,.45);cursor:pointer;opacity:.55;transition:opacity .15s ease;padding:0;';+    btn.style.cssText = 'width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:rgba(13,17,23,.72);border:1px solid rgba(0,184,177,.45);cursor:pointer;padding:0;';     btn.innerHTML = '<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="#e6edf3" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20l1.5-4.5L16 5a2.1 2.1 0 0 1 3 3L8.5 18.5 4 20z"/><path d="M13.5 7.5l3 3"/></svg>';     var tip = document.createElement('div');-    tip.innerHTML = '<div style=\"font-weight:700;color:#e6edf3;margin-bottom:4px;font-family:Familjen Grotesk,Satoshi,sans-serif;\">Annotate this page</div>'-      + '<div style=\"color:#c9d1d9;\">Draw on the page to show your AI exactly what you mean; a red circle says it best. The moment you lift the mouse, the marked-up area is copied to your clipboard, ready to paste into any AI chat.</div>'-      + '<div style=\"margin-top:7px;color:#8b949e;font-size:11.5px;\">Shortcut&nbsp;&nbsp;<span style=\"font-family:JetBrains Mono,monospace;font-size:10.5px;border:1px solid #30363d;border-radius:4px;padding:1px 6px;color:#c9d1d9;\">Alt&nbsp;Shift&nbsp;A</span></div>';+    tip.innerHTML = '<div style="font-weight:700;color:#e6edf3;margin-bottom:4px;font-family:Familjen Grotesk,Satoshi,sans-serif;">Annotate this page</div>'+      + '<div style="color:#c9d1d9;">Draw on the page to show your AI exactly what you mean; a red circle says it best. The moment you lift the mouse, the marked-up area is copied to your clipboard, ready to paste into any AI chat.</div>'+      + '<div style="margin-top:7px;color:#8b949e;font-size:11.5px;">Shortcut&nbsp;&nbsp;<span style="font-family:JetBrains Mono,monospace;font-size:10.5px;border:1px solid #30363d;border-radius:4px;padding:1px 6px;color:#c9d1d9;">Alt&nbsp;Shift&nbsp;A</span></div>';     tip.style.cssText = 'position:fixed;z-index:2147483647;max-width:min(320px,calc(100vw - 40px));background:rgba(22,27,34,.96);color:#e6edf3;border:1px solid rgba(0,184,177,.28);border-radius:10px;padding:9px 13px;font:400 13px/1.4 Satoshi,system-ui,sans-serif;box-shadow:0 12px 40px rgba(0,0,0,.55);backdrop-filter:blur(16px);pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .18s ease,transform .18s ease;';-    root.appendChild(btn); root.appendChild(tip);-    var timer = null;-    host.onmouseenter = function () { btn.style.opacity = '1'; timer = setTimeout(function () {+    row.appendChild(grip); row.appendChild(btn); root.appendChild(row); root.appendChild(tip);+    var timer = null, pinned = false, shown = false, hideTimer = null;+    function reveal() { clearTimeout(hideTimer); if (shown) return; shown = true; host.style.opacity = '1'; host.style.transform = 'translateY(0)'; grip.style.display = 'grid'; }+    function tuck() { if (pinned) return; hideTimer = setTimeout(function () { shown = false; host.style.opacity = '0'; host.style.transform = 'translateY(-6px)'; grip.style.display = 'none'; tipHide(); }, 1200); }+    // corner hover zone via mousemove: NOTHING intercepts page clicks+    addEventListener('mousemove', function (e) {+      if (pinned) return;+      var hr = host.getBoundingClientRect();+      var inCorner = e.clientX > innerWidth - 160 && e.clientY < 90;+      var onHost = shown && e.clientX >= hr.left - 8 && e.clientX <= hr.right + 8 && e.clientY >= hr.top - 8 && e.clientY <= hr.bottom + 8;+      if (inCorner || onHost) reveal(); else if (shown) tuck();+    }, { passive: true });+    function tipShow() { clearTimeout(timer); timer = setTimeout(function () {       var a = btn.getBoundingClientRect(), M = 8, w = tip.offsetWidth, h = tip.offsetHeight;       var x = Math.min(Math.max(M, a.right - w), innerWidth - w - M);       var y = a.bottom + 10; if (y + h > innerHeight - M) y = a.top - h - 10;       y = Math.min(Math.max(M, y), innerHeight - h - M);       tip.style.left = x + 'px'; tip.style.top = y + 'px'; tip.style.opacity = '1'; tip.style.transform = 'translateY(0)';-    }, 600); };-    host.onmouseleave = function () { btn.style.opacity = '.55'; clearTimeout(timer); tip.style.opacity = '0'; tip.style.transform = 'translateY(4px)'; };-    host.onclick = function () { clearTimeout(timer); tip.style.opacity = '0'; btn.style.borderColor = '#00d4cb'; if (window.__pupStartAnnotate) { window.__pupStartAnnotate('pen'); } window.__pupFloatyClick = Date.now(); setTimeout(function () { btn.style.borderColor = 'rgba(0,184,177,.45)'; }, 1500); };+    }, 600); }+    function tipHide() { clearTimeout(timer); tip.style.opacity = '0'; tip.style.transform = 'translateY(4px)'; }+    btn.onmouseenter = tipShow; btn.onmouseleave = tipHide;+    btn.onclick = function () { tipHide(); btn.style.borderColor = '#00d4cb'; if (window.__pupStartAnnotate) { window.__pupStartAnnotate('pen'); } window.__pupFloatyClick = Date.now(); setTimeout(function () { btn.style.borderColor = 'rgba(0,184,177,.45)'; }, 1500); };+    // drag by grip (floating-windows skill: visible grip, viewport-clamped); a drag PINS it+    (function () {+      var drag = null;+      grip.addEventListener('pointerdown', function (e) {+        var r = host.getBoundingClientRect();+        host.style.right = ''; host.style.left = r.left + 'px'; host.style.top = r.top + 'px';+        drag = { dx: e.clientX - r.left, dy: e.clientY - r.top };+        grip.setPointerCapture(e.pointerId); grip.style.cursor = 'grabbing'; e.preventDefault();+      });+      grip.addEventListener('pointermove', function (e) {+        if (!drag) return;+        var w = host.offsetWidth, h = host.offsetHeight, M = 8;+        host.style.left = Math.min(Math.max(M, e.clientX - drag.dx), innerWidth - w - M) + 'px';+        host.style.top = Math.min(Math.max(M, e.clientY - drag.dy), innerHeight - h - M) + 'px';+      });+      grip.addEventListener('pointerup', function () { drag = null; pinned = true; grip.style.cursor = 'grab'; });+    })();     document.body.appendChild(host);   }   add();-  // v2.0.71: the annotate hotkey rides the SAME rail (chrome.commands is dead under this-  // --load-extension combo, like the content-script APIs). Page-focused Alt+Shift+A = annotate.   addEventListener('keydown', function (e) {     if (e.altKey && e.shiftKey && !e.ctrlKey && !e.metaKey && (e.key === 'A' || e.key === 'a')) {       e.preventDefault(); e.stopPropagation();