← Commit history

Stamp-once-then-freeze taskbar identity (option B): after a per-session window is branded with its first real category, freeze the appId so later category changes (e.g. adding a web tab -> mixed) never recreate the taskbar button, jump-list, or overlay again. Zero multi-tab churn; tile may be slightly stale by design.

John Lauer ·5e796d91ef ·2mo ago ·parent 70cd68b
4 files changed +19−8
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "2.0.6",-  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.6/adom-bridge-puppeteer-v2.0.6.zip",-  "sha256": "f3ab564aecdc3c3ee1c95f44f68e6426a43c6eed69c60c8705167a26834117c3",-  "size": 638521,+  "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,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-2.0.6+2.0.7
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "2.0.6",+  "version": "2.0.7",   "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−2
@@ -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; } await reconcileModel('notched-icons-ready'); } catch (e) {}+    try { for (const [, s] of sessions) { s._curAppId = null; s._lastCat = undefined; s._frozenAppId = null; } await reconcileModel('notched-icons-ready'); } catch (e) {}   })();   return _notchReady; }@@ -3402,10 +3402,19 @@ async function stampPupIdentity(sessionId, opts) {     // "standard" style still collapses to the single Adom.Pup button (one icon, so per-category buttons     // would be pointless). Split is unchanged (one button per window).     const _catGroup = grouped && pupSettings().aumidIconStyle === 'category';-    const appId = _dashInfra ? `${PUP_APP_ID}.Dashboard.${PUP_ICON_GEN}`+    let appId = _dashInfra ? `${PUP_APP_ID}.Dashboard.${PUP_ICON_GEN}`       : _catGroup ? `${PUP_APP_ID}.${cat}.${PUP_ICON_GEN}`       : grouped ? PUP_APP_ID       : `${PUP_APP_ID}.${sessionId}.${cat}.${PUP_ICON_GEN}`;+    // v2.0.7 (John chose "stamp once, then freeze"): once a per-session window has been branded with a+    // real category, DO NOT re-stamp it when its category later changes (e.g. adding a web tab to a wiki+    // window flips the category to "mixed"). Every category change recreates the taskbar button plus its+    // jump-list and overlay — the multi-tab churn John kept catching. Freezing the appId after the first+    // real stamp trades a possibly-stale tile (a wiki window that later goes mixed still reads "wiki")+    // for ZERO taskbar churn for the window's life. Grouped/dashboard keep their own identities; the+    // active-tab favicon overlay still updates (that is the point, not churn), and the jump-list still+    // follows a view (public<->authed) flip since that changes the menu, not the button.+    if (sess && sess._frozenAppId && !_dashInfra && !grouped) appId = sess._frozenAppId;     const prevAppId = sess && sess._curAppId;     // v1.9.279 THE IDEMPOTENCY GATE: only touch the window when its identity actually changes.     // desktop_set_window_identity RECREATES the taskbar button every call, so firing it when nothing@@ -3482,6 +3491,8 @@ async function stampPupIdentity(sessionId, opts) {       console.log(`[identity] "${sessionId}" stamped appId=${appId}: ${(data.applied || []).join(',') || 'ok'}`);       if (sess && prevAppId !== appId) {         sess._curAppId = appId;+        // v2.0.7: freeze the identity at this first real stamp — no re-stamp on later category changes.+        if (!_dashInfra && !grouped) sess._frozenAppId = appId;         // v1.9.245: the stamp DESTROYED and RECREATED the taskbar button, so whatever overlay was         // painted is gone from glass. Mark bare so the 10s enforcer repaints the new button; also         // drop the cached hwnd — the new button may live on a new handle.