← Commit history

1.8.79: brand sweep at startup/rescan unifies icon generations on live windows

John Lauer ·c12fcbf561 · ·parent 04b4ea2
5 files changed +43−6
CHANGELOG.md+9
@@ -1,5 +1,14 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.79 — 2026-07-18 — Brand sweep: no more mixed icon generations++Identity is per-HWND and stamped at birth, so windows born across rebrands/updates left the+taskbar showing MIXED icon generations (plus dead-session ghosts inflating the count). New+`brandSweep` re-asserts each live session's title suffix (title churn can make a window+un-resolvable) and re-stamps it to the CURRENT identity — at startup (post-reattach) and after+every browser_rescan. Any future icon change now propagates to already-open windows within+seconds of the bridge update instead of never.+ ## 1.8.78 — 2026-07-18 — AD-version awareness: warn when the raise gate is bypassed  Every AD capability gap self-gates silently (identity → badge, bottom/force → PS fallback) EXCEPT
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.8.78",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.78/adom-bridge-puppeteer-v1.8.78.zip",-  "sha256": "bb4910c431530d6f86b4dfe6bcfe335c9d87d7b8cd7cb879cfa095d7b49a9949",-  "size": 191056,+  "version": "1.8.79",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.79/adom-bridge-puppeteer-v1.8.79.zip",+  "sha256": "9a25953370fa3c3f05df7dad3562e00b50dc94fbe54b850f406c176c481c0a30",+  "size": 191566,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.8.78\ No newline at end of file+1.8.79\ 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.78",+  "version": "1.8.79",   "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+28
@@ -1664,6 +1664,32 @@ async function stampPupIdentity(sessionId) {     return ok;   } catch (e) { return false; } }+// v1.8.79: BRAND SWEEP — unify every live window to the CURRENT identity art. Windows keep+// the identity they were stamped with at birth (per-HWND, AD-cached HICON), so after an icon+// rebrand or a bridge update the taskbar shows MIXED GENERATIONS (John caught a museum of+// today's six releases). The sweep re-asserts each session's title suffix (title churn can+// strand a window un-resolvable) then re-stamps it. Runs at startup (post-reattach) and after+// every rescan.+async function brandSweep(reason) {+  if (process.platform !== 'win32') return;+  let n = 0;+  for (const [sid, sess] of sessions) {+    try {+      const tab = sess.tabs && sess.tabs[0];+      if (!tab || !tab.page) continue;+      // re-assert the title suffix so AD's resolver can find the window even after title churn+      try {+        await tab.page.evaluate((suffix) => {+          try { if (document.title.indexOf(suffix) === -1) document.title += suffix + ')'; } catch (e) {}+        }, ` (session: ${sid}`);+      } catch (e) {}+      const ok = await brandPupWindow(sid);+      if (ok) n++;+    } catch (e) {}+  }+  if (n) console.log(`[brand-sweep] (${reason}) re-branded ${n} window(s) to current identity`);+}+ // Brand a pup window: full identity on capable AD, overlay badge fallback on older AD. async function brandPupWindow(sessionId) {   const stamped = await stampPupIdentity(sessionId);@@ -4088,6 +4114,7 @@ const server = http.createServer(async (req, res) => {           try {             const adoptOrphans = !!args.adoptOrphans;             const stats = await rescanAllProfiles({ adoptOrphans });+            brandSweep('rescan').catch(() => {}); // v1.8.79: unify icons on re-adopted windows             // Build the post-rescan session list so callers can verify             // their sessionId is back. liveSessions are usable; disconnected             // are still awaiting Chrome to reappear (PID gone or port dead).@@ -5963,6 +5990,7 @@ server.listen(PORT, BIND_HOST, async () => {   // trusted transport, no relay gating. Self-gates on AD <1.9.134 (unknown verb).   setTimeout(() => { ensurePupIdentityRegistered().catch(() => {}); }, 2500);   setTimeout(() => { probeAdVersion().catch(() => {}); }, 1500);+  setTimeout(() => { brandSweep('startup').catch(() => {}); }, 8000);    // Recover sessions from disk (reconnect to Chrome windows that survived bridge restart)   try {