← Commit history

v1.9.30: fix osRaiseSessionWindow targeting the launcher window via PowerShell instead of showing the session window via CDP

John Lauer ·482f943486 · ·parent d296433
5 files changed +27−9
CHANGELOG.md+11
@@ -1,5 +1,16 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.9.30 — 2026-07-20 — Fix the raise that reported success while the window stayed hidden++Root cause of "the toggle closed my window and never brought it back". osRaiseSessionWindow resolved+the browser PID as `_detachedPid || process().pid`, so for a DETACHED launch (every Windows pup+browser) it ran PowerShell SetForegroundWindow against the LAUNCHER pid's MainWindowHandle, which is+a different window than the session's. PowerShell dutifully reported "focused" each time while the+real window stayed hidden and unfindable. The proven browser_raise_os_window handler resolves the pid+as `process()` ONLY, which is null when detached, so it SKIPS PowerShell and relies on the CDP+place+maximize+bringToFront that actually works. The helper now matches it exactly. Verified live:+the same window that ignored seven in-code raises came back instantly via the verb's path.+ ## 1.9.29 — 2026-07-20 — CRITICAL: the wiki toggle destroyed tabs and could leave NO window  John clicked the jump-list login toggle on a 5-tab research window. The window closed, the captions
adom-bridge-puppeteer-manifest.json+5−5
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.9.29",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.29/adom-bridge-puppeteer-v1.9.29.zip",-  "sha256": "1f54422f0396f6a7ede60ded6aae644ab303e7a9485baf52fd83fb0157cda637",-  "size": 282793,+  "version": "1.9.30",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.30/adom-bridge-puppeteer-v1.9.30.zip",+  "sha256": "3c8c0529d1d3ef127c6ba3ab09e525be53f6d4e8950b05d44139ae001f79274f",+  "size": 283050,   "verbPrefixes": [     "browser_",     "desktop_recorder_",@@ -12,5 +12,5 @@   ],   "healthEndpoint": "/status",   "statusVerb": "browser_readiness",-  "released_at": "2026-07-20T03:00:00Z"+  "released_at": "2026-07-20T14:00:00Z" }
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.29\ No newline at end of file+1.9.30\ 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.9.29",+  "version": "1.9.30",   "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+9−2
@@ -2281,9 +2281,16 @@ async function osRaiseSessionWindow(session, sessionId) {     try { await session.page.bringToFront(); } catch (e) {}     session._foreground = true;     if (process.platform !== 'win32') return;+    // v1.9.30: resolve the PID EXACTLY like the proven browser_raise_os_window handler does:+    // browser.process() ONLY. For a DETACHED launch (every Windows pup browser) process() is null,+    // so the PS SetForegroundWindow step is SKIPPED and the CDP place+maximize+bringToFront above+    // is what shows the window — and that path demonstrably works. The old code fell back to+    // _detachedPid, which made PS raise the LAUNCHER pid's MainWindowHandle: a different window+    // than the session's. It reported "focused" every time while the real window stayed hidden,+    // which is why the wiki toggle left John with captions and no window.     const be = browsers.get(session.profileName);     let pid = null;-    try { pid = (be && be.browser && (be.browser._detachedPid || (be.browser.process() && be.browser.process().pid))) || null; } catch (e) {}+    try { pid = (be && be.browser && be.browser.process() && be.browser.process().pid) || null; } catch (e) {}     if (!pid) return;     const psScript = path.join(require('os').tmpdir(), '_adom_focus.ps1');     const psContent = [@@ -5070,7 +5077,7 @@ const server = http.createServer(async (req, res) => {           // leaving him with nothing. A switch that cannot show its window is a FAILED switch, so           // confirm the shell can see it and self-heal before reporting success.           let _visible = false;-          for (let i = 0; i < 6 && !_visible; i++) {+          for (let i = 0; i < 8 && !_visible; i++) {             try {               const fr = await chrome.adCommand('desktop_find_window', { titleContains: `(session: ${sessionId}` }, { timeoutMs: 5000 });               const fraw = fr && (typeof fr.output === 'string' ? fr.output : JSON.stringify(fr.output || ''));