← Commit history

1.8.64: stage edge-adjacent before maximize so background windows appear already full-size; tighten verify/heal thresholds

John Lauer ·d48cd1d57a · ·parent 9ad793e
5 files changed +31−11
CHANGELOG.md+11
@@ -1,5 +1,16 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.64 — 2026-07-15 — Background windows appear already-maximized (no more small-then-grow)++John: "why when you open a new window is it smaller than my screen and then i see it grow larger?"+Because the park staged the window ON-screen at 1200×800 before maximizing, and a z-bottom window+is visible wherever the user's windows don't cover — so the small stage showed, then the grow.+Now the park stages the window JUST past the LEFT EDGE of the primary monitor (fully invisible but+adjacent, so the OS maximize targets that monitor — maximizing from deep off-screen produces+garbage bounds, tested) and only then maximizes: the window's first visible frame is full-size.+Position-verify and self-heal thresholds tightened from -5000 to -1000 so a window stuck at the+-1310 staging spot reads as failed/heal-worthy instead of healthy.+ ## 1.8.63 — 2026-07-15 — force:true adopted (AD 1.9.115): the launch park is one AD call  AD 1.9.115 shipped the follow-up: `desktop_set_window_state {state:'bottom', force:true}` bottoms
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.8.63",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.63/adom-bridge-puppeteer-v1.8.63.zip",-  "sha256": "9beca556e04963de8d5e0b37922751cc1a14da4d324e45f54f2169c8cec382ea",-  "size": 171785,+  "version": "1.8.64",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.64/adom-bridge-puppeteer-v1.8.64.zip",+  "sha256": "5af017f009cb7bd3a07cc56fb32e0f16fa179553678a7a18757c96096101dc60",+  "size": 172108,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.8.63\ No newline at end of file+1.8.64\ No newline at end of file
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "1.8.63",+  "version": "1.8.64",   "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. browser_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. browser_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.",   "homepage": "https://wiki.adom.inc/adom/adom-desktop",   "author": "Adom Inc.",
src/server.js+14−5
@@ -1999,11 +1999,18 @@ async function parkSessionWindowDirect(page, sessionId) {     const { windowId } = await cdp.send('Browser.getWindowForTarget');     // Full-size via the OS's own maximize (CDP windowState) — no pixel math, no screen-size     // probe that can fail mid-navigation (a failed probe shipped 1600×900 windows once).-    // Move to the primary monitor first so the maximize lands there, then maximize.-    // Neither call activates the window, so z-order is preserved.+    // v1.8.64: stage the window JUST past the LEFT EDGE of the primary monitor before+    // maximizing — fully invisible but ADJACENT, so the OS targets the primary monitor.+    // Two rejected alternatives (both tested):+    //   - maximize from deep off-screen (-32000): garbage bounds (landed at -21333, 159×27);+    //   - stage ON-screen small then maximize: the window is only z-bottom, not hidden, so+    //     the user sees a small window appear and then GROW (John: "why isn't it just the+    //     size of my screen from the get-go?").+    // Neither call activates the window, so z-order is preserved — it first becomes visible+    // already maximized.     const placeOnScreen = async () => {       await cdp.send('Browser.setWindowBounds', { windowId, bounds: { windowState: 'normal' } });-      await cdp.send('Browser.setWindowBounds', { windowId, bounds: { left: 0, top: 0, width: 1200, height: 800 } });+      await cdp.send('Browser.setWindowBounds', { windowId, bounds: { left: -1310, top: 100, width: 1280, height: 800 } });       await cdp.send('Browser.setWindowBounds', { windowId, bounds: { windowState: 'maximized' } });     };     // hwnd via AD (native) — the title suffix "(session: <id>" is set by the welcome page.@@ -2073,7 +2080,9 @@ async function parkSessionWindowDirect(page, sessionId) {     try {       const gb = await cdp.send('Browser.getWindowBounds', { windowId });       const b = gb && gb.bounds;-      verified = !!(b && b.left > -5000 && b.top > -5000);+      // v1.8.64: threshold -1000 (was -5000) so a window stuck at the -1310 edge-adjacent+      // staging spot (failed maximize) reads as NOT verified instead of passing.+      verified = !!(b && b.left > -1000 && b.top > -1000);     } catch (e) {}     return verified ? 'backgrounded' : 'park-failed';   } catch (e) {@@ -2104,7 +2113,7 @@ async function healOffscreenWindow(session, sessionId) {       const gb = await cdp.send('Browser.getWindowBounds', { windowId });       b = gb && gb.bounds;     } finally { try { await cdp.detach(); } catch (e) {} }-    if (!b || (b.left > -5000 && b.top > -5000)) return null; // on-screen — healthy, hands off+    if (!b || (b.left > -1000 && b.top > -1000)) return null; // on-screen — healthy, hands off (v1.8.64: catches the -1310 staging spot too)     console.log(`[heal] "${sessionId}" window stranded off-screen (${b.left},${b.top}) — re-parking + re-badging`);     const r = await parkSessionWindowDirect(page, sessionId);     badgePupTaskbar(sessionId).catch(() => {});