← Commit history

Restructure taskbar identity as the three-mode ladder it really is: one taskbarMode picker (tiles, aumid, plain) replaces the stacked Thread Tiles and AUMID toggles in Settings, with the AUMID grouping and icon-style options dependent on aumid mode and overlay badges standing alone as an orthogonal toggle; the old keys still work underneath.

John Lauer ·02fe1d596d ·2mo ago ·parent 597ee0f
4 files changed +64−19
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "2.0.178",-  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.178/adom-bridge-puppeteer-v2.0.178.zip",-  "sha256": "f36bead4d4ffc7c0801c4999987978c82a5523518a170f62333d54fe5390c8d6",-  "size": 918052,+  "version": "2.0.179",+  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.179/adom-bridge-puppeteer-v2.0.179.zip",+  "sha256": "3b72fc96d7bcd7dfcfa8d1ab027e0c1f0d32931c717e9cf949977f5c5c8a8c18",+  "size": 918612,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-2.0.178+2.0.179
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "2.0.178",+  "version": "2.0.179",   "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+58−13
@@ -11494,10 +11494,9 @@ let SEENTOAST=0; // v1.9.259: the settings dialog. Rows defined once; state comes from SNAP.bridge.settings; every // change POSTs set-setting and answers back with a toast. const SETTINGS_DEF=[- {k:'threadTiles',l:'Thread Tiles',info:'Every AI thread you work in (the --ai-thread name: "kicad", "ah build", "shotlog") gets ONE taskbar button, and the icon for that button is the thread NAME itself, drawn in the Adom font on the Adom teal tile. All windows and tabs that thread owns collapse onto it, so a glance at the taskbar tells you which of your threads have windows open and where each one is. The name is rendered bottom-left so the little favicon badge in the top-right corner (which shows what the active tab is) covers as little of it as possible. Short names print big; longer ones wrap to two lines. Takes precedence over AUMID grouping and icon style; windows with no owning thread fall back to those normal modes.',d:'Group every window of one AI thread under ONE taskbar button whose icon is the thread NAME on the Adom teal tile. Examples below are live-rendered by the same code that draws the real icons.',dep:'aumidIcons',threadex:1},- {k:'aumidIcons',l:'AUMID taskbar icons',info:'AUMID = Application User Model ID, a feature built into Windows itself. Every taskbar button is really a GROUP: Windows collects windows that share the same ID onto one button. Normally all windows of one app share the app ID, which is why 5 Chrome windows stack under one Chrome button. But the ID can be set PER WINDOW: pup writes a unique ID onto each pup window using the Windows property system (the same mechanism apps like Office use), and Windows then gives that window its own taskbar button with its own icon. The catch, and why this is an experiment: whenever a window ID changes, Windows destroys and recreates its taskbar button, and that churn is a suspect in the Chrome crashes. pup stamps each window exactly once, at creation, to minimize it.',d:'EXPERIMENT: give every pup window its OWN taskbar icon by stamping a per-window identity. Toggle on/off to test whether AUMID stamping is what crashes Chrome. Off = all windows share one Chrome button (current mode). Already-stamped windows keep their icon until closed.',img:'aumid'},- {k:'taskbarGrouping',l:'AUMID grouping',d:'Only applies when AUMID icons are on. split = one taskbar button per window. grouped = windows grouped BY CATEGORY when icon-style is "category" (up to 5 buttons: signed-in wiki, public wiki, open web, Adom app, plain — e.g. all your signed-in-wiki windows collapse under the one padlock button); with icon-style "standard" grouped collapses everything under a single Adom Pup button.',sel:['split','grouped'],dep:'aumidIcons',imgBy:{split:'groupsplit',grouped:'groupgrouped'}},- {k:'aumidIconStyle',l:'AUMID icon style',d:'Only applies when AUMID icons are on: standard = one pup tile for every window; category = the custom set (wiki signed-out, wiki signed-in padlock, world icon for the open web, adom app icon, mixed).',sel:['standard','category'],dep:'aumidIcons',imgBy:{standard:'iconstylestd',category:'iconstylecat'}},+ {k:'taskbarMode',mainsel:1,threadex:1,l:'Taskbar identity',info:'Three ALTERNATE modes for how pup brands your Windows taskbar, from most to least branded. TILES: every AI thread gets ONE button whose icon is the thread NAME drawn on the Adom teal tile - all of that thread\u2019s windows group under it, so the taskbar reads as a list of your threads. AUMID: every pup window gets its own button with a pup/category icon (per-window identity, no thread grouping) - the AUMID grouping and icon-style options below apply to this mode only. PLAIN: pup never touches identity; windows stack under the stock Chrome-for-Testing button like any unbranded app. The favicon overlay badge is separate - the Overlay badges toggle below works in tiles and aumid modes.',d:'tiles = one button per AI thread wearing the thread NAME (the default). aumid = one button per window with pup/category icons. plain = stock Chrome button, no branding. Example tiles below are live-rendered by the same code that draws the real icons.',sel:['tiles','aumid','plain']},+ {k:'taskbarGrouping',l:'AUMID grouping',d:'Only applies when AUMID icons are on. split = one taskbar button per window. grouped = windows grouped BY CATEGORY when icon-style is "category" (up to 5 buttons: signed-in wiki, public wiki, open web, Adom app, plain — e.g. all your signed-in-wiki windows collapse under the one padlock button); with icon-style "standard" grouped collapses everything under a single Adom Pup button.',sel:['split','grouped'],depMode:'aumid',imgBy:{split:'groupsplit',grouped:'groupgrouped'}},+ {k:'aumidIconStyle',l:'AUMID icon style',d:'Only applies when AUMID icons are on: standard = one pup tile for every window; category = the custom set (wiki signed-out, wiki signed-in padlock, world icon for the open web, adom app icon, mixed).',sel:['standard','category'],depMode:'aumid',imgBy:{standard:'iconstylestd',category:'iconstylecat'}},  {k:'jumpLists',l:'Jump lists',d:'The menu Windows shows when you right-click a pup taskbar icon (real screenshot below, captured on this machine). Requires AUMID icons on. Off by default. Quirk: the FIRST right-click can blip the menu closed — right-click again ~1s later and it holds (a Windows shell timing race, not a pup bug).',img:'jumplist'},  {k:'jlViewTasks',l:'',d:'Wiki view tasks: Switch to logged-in view / Switch to public view on every wiki window.',dep:'jumpLists',subtgl:1,img:'jlviewtasks'},  {k:'jlCloseAll',l:'',d:'The Close all pup windows task on every pup icon.',dep:'jumpLists',subtgl:1,img:'jlcloseall'},@@ -11568,7 +11567,14 @@ async function runImport(){ } function renderDlg(){   const st=(SNAP&&SNAP.bridge&&SNAP.bridge.settings)||{};+  st.taskbarMode=st.aumidIcons!=='on'?'plain':(st.threadTiles==='on'?'tiles':'aumid');   _q('#dlgBody').innerHTML=SETTINGS_DEF.map(def=>{+    // v2.0.172 (John: "in that section you should have tons of example taskbar icons like the aumid+    // section, so the user understands the difference"): Thread Tiles examples are LIVE-DRAWN by the+    // dialog (same teal, same font, same bottom-left anchor + wrap rules as the real .ico renderer),+    // so they can never drift from the icons Windows actually shows, and they need no shipped PNGs.+    const threadEx=def.threadex?'<div class="texwrap"><div class="texstrip" id="texstrip"></div>'+      +'<div class="texcap">Your real thread names, drawn exactly as the taskbar draws them. The badge in the corner is the favicon of the active tab.</div></div>':'';     const _imgName=def.imgBy?def.imgBy[st[def.k]]||def.imgBy[Object.keys(def.imgBy)[0]]:def.img;     const exImg=_imgName?'<img class="sexample" src="/dashboard/example?n='+_imgName+'&v='+PAGE_VERSION+'" alt="example" data-fallback="hide">':'';     if(def.slider){@@ -11586,20 +11592,20 @@ function renderDlg(){         +'<div class="tgl'+(on?' is-on':'')+'" role="switch" tabindex="0" aria-checked="'+on+'" aria-label="'+esc(def.d)+'" data-tgl="'+def.k+'"></div></div>';     }     if(def.sel){-      const on=!def.dep||st[def.dep]==='on';+      const on=def.depMode?(st.taskbarMode===def.depMode):(!def.dep||st[def.dep]==='on');+      const selHtml='<select data-sel="'+def.k+'" aria-label="'+esc(def.l||def.k)+'">'+def.sel.map(x=>'<option'+(st[def.k]===x?' selected':'')+'>'+x+'</option>').join('')+'</select>';+      // v2.0.179: mainsel = a top-level MODE row (label + info + description + examples + select),+      // used by the taskbar-identity ladder; plain sel rows stay compact subs.+      if(def.mainsel){+        return '<div class="srow"><div class="stxt"><div class="slbl">'+esc(def.l)+(def.info?' <span class="ibadge" data-tip="'+esc(def.info)+'">i</span>':'')+'</div><div class="sdesc">'+esc(def.d)+'</div>'+exImg+threadEx+'</div>'+selHtml+'</div>';+      }       return '<div class="sub'+(on?'':' sdis')+'" id="row-'+def.k+'"><div style="flex:1 1 auto;min-width:0"><span class="sdesc">'+esc(def.d)+'</span>'+exImg+'</div>'-        +'<select data-sel="'+def.k+'" aria-label="'+esc(def.l)+'">'+def.sel.map(x=>'<option'+(st[def.k]===x?' selected':'')+'>'+x+'</option>').join('')+'</select></div>';+        +selHtml+'</div>';     }     const on=st[def.k]==='on';     const testRow=def.testflash?'<div class="sub"><span class="sdesc">'+((SNAP&&SNAP.counts&&SNAP.counts.windows)||0)+' pup window(s) open right now; their taskbar buttons will flash. Note: Windows never flashes the button of the window you are LOOKING AT, so if this dashboard is your active window its own button stays unlit.</span>'       +'<button class="btn sm" data-act="flash-all" title="flash every open pup taskbar button so you can see what this looks like">test flash</button>'       +'<button class="btn sm" data-act="unflash-all" title="clear every taskbar flash">clear flash</button></div>':'';-    // v2.0.172 (John: "in that section you should have tons of example taskbar icons like the aumid-    // section, so the user understands the difference"): Thread Tiles examples are LIVE-DRAWN by the-    // dialog (same teal, same font, same bottom-left anchor + wrap rules as the real .ico renderer),-    // so they can never drift from the icons Windows actually shows, and they need no shipped PNGs.-    const threadEx=def.threadex?'<div class="texwrap"><div class="texstrip" id="texstrip"></div>'-      +'<div class="texcap">Your real thread names, drawn exactly as the taskbar draws them. The badge in the corner is the favicon of the active tab.</div></div>':'';     return '<div class="srow"><div class="stxt"><div class="slbl">'+esc(def.l)+(def.info?' <span class="ibadge" data-tip="'+esc(def.info)+'">i</span>':'')+'</div><div class="sdesc">'+esc(def.d)+'</div>'+exImg+threadEx+testRow+'</div>'       +'<div class="tgl'+(on?' is-on':'')+'" role="switch" tabindex="0" aria-checked="'+on+'" aria-label="'+esc(def.l)+'" data-tgl="'+def.k+'"></div></div>';   }).join('')+importSectionHtml();@@ -11901,6 +11907,22 @@ const server = http.createServer(async (req, res) => {             titleTag: ['on', 'off'], titlePrefix: ['on', 'off'],           };           const key = String(a.key || ''); let val = a.value;+          // v2.0.179: taskbarMode — the dialog's 3-way identity ladder (tiles | aumid | plain).+          // One key in the UI, mapped onto the two stored keys; full re-register + sweep so every+          // live window moves to the chosen mode immediately.+          if (key === 'taskbarMode') {+            if (!['tiles', 'aumid', 'plain'].includes(val)) return done({ ok: false, error: 'taskbarMode must be tiles|aumid|plain' });+            const pair = val === 'tiles' ? { aumidIcons: 'on', threadTiles: 'on' }+              : val === 'aumid' ? { aumidIcons: 'on', threadTiles: 'off' }+              : { aumidIcons: 'off', threadTiles: 'off' };+            savePupSettings({ ...pair, _chosen: { ...(pupSettings()._chosen || {}), aumidIcons: true, threadTiles: true } });+            console.log(`[settings] taskbarMode -> ${val} (dashboard dialog)`);+            for (const [, s7] of [...sessions]) { try { s7._curAppId = null; s7._frozenAppId = null; } catch (e) {} }+            try { _registeredPupAumids.clear(); } catch (e) {}+            brandSweep('settings-taskbarmode').catch(() => {});+            reconcileModel('setting taskbarMode').catch(() => {});+            return done({ ok: true, settings: pupSettings() });+          }           if (key === 'floatyHitPx') {             val = Math.max(6, Math.min(200, Number(val) || 24));           } else if (key === 'fgCaptionMs') {@@ -13197,6 +13219,27 @@ const server = http.createServer(async (req, res) => {           return;         }         case 'pup_configure': {+          // v2.0.179 (John: "Tile Icons are an ALTERNATE to the AUMID icons which are an alternate+          // to plain CfT icons"): taskbarMode is the one-key ladder — 'tiles' (thread name tiles,+          // the default), 'aumid' (per-window/category icons), 'plain' (no branding, stock Chrome+          // button). It maps onto the two underlying keys so old callers keep working; overlays+          // stay their own orthogonal overlayBadges toggle.+          const tm = args.taskbarMode;+          if (tm !== undefined && !['tiles', 'aumid', 'plain'].includes(tm)) {+            sendJSON(res, { success: false, error: `taskbarMode must be one of tiles|aumid|plain` });+            return;+          }+          if (tm) {+            const pair = tm === 'tiles' ? { aumidIcons: 'on', threadTiles: 'on' }+              : tm === 'aumid' ? { aumidIcons: 'on', threadTiles: 'off' }+              : { aumidIcons: 'off', threadTiles: 'off' };+            savePupSettings({ ...pair, _chosen: { ...(pupSettings()._chosen || {}), aumidIcons: true, threadTiles: true } });+            console.log(`[configure] taskbarMode -> ${tm} (${JSON.stringify(pair)})`);+            for (const [, s] of [...sessions]) { try { s._curAppId = null; s._frozenAppId = null; } catch (e) {} }+            try { _registeredPupAumids.clear(); } catch (e) {}+            brandSweep('configure-taskbarmode').catch(() => {});+            reconcileModel('setting taskbarMode').catch(() => {});+          }           // v1.8.82: user-facing pup preferences. Currently: taskbarGrouping 'split'|'grouped'.           const valid = ['split', 'grouped'];           const g = args.taskbarGrouping;@@ -13296,7 +13339,9 @@ const server = http.createServer(async (req, res) => {           const _gHint = g             ? `taskbarGrouping is now "${g}" — on Windows, ${g === 'grouped' ? 'all pup windows stack under ONE "Adom Pup" taskbar button and its badge shows the WINDOW count' : 'each pup window gets its OWN taskbar button wearing its tab count'}. ${_effect}`             : `Current pup settings. Set with e.g. {"taskbarGrouping":"grouped"}.${_isWin ? '' : ' Both taskbarGrouping and agentActivity are Windows-only in effect; they are stored but inert here.'}`;-          sendJSON(res, { success: true, output: JSON.stringify({ ok: true, settings: pupSettings(), platform: process.platform, taskbarSupported: _isWin, _hint: _gHint }) });+          const _sOut = pupSettings();+          const _tmOut = _sOut.aumidIcons !== 'on' ? 'plain' : (_sOut.threadTiles === 'on' ? 'tiles' : 'aumid');+          sendJSON(res, { success: true, output: JSON.stringify({ ok: true, settings: { ..._sOut, taskbarMode: _tmOut }, platform: process.platform, taskbarSupported: _isWin, _hint: _gHint }) });           return;         }                 case 'pup_my_windows': {