← Commit history

1.8.84: grouped-mode dual counter (windows+tabs), flat badges without outlines

John Lauer ·fb12605353 · ·parent 815ec02
5 files changed +50−8
CHANGELOG.md+8
@@ -1,5 +1,13 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.84 — 2026-07-18 — Grouped-mode dual counter (windows + total tabs); flat badges++- Grouped mode's single button now shows TWO counters: window count (dark circle, upper-right)+  and total tab count (light teal circle, dark text, lower-left). Rendered at runtime via sharp+  from an SVG template (combos are dynamic), cached per pair; falls back to the static+  windows-count badge if sharp is unavailable. Single-window grouped shows a plain tab count.+- All badge circles are now FLAT — no white outline (per John), split badges regenerated.+ ## 1.8.83 — 2026-07-18 — Lighter tab-count badge  Per John: the badge circle no longer fills the whole overlay slot — ~60% size anchored
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.8.83",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.83/adom-bridge-puppeteer-v1.8.83.zip",-  "sha256": "6e0774309b278412909d25ab0240f8e6e5bcda665536cc65fdb78409a1b68ff2",-  "size": 204161,+  "version": "1.8.84",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.84/adom-bridge-puppeteer-v1.8.84.zip",+  "sha256": "98866d36e43a2c975b91b2163ffdd443974bb79c0a10327a79d3666ee5821177",+  "size": 202507,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.8.83\ No newline at end of file+1.8.84\ 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.83",+  "version": "1.8.84",   "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+36−2
@@ -1712,6 +1712,35 @@ function tabBadgeIcon(count) {     return b;   } catch (e) { return null; } }+// v1.8.84: DUAL counter for grouped mode (John: "1 for # of windows and then a total for the+// tabs"). Windows = dark circle upper-right (same language as the split badge); total tabs =+// light teal circle lower-left with dark text. Combos are dynamic -> rendered at runtime from+// an SVG template via sharp (already a dep), cached in memory per (wins,tabs) pair. If sharp+// is unavailable (optional dep), grouped mode falls back to the static windows-count badge.+const _dualBadgeCache = new Map();+async function dualBadgeB64(wins, tabs) {+  const key = `${wins}/${tabs}`;+  if (_dualBadgeCache.has(key)) return _dualBadgeCache.get(key);+  let sharpMod = null;+  try { sharpMod = require('sharp'); } catch (e) { return null; }+  const w = wins > 9 ? '9+' : String(wins);+  const t = tabs > 99 ? '99+' : String(tabs);+  const wSize = w.length > 1 ? 8.5 : 11;+  const tSize = t.length > 2 ? 6 : (t.length > 1 ? 7.5 : 10);+  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">+  <circle cx="21.5" cy="9.5" r="8.8" fill="#003d40"/>+  <text x="21.5" y="${9.5 + wSize * 0.36}" font-family="Segoe UI, Arial, sans-serif" font-size="${wSize}" font-weight="600" fill="#ffffff" text-anchor="middle">${w}</text>+  <circle cx="10" cy="22.5" r="8" fill="#7de8e2"/>+  <text x="10" y="${22.5 + tSize * 0.36}" font-family="Segoe UI, Arial, sans-serif" font-size="${tSize}" font-weight="600" fill="#003d40" text-anchor="middle">${t}</text>+</svg>`;+  try {+    const buf = await sharpMod(Buffer.from(svg)).resize(32, 32).png().toBuffer();+    const b64 = buf.toString('base64');+    _dualBadgeCache.set(key, b64);+    return b64;+  } catch (e) { return null; }+}+ async function updateTabCountBadge(session, sessionId) {   if (process.platform !== 'win32' || _identitySupported !== true) return; // overlay busy with brand badge on old AD   try {@@ -1719,9 +1748,14 @@ async function updateTabCountBadge(session, sessionId) {     // are meaningless on a grouped button). Applied to every window; last write paints the group.     if (pupSettings().taskbarGrouping === 'grouped') {       const wins = sessions.size;+      let totalTabs = 0;+      for (const [, s2] of sessions) totalTabs += (s2.tabs || []).length;+      let icon = null;+      if (wins >= 2) icon = (await dualBadgeB64(wins, totalTabs)) || tabBadgeIcon(wins);+      else if (totalTabs >= 2) icon = tabBadgeIcon(totalTabs); // single window: plain tab count       for (const [sid2] of sessions) {-        const args2 = wins >= 2-          ? { titleContains: `(session: ${sid2}`, overlay: { icon: tabBadgeIcon(wins), tooltip: `Adom Pup — ${wins} windows` } }+        const args2 = icon+          ? { titleContains: `(session: ${sid2}`, overlay: { icon, tooltip: `Adom Pup — ${wins} window${wins === 1 ? '' : 's'}, ${totalTabs} tab${totalTabs === 1 ? '' : 's'}` } }           : { titleContains: `(session: ${sid2}`, overlay: { badge: 'none' } };         try { await chrome.adCommand('desktop_taskbar', args2, { timeoutMs: 5000 }); } catch (e) {}       }