← Commit history

1.8.68: park after page settle so the paint-raise is invisible off-screen; first visible frame is full-size z-bottomed

John Lauer ·41e40600d7 · ·parent 1ec24b1
5 files changed +44−18
CHANGELOG.md+11
@@ -1,5 +1,16 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.68 — 2026-07-15 — Park AFTER the page settles: the paint-raise happens invisibly off-screen++Even with 1.8.67's re-asserts, the raise-then-re-bottom left a visible blip: another thread's+window (adom/wiki) briefly popped over John's work between its first paint and the re-assert.+Root: the park placed the window on-screen BEFORE the navigation settled, so the paint-raise was+visible. Now launchSession waits for the page to settle (load event, capped 2.5s, skipped if+already complete) while the window is still OFF-SCREEN, and only then parks (bottom → place →+z-confirm). The first paint's raise hits an invisible off-screen window; the window's first+visible frame is full-size, z-bottomed, z-confirmed. One late re-assert (3s) remains for+late paints. The open response still awaits the full verdict.+ ## 1.8.67 — 2026-07-15 — Re-assert bottom after the open's navigation (the post-park raise)  Even with 1.8.66's z-confirmed park, the w3 batch sat on top with honest 'backgrounded' verdicts:
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.8.67",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.67/adom-bridge-puppeteer-v1.8.67.zip",-  "sha256": "a6d71df3c83e192544bca95c1f1d8dc79b33971afc7dd61810a25890d886199d",-  "size": 173262,+  "version": "1.8.68",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.68/adom-bridge-puppeteer-v1.8.68.zip",+  "sha256": "32860c35a5e99d70eeb4bf0af118f7badbbe8a086fff939deadb66dadbe664ea",+  "size": 173547,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.8.67\ No newline at end of file+1.8.68\ 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.67",+  "version": "1.8.68",   "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+27−12
@@ -2901,12 +2901,15 @@ async function launchSession(sessionId, url, { freshProfile = false, profile, st     console.log(`Welcome page failed to load (non-fatal): ${e.message}`);   } -  // v1.8.53: PARK NOW — the window exists (newPage resolved) and the welcome page just set-  // the "(session: <id>)" title suffix. Direct APIs (CDP geometry + AD find_window); the open-  // handler awaits _bgPromise so the response carries the real, position-verified verdict.-  // Only for a freshly launched browser (_needsPark) — a reused window is already placed, and-  // re-parking it could hide a window the user has up.-  if (!foreground && process.platform === 'win32') {+  // v1.8.68: the park is DEFINED here but KICKED OFF only after the real URL's navigation has+  // SETTLED (below). Rationale: the first cross-origin paint RAISES the window; if the window+  // is already placed on-screen (even at z-bottom), the user sees a blip on top of their work+  // (the adom/wiki thread's window John caught). Parking after settle means the paint-raise+  // hits a window still OFF-SCREEN — invisible, harmless. The window's first visible moment is+  // full-size, z-bottomed, and z-confirmed. Only for a freshly launched browser (_needsPark) —+  // a reused window is already placed, and re-parking it could hide a window the user has up.+  const kickoffPark = () => {+    if (foreground || process.platform !== 'win32') return;     try {       const be = browsers.get(profileName);       if (be && be.browser && be.browser._needsPark) {@@ -2925,7 +2928,7 @@ async function launchSession(sessionId, url, { freshProfile = false, profile, st           .catch(e => (be.browser._bgResult = 'error'));       }     } catch (e) {}-  }+  };   // v1.8.36: SNAPPY auto-flash. The window already exists + is backgrounded here (the   // welcome page loaded from a local file), so flash the taskbar NOW — do not wait for the   // real URL's domcontentloaded, which for heavy sites is another 1–3s. Set _flashState so@@ -2944,14 +2947,26 @@ async function launchSession(sessionId, url, { freshProfile = false, profile, st       console.log(`[creds] applyCredentialsToPage on launchSession failed: ${e.message}`);     }     await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });-    // v1.8.67: the first cross-origin nav re-shows the window at first paint (RAISES it),-    // often after the park's z-confirm already passed. Re-assert bottom now AND at the 'load'-    // event (late paints on heavy sites). force:false → never yanks a user-held window.+    // v1.8.68: wait for the page to SETTLE (load event, capped at 2.5s) while the window is+    // still OFF-SCREEN, so the first paint's window-raise is invisible. Skip the wait if the+    // page is already complete.     if (!foreground && process.platform === 'win32') {-      reassertBottomAfterNav(sessionId).catch(() => {});-      try { page.once('load', () => { reassertBottomAfterNav(sessionId).catch(() => {}); }); } catch (e) {}+      try {+        const ready = await page.evaluate(() => document.readyState).catch(() => 'unknown');+        if (ready !== 'complete') {+          await Promise.race([+            new Promise(res => { try { page.once('load', res); } catch (e) { res(); } }),+            new Promise(res => setTimeout(res, 2500)),+          ]);+        }+      } catch (e) {}+      // Late-paint belt-and-suspenders: one more bottom re-assert well after settle.+      setTimeout(() => { reassertBottomAfterNav(sessionId).catch(() => {}); }, 3000);     }   }+  // Park now — after settle (url path) or right away (welcome-only path). The paint-raise+  // already happened off-screen; the window's first visible frame is full-size at z-bottom.+  kickoffPark();    // Belt and suspenders: close any tab in this Chrome that's NOT claimed by   // a registered session. This catches two cases: