← Commit history

Brand the jump-list header row: pass hwnd plus headerIcon to desktop_set_window_jumplist (AD 1.9.153). hwnd is required, titleContains silently no-ops. Log headerBranded and iconCheck so it is verifiable in code

John Lauer ·f5eed14ce1 ·3mo ago ·parent a376834
4 files changed +32−8
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.9.59",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.59/adom-bridge-puppeteer-v1.9.59.zip",-  "sha256": "3a638f12d819327639bf6ebfb958d5c94f2c33b60d5770187a3c9bcd1f70b15b",-  "size": 302619,+  "version": "1.9.60",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.60/adom-bridge-puppeteer-v1.9.60.zip",+  "sha256": "799fde79d0df39674e5eed132fdf0d46409329c9b8da6d146fd133d3d929f540",+  "size": 303317,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.59+1.9.60
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "1.9.59",+  "version": "1.9.60",   "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+26−2
@@ -2165,13 +2165,37 @@ async function updateWikiJumplist(session, sessionId) {     await registerPupAumid(appId, sessionId);     if (!_registeredPupAumids.has(appId)) return;   }+  // v1.9.60 — BRAND THE JUMP-LIST HEADER ROW (AD >= 1.9.153).+  //+  // The header row (the "Adom Pup" app tile above Pin/Close) is branded by passing `headerIcon` to+  // desktop_set_window_jumplist. TWO non-obvious requirements, both measured:+  //   1. You MUST pass `hwnd`. With only appId, AD cannot locate the window to write the per-window+  //      Relaunch* props on and silently returns headerBranded:false with an EMPTY headerFields and+  //      NO error. `titleContains` does NOT work here either (also headerBranded:false) even though+  //      it works on desktop_set_window_identity. hwnd is the only locator that brands the header.+  //   2. The .ico must pass AD's iconCheck — in particular its 256px entry must be PNG-compressed,+  //      or the shell paints the generic white document regardless (the Vista+ rule that had all of+  //      our icons failing until 1.9.58).+  // The response carries headerBranded / headerFields / headerIconCheck, so this is verifiable in+  // code — no more "right-click it and tell me what you see".+  let hwnd = null;   try {-    const r = await chrome.adCommand('desktop_set_window_jumplist', { appId, tasks }, { timeoutMs: 6000 });+    const fw = adPayload(await chrome.adCommand('desktop_find_window', { titleContains: `(session: ${sessionId}` }, { timeoutMs: 5000 }));+    hwnd = fw && fw.best && fw.best.hwnd;+  } catch (e) {}+  try {+    const payload = { appId, tasks };+    if (hwnd) { payload.hwnd = hwnd; payload.headerIcon = pupIconPath(sessionId); }+    const r = await chrome.adCommand('desktop_set_window_jumplist', payload, { timeoutMs: 6000 });     const raw = r && (typeof r.output === 'string' ? r.output : JSON.stringify(r.output || ''));     if (_isUnknownVerb(r, raw)) { _jumplistSupported = false; return; }     _jumplistSupported = true;     session._wikiJumplistView = view;-    console.log(`[jumplist] "${sessionId}" set ${tasks.length} task(s) on ${appId} (view=${view || 'none'}${view ? '+' : ''}close-all)`);+    // Surface the header-branding outcome: it is the ONLY programmatic signal that the app-tile row+    // actually took our icon (the rendered menu itself cannot be captured from the cloud).+    let hb = null, hic = null;+    try { const o2 = raw ? JSON.parse(raw) : {}; const d2 = o2.data || o2; hb = d2.headerBranded; hic = d2.headerIconCheck; } catch (e) {}+    console.log(`[jumplist] "${sessionId}" set ${tasks.length} task(s) on ${appId} (view=${view || 'none'}${view ? '+' : ''}close-all) headerBranded=${hb}${hic && hic.ok === false ? ` ICONCHECK_FAILED:${(hic.issues || []).join('; ')}` : ''}`);   } catch (e) {} } // v1.8.80: TAB-COUNT overlay badge (John: "if the ai opens 8 tabs that makes that pup window