← Commit history

Freeze the jump-list too (option B): once a window's menu is committed to its frozen identity, never rebuild it on later view/active-tab changes. Completes the stamp-once-then-freeze so multi-tab windows produce ZERO taskbar rebuilds after settle.

John Lauer ·0c3ded070e ·2mo ago ·parent 5e796d9
4 files changed +19−10
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "2.0.7",-  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.7/adom-bridge-puppeteer-v2.0.7.zip",-  "sha256": "02ab8f65f1a9beeedbf61f4e030ae5690b9b7c19e29bcf3e1a293eb6d2ba15b7",-  "size": 638869,+  "version": "2.0.8",+  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.8/adom-bridge-puppeteer-v2.0.8.zip",+  "sha256": "76f9b1fd494ec980316cc4d41961ef0508734201ce9bee85b246e4c58a489b3a",+  "size": 639161,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-2.0.7+2.0.8
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "2.0.7",+  "version": "2.0.8",   "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. pup_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. pup_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. macOS (v1.9.74+): full parity with mac-native mechanics \u2014 background-by-default is the app-level hide (windows stay drivable/screenshottable while hidden), raise/lower map to unhide+activate/hide, pup_alert_window posts a native toast whose click focuses the window, pup_use {browser:'chrome',install:true} installs Chrome from the official dmg, and taskbar identity/badging remains Windows-only.",   "homepage": "https://wiki.adom.inc/adom/adom-bridge",   "author": "Adom Inc.",
src/server.js+13−4
@@ -3293,7 +3293,7 @@ function ensureNotchedIcons() {     console.log(`[notch] ready (${files.length} tiles, notch=${Math.round(NOTCH.frac * 100)}% upper-right) — forcing a re-stamp so buttons pick it up`);     // Force ONE re-stamp so live buttons swap to the notched icon (the appId is unchanged, but     // desktop_set_window_identity recreates the button, which is what repaints the tile).-    try { for (const [, s] of sessions) { s._curAppId = null; s._lastCat = undefined; s._frozenAppId = null; } await reconcileModel('notched-icons-ready'); } catch (e) {}+    try { for (const [, s] of sessions) { s._curAppId = null; s._lastCat = undefined; s._frozenAppId = null; s._jlFrozen = false; } await reconcileModel('notched-icons-ready'); } catch (e) {}   })();   return _notchReady; }@@ -3652,10 +3652,10 @@ async function refreshAllJumplists() {       const appId = s._curAppId; if (!appId) continue;       if (off) {         await chrome.adCommand('desktop_set_window_jumplist', { appId, tasks: [] }, { timeoutMs: 5000 });-        s._wikiJumplistKey = undefined;   // so a later re-enable re-commits from scratch+        s._wikiJumplistKey = undefined; s._jlFrozen = false;   // so a later re-enable re-commits from scratch         console.log(`[jumplist] "${sid}" CLEARED (jumpLists turned off)`);       } else {-        s._wikiJumplistKey = undefined;   // force a real re-commit with the new task set+        s._wikiJumplistKey = undefined; s._jlFrozen = false;   // force a real re-commit with the new task set         await updateWikiJumplist(s, sid);       }     } catch (e) {}@@ -3729,6 +3729,12 @@ async function updateWikiJumplist(session, sessionId, opts) {   // the appId changed, and EVERY CommitList rebuilds the menu — if one lands while the user is   // opening it, the shell dismisses it. That is the "first right-click does nothing, second works"   // wonkiness. One commit per (button, view), never a redundant one.+  // v2.0.7 (B, "stamp once then freeze"): once this window's jump-list has been committed for its+  // frozen identity, never rebuild it again. Category/active-tab/view changes (public->authed, or+  // switching to a web tab) otherwise re-key and re-CommitList — the multi-tab menu churn. The tasks+  // are the same for a wiki window regardless of view (both switch-view tasks always show), so freezing+  // costs at most a slightly stale menu, and buys zero churn — matching the appId freeze.+  if (session._jlFrozen) return;   const jlKey = `${appId}|${view || 'none'}|${pupSettings().jlViewTasks}|${pupSettings().jlCloseAll}`;   if (session._wikiJumplistKey === jlKey) return;   // v2.0.3: coalesce the jump-list settle churn. On open, the bare per-session appId and the@@ -3853,6 +3859,9 @@ async function updateWikiJumplist(session, sessionId, opts) {     _jumplistSupported = true;     session._wikiJumplistView = view;     session._wikiJumplistKey = jlKey;+    // v2.0.7 (B): the identity is frozen (a real category was stamped) and we've now committed this+    // window's menu to it — freeze the jump-list too, so no later view/tab change rebuilds it.+    if (session._frozenAppId) session._jlFrozen = true;     // 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;@@ -14216,7 +14225,7 @@ server.listen(PORT, BIND_HOST, async () => {   setTimeout(() => {     try {       let n = 0;-      for (const [, s] of sessions) { if (s) { s._wikiJumplistKey = undefined; n++; } }+      for (const [, s] of sessions) { if (s) { s._wikiJumplistKey = undefined; s._jlFrozen = false; n++; } }       if (n) console.log(`[jumplist] bridge start: forcing a re-commit on ${n} recovered session(s) so task commands match this version`);     } catch (e) {}     brandSweep('startup').catch(() => {});