← Commit history

Surface the owning AI thread on the taskbar hover preview (John's ask). pup was DISCARDING the caller identity AD stamps on every relayed bridge request (X-Adom-Caller-Thread / X-Adom-Caller-Container); it now captures both, stamps the FIRST thread to touch a session as that window's owner, tracks lastDrivenBy so a handoff stays visible, and LEADS the thumbnail tooltip with 'thread · container'. With ~20 threads running at once a pup window is effectively an AI thread, so this turns an anonymous Chrome preview into 'that's my adom-tsci thread'. The tooltip is the only UNCAPPED text surface on the preview (the header above the thumbnail is the window title and truncates ~25-30 chars). Also fixes a line that has been wrong since native-first: the tooltip claimed 'Chrome for Testing' unconditionally and now reports the browser actually driving the window, plus the sessionId.

John Lauer ·d3e4b4e485 ·3mo ago ·parent a070e5a
4 files changed +53−8
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.9.100",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.100/adom-bridge-puppeteer-v1.9.100.zip",-  "sha256": "c437fde40e2107fc55727e0b4cc349aa2aea71d8ab3e0e791f87caed9f3c2ff8",-  "size": 372001,+  "version": "1.9.101",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.101/adom-bridge-puppeteer-v1.9.101.zip",+  "sha256": "8110d29c918869bde609efd5b85a82ba79b3672225f37fbc68a0030f3a632adf",+  "size": 373085,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.100+1.9.101
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "1.9.100",+  "version": "1.9.101",   "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. 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, browser_alert_window posts a native toast whose click focuses the window, browser_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-desktop",   "author": "Adom Inc.",
src/server.js+47−2
@@ -2582,7 +2582,20 @@ const CAT_LABEL = { function buildThumbnailTooltip(session, sessionId) {   const cat = pupCategory(sessionId);   const tabs = (session.tabs || []).length;-  const lines = [`Adom Pup · ${CAT_LABEL[cat] || 'Browser window'}`];+  // v1.9.101 (John's ask) — LEAD WITH THE OWNING AI THREAD. The hover tooltip is the only UNCAPPED+  // text surface on the taskbar preview (the header above the thumbnail is the window TITLE and+  // truncates around 25-30 chars), so it is the right home for full attribution. With ~20 threads+  // running at once, "which conversation made this window" is the single most useful thing the user+  // can read here — it turns an anonymous Chrome preview into "oh, that's my adom-tsci thread".+  const lines = [];+  const who = session._ownerThread || session._lastThread || null;+  const where = session._ownerContainer || session._lastContainer || null;+  if (who) {+    lines.push(where ? `${who}  ·  ${where}` : `${who}`);+    // A handoff is worth showing: the window belongs to one thread but another just drove it.+    if (session._lastThread && session._lastThread !== who) lines.push(`last driven by: ${session._lastThread}`);+  }+  lines.push(`Adom Pup · ${CAT_LABEL[cat] || 'Browser window'}${who ? '' : ' · (no AI-thread identity yet)'}`);   try {     if (cat === 'mixed') {       // Name the distinct hosts so the user knows WHY it is mixed without opening it.@@ -2599,7 +2612,19 @@ function buildThumbnailTooltip(session, sessionId) {       }     }   } catch (e) {}-  lines.push(`Chrome for Testing · ${tabs} tab${tabs === 1 ? '' : 's'}`);+  // v1.9.101: report the browser ACTUALLY driving this window. This said "Chrome for Testing"+  // unconditionally, which has been wrong for every native-first window since v1.9.90.+  let browserLabel = 'Browser';+  try {+    const be = browsers.get(session.profileName);+    const chosen = be && be.browser && be.browser._pupChosen;+    if (chosen && chosen.kind) {+      browserLabel = chosen.kind === 'chrome-for-testing' ? 'Chrome for Testing'+        : chosen.kind === 'edge' ? 'Microsoft Edge'+        : chosen.kind === 'chrome' ? 'Google Chrome' : chosen.kind;+    }+  } catch (e) {}+  lines.push(`${browserLabel} · ${tabs} tab${tabs === 1 ? '' : 's'}  ·  session: ${sessionId}`);   return lines.join('\n'); } async function updateThumbnailTooltip(session, sessionId) {@@ -5930,6 +5955,26 @@ const server = http.createServer(async (req, res) => {       const command = body.command;       const args = body.args || {};       res._adomCommand = command; // v1.0.16: lets sendJSON inject this verb's _hint/related+      // v1.9.101 (John's ask) — CAPTURE WHO IS ASKING. AD stamps these on every bridge request it+      // relays (caller-identity contract, AD >=1.9.180); pup was throwing them away. A pup window+      // effectively IS an AI thread, and John runs ~20 at once, so surfacing "which thread owns this+      // window" is what lets him associate a window on his taskbar with the conversation that made it.+      // Attribution only — self-reported, unverifiable, never gate anything on it.+      const _callerThread = req.headers['x-adom-caller-thread'] || null;+      const _callerContainer = req.headers['x-adom-caller-container'] || null;++      // Record ownership on the session this verb targets: the FIRST thread to touch a session owns+      // it (that is the window's identity for the user); every later call refreshes lastDrivenBy so a+      // handoff is still visible rather than silently rewriting the owner.+      try {+        const _sid = args && args.sessionId;+        const _sess = _sid && sessions.get(_sid);+        if (_sess && _callerThread) {+          if (!_sess._ownerThread) { _sess._ownerThread = _callerThread; _sess._ownerContainer = _callerContainer; }+          _sess._lastThread = _callerThread;+          _sess._lastContainer = _callerContainer;+        }+      } catch (e) {}        // v1.8.23: AUTO-FLASH + agent-update tracking for state-mutating verbs on an EXISTING       // session (browser_open_window flashes from inside its own handler, once the session