← Commit history

1.8.82: browser_configure taskbarGrouping split|grouped as persisted user preference

John Lauer ·e50a7b7bad · ·parent a6c6a26
6 files changed +91−9
CHANGELOG.md+12
@@ -1,5 +1,17 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.82 — 2026-07-18 — browser_configure: taskbar grouping is now a user preference++John's insight from the AUMID grouping bug: BOTH behaviors are legitimate preferences. New+`browser_configure {taskbarGrouping: "split"|"grouped"}` (persisted in ~/.adom/pup-settings.json,+survives bridge updates):+- `split` (default): per-session AUMID — one taskbar button per window, each badged with its own+  tab count.+- `grouped`: shared AUMID — all pup windows stack under one "Adom Pup" button whose badge shows+  the WINDOW count.+Switching re-stamps live windows immediately (brand sweep) and refreshes badges. AIs are told to+ask the user before changing it.+ ## 1.8.81 — 2026-07-18 — Per-session AUMID: one taskbar button per window again  The shared Adom.Pup AUMID made Windows GROUP all pup windows into a single taskbar button —
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.8.81",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.81/adom-bridge-puppeteer-v1.8.81.zip",-  "sha256": "c98634d4e390b46da101611e0b0277efe20028fd340b1f460098508d72420192",-  "size": 206109,+  "version": "1.8.82",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.82/adom-bridge-puppeteer-v1.8.82.zip",+  "sha256": "5b8c554117c5203724945e88c17c345c2e5e1c5b51e120fae4af7e12d159e06b",+  "size": 207538,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
skills/pup-windows-sessions-tabs/SKILL.md+13
@@ -96,6 +96,19 @@ adom-desktop browser_screenshot  '{"sessionId":"job-web"}' adom-desktop browser_open_window '{"sessionId":"demo-web","owner":"demo","url":"<url>","foreground":true}' ``` +## Taskbar look — split vs grouped (user preference, `browser_configure`)++Each pup window wears the Adom Pup icon; how they arrange on the taskbar is the USER's choice:++- **`split` (default):** one taskbar button PER WINDOW, each badged with its own tab count+  (no badge = 1 tab). Best for telling AI threads apart: "the button with the 8 is my+  adom-google review window."+- **`grouped`:** all pup windows stack under ONE "Adom Pup" button; its badge shows the+  WINDOW count. Tidy taskbar for users who open many windows.++`browser_configure {"taskbarGrouping":"grouped"}` switches live (persists across updates).+**Ask the user before changing it — it's their taskbar.** Read current: `browser_configure {}`.+ ## One window, many tabs (multi-URL tasks)  For a vendor fetch / multi-doc review, put the URLs in **tabs of one window** (one taskbar icon), not
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.8.81\ No newline at end of file+1.8.82\ 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.81",+  "version": "1.8.82",   "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+60−3
@@ -1617,6 +1617,29 @@ function adUpgradeHint() {     ? ` ⚠ AD ${_adVersion} on this desktop is older than 1.9.124: it intercepts browser_raise_os_window natively, so pup's foreground gate (foregroundReason + audit trail) does NOT apply to raises here. Recommend the user update Adom Desktop (update_check / the footer banner) — everything else degrades gracefully, this is the one policy gap.`     : ''; }+// v1.8.82: PUP SETTINGS — user-configurable behavior, persisted OUTSIDE the bridge dir (the+// bridges-cache is clobbered on every update) in ~/.adom/pup-settings.json.+// taskbarGrouping (John's discovery while debugging the AUMID grouping):+//   'split'   (default) — per-session AUMID: ONE TASKBAR BUTTON PER WINDOW, each wearing its+//              own tab-count badge. Best for telling AI threads apart at a glance.+//   'grouped' — shared AUMID: ALL pup windows stack under ONE "Adom Pup" button (tidy taskbar);+//              the badge shows the WINDOW count (>=2) since per-window badges are meaningless+//              on a grouped button.+const PUP_SETTINGS_PATH = path.join(os.homedir(), '.adom', 'pup-settings.json');+let _pupSettings = null;+function pupSettings() {+  if (_pupSettings) return _pupSettings;+  try { _pupSettings = JSON.parse(fs.readFileSync(PUP_SETTINGS_PATH, 'utf8')); } catch (e) { _pupSettings = {}; }+  if (!_pupSettings.taskbarGrouping) _pupSettings.taskbarGrouping = 'split';+  return _pupSettings;+}+function savePupSettings(patch) {+  const cur = { ...pupSettings(), ...patch };+  try { fs.mkdirSync(path.dirname(PUP_SETTINGS_PATH), { recursive: true }); fs.writeFileSync(PUP_SETTINGS_PATH, JSON.stringify(cur, null, 2)); } catch (e) {}+  _pupSettings = cur;+  return cur;+}+ const PUP_APP_ID = 'Adom.Pup'; const PUP_DISPLAY_NAME = 'Adom Pup'; let _identitySupported = null;   // null = unprobed@@ -1659,7 +1682,7 @@ async function stampPupIdentity(sessionId) {     // pinnable Start Menu launcher.     const r = await chrome.adCommand('desktop_set_window_identity', {       titleContains: `(session: ${sessionId}`, cacheKey: `pup-${sessionId}`,-      appId: `${PUP_APP_ID}.${sessionId}`, displayName: PUP_DISPLAY_NAME, iconPath: pupIconPath(),+      appId: pupSettings().taskbarGrouping === 'grouped' ? PUP_APP_ID : `${PUP_APP_ID}.${sessionId}`, displayName: PUP_DISPLAY_NAME, iconPath: pupIconPath(),     }, { timeoutMs: 6000 });     const raw = r && (typeof r.output === 'string' ? r.output : JSON.stringify(r.output || ''));     if ((r && r.success === false) || _isUnknownVerb(r, raw)) {@@ -1692,6 +1715,18 @@ function tabBadgeIcon(count) { async function updateTabCountBadge(session, sessionId) {   if (process.platform !== 'win32' || _identitySupported !== true) return; // overlay busy with brand badge on old AD   try {+    // grouped mode: the single stacked button's badge = WINDOW count (per-window tab counts+    // are meaningless on a grouped button). Applied to every window; last write paints the group.+    if (pupSettings().taskbarGrouping === 'grouped') {+      const wins = sessions.size;+      for (const [sid2] of sessions) {+        const args2 = wins >= 2+          ? { titleContains: `(session: ${sid2}`, overlay: { icon: tabBadgeIcon(wins), tooltip: `Adom Pup — ${wins} windows` } }+          : { titleContains: `(session: ${sid2}`, overlay: { badge: 'none' } };+        try { await chrome.adCommand('desktop_taskbar', args2, { timeoutMs: 5000 }); } catch (e) {}+      }+      return;+    }     const count = (session.tabs || []).length;     if (count >= 2) {       const icon = tabBadgeIcon(count);@@ -3877,6 +3912,7 @@ const server = http.createServer(async (req, res) => {             V('desktop_record_status', 'Status of the desktop screen recorder + any active clip.', {}, 10, {}),             V('desktop_record_list', 'List completed desktop recordings on disk.', {}, 10, {}),             V('desktop_recorder_close', 'Close the desktop screen-recorder UI.', {}, 15, {}),+            V('browser_configure', 'Get/set user-facing pup preferences (persisted across bridge updates). taskbarGrouping: "split" (default — one taskbar button PER WINDOW, each badged with its own tab count; best for telling AI threads apart) | "grouped" (all pup windows stack under ONE "Adom Pup" button, badge shows window count; tidy taskbar). Applies to live windows immediately. Ask the USER which they prefer before changing it — this is their taskbar.', { taskbarGrouping: 'optional "split"|"grouped"' }, 15, { taskbarGrouping: 'grouped' }),             V('browser_describe', 'This list — the bridge\'s verbs + schemas, for AD\'s Verbs tab.', {}, 10, {}),           ] });           return;@@ -4141,7 +4177,28 @@ const server = http.createServer(async (req, res) => {           sendJSON(res, { success: true, output: JSON.stringify({ sessions: list, count: list.length, activeSession: activeSessionId }) });           return;         }-        case 'browser_rescan': {+        case 'browser_configure': {+          // v1.8.82: user-facing pup preferences. Currently: taskbarGrouping 'split'|'grouped'.+          const valid = ['split', 'grouped'];+          const g = args.taskbarGrouping;+          if (g !== undefined && !valid.includes(g)) {+            sendJSON(res, { success: false, error: `taskbarGrouping must be one of ${valid.join('|')}`, });+            return;+          }+          if (g) {+            savePupSettings({ taskbarGrouping: g });+            console.log(`[configure] taskbarGrouping -> ${g}`);+            // re-stamp every live window under the new identity scheme + refresh badges+            brandSweep('configure').then(async () => {+              try { const first = sessions.values().next().value; if (first) await updateTabCountBadge(first, sessions.keys().next().value); } catch (e) {}+              // split mode: refresh each window's own tab badge+              if (g === 'split') { for (const [sid, sess] of sessions) { updateTabCountBadge(sess, sid).catch(() => {}); } }+            }).catch(() => {});+          }+          sendJSON(res, { success: true, output: JSON.stringify({ ok: true, settings: pupSettings(), _hint: g ? `taskbarGrouping is now "${g}" — ${g === 'grouped' ? 'all pup windows stack under ONE "Adom Pup" taskbar button; its badge shows the WINDOW count' : 'each pup window gets its OWN taskbar button wearing its tab count'}. Applied to live windows immediately; persists across bridge updates (~/.adom/pup-settings.json).` : 'Current pup settings. Set with e.g. {"taskbarGrouping":"grouped"}.' }) });+          return;+        }+                case 'browser_rescan': {           // v1.5.1+: orphan-recovery primitive. Walk every known profile           // (in-memory + on-disk session files), attempt reconnect for any           // whose CDP socket dropped, then walk pages of every connected@@ -5818,7 +5875,7 @@ const server = http.createServer(async (req, res) => {         }          default:-          sendJSON(res, { success: false, error: `Unknown command: ${command}. Valid commands: browser_open_window, browser_switch_window, browser_list_windows, browser_close_window, browser_alert_window, browser_focus_window, browser_open_tab, browser_switch_tab, browser_close_tab, browser_list_tabs, browser_screenshot, browser_screenshot_full_res, browser_eval, browser_errors, browser_reload, browser_navigate, browser_status, browser_close, browser_wait, desktop_recorder_open, desktop_record_start, desktop_record_stop, desktop_record_status, desktop_record_list, desktop_recorder_close, desktop_list_monitors, browser_record_start, browser_record_stop, browser_record_status, browser_record_list. Tab-aware commands (screenshot, eval, errors, reload, navigate) accept an optional "tabId" to target a specific tab.` }, 404);+          sendJSON(res, { success: false, error: `Unknown command: ${command}. Valid commands: browser_open_window, browser_switch_window, browser_list_windows, browser_close_window, browser_alert_window, browser_focus_window, browser_open_tab, browser_switch_tab, browser_close_tab, browser_list_tabs, browser_screenshot, browser_screenshot_full_res, browser_eval, browser_errors, browser_reload, browser_navigate, browser_status, browser_configure, browser_close, browser_wait, desktop_recorder_open, desktop_record_start, desktop_record_stop, desktop_record_status, desktop_record_list, desktop_recorder_close, desktop_list_monitors, browser_record_start, browser_record_stop, browser_record_status, browser_record_list. Tab-aware commands (screenshot, eval, errors, reload, navigate) accept an optional "tabId" to target a specific tab.` }, 404);           return;       }     }