← Commit history

bridge 0.0.38: on a VM (user on their laptop via RDP), RAISE the UAC immediately instead of waiting for a toast tap - the UAC shows in their RDP session; fixes 'never saw the UAC'

John Lauer ·ad0cb32446 ·4mo ago ·parent 6b0a416
5 files changed +29−13
bridge/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.0.37\ No newline at end of file+0.0.38\ No newline at end of file
bridge/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "native-browser",   "displayName": "Adom Native Browser (Chrome + Edge)",-  "version": "0.0.37",+  "version": "0.0.38",   "expectedExtensionVersion": "0.0.20",   "description": "Drives the user's REAL signed-in Chrome/Edge via an installed extension (native-messaging transport). Mirrors the puppeteer bridge's verb surface as nbrowser_* but runs inside the actual logged-in profile, so cookies/SSO/saved-logins/captcha human-trust all work. The bridge binds an ephemeral loopback port (PORTS.md compliant) and writes a discovery file; the native-messaging host pumps stdio <-> this bridge; the extension never touches a TCP port.",   "homepage": "https://wiki.adom.inc/adom/adom-browser-extension",
bridge/package.json+1−1
@@ -1,6 +1,6 @@ {   "name": "adom-native-browser-bridge",-  "version": "0.0.37",+  "version": "0.0.38",   "private": true,   "description": "adom-desktop bridge for the Adom native-browser extension (Chrome + Edge)",   "main": "server.js",
bridge/server.js+22−6
@@ -560,12 +560,28 @@ async function _elevatedChromeWithNotify(msiPath) {     const c = detectChrome(); return c || await pollChrome(30 * 1000);   }   const doneToast = () => _notify({ id, level: 'success', title: 'Chrome is installed ✓', body: 'Google Chrome is ready. Next: sign into your Google account, then load the Adom extension (setting-up-native-chrome).' });-  // Fire ONE sticky "Approve now" toast, then poll QUIETLY for the tap (or chrome appearing) for the-  // whole window. Do NOT re-fire on a timer - that stacked toasts up and stormed the user. Re-notify-  // ONLY after an actual tap whose UAC didn't complete, so they can retry. scenario:reminder keeps the-  // single toast sticky. The toast is routed by _notify to the user's desktop even when this bridge runs-  // on a VM (the UAC is on THIS host, but the toast must reach the user's LAPTOP) - the body names ${host}-  // so they know where to approve (they keep an RDP session open to the VM).++  // Is the user on a DIFFERENT machine? (this bridge runs on a VM; the user watches it over RDP from their+  // laptop.) Then the UAC will appear on THIS host - VISIBLE in their open RDP session - and the alert+  // toast lands on their LAPTOP (a different machine), which the VM's secure desktop can't hide. So do NOT+  // wait for a tap first (that left the UAC never raised and the user, watching the VM, saw nothing - the+  // exact bug). Alert + raise the UAC RIGHT AWAY; they click YES in their RDP window. Retry once.+  const remote = (await _notifyTarget()) === 'all';+  if (remote) {+    for (let attempt = 0; attempt < 2; attempt++) {+      await _notify({ id, level: 'warning', scenario: 'reminder',+        title: attempt ? `Chrome still needs approval on ${host}` : `Chrome needs your approval on ${host}`,+        body: `A Windows UAC prompt is opening on ${host} (your open RDP session) to install Google Chrome - click YES on it.` });+      await _raiseElevatedMsi(msiPath);                  // shows the UAC on THIS host; -Wait blocks until answered+      const c = detectChrome() || await pollChrome(20 * 1000);+      if (c) { await doneToast(); return c; }+    }+    return null;+  }++  // LOCAL (user's OWN machine): notify-FIRST, wait for the tap, THEN raise - so the LOCAL secure desktop+  // doesn't hide the LOCAL toast before they've read it. Re-notify ONLY after a tap whose UAC didn't+  // complete (never on a timer - that stormed the user). scenario:reminder keeps the single toast sticky.   const fireToast = (again) => _notify({ id, level: 'warning', scenario: 'reminder', buttons: [{ label: 'Approve now' }],     title: again ? 'Chrome still needs approval' : 'Chrome needs your approval',     body: `Tap 'Approve now', then click YES on the Windows security prompt to install Google Chrome on ${host}.` });
native-browser-bridge-manifest.json+4−4
@@ -1,8 +1,8 @@ {   "manifest_version": 1,-  "version": "0.0.37",-  "url": "https://wiki.adom.inc/download/adom/adom-browser-extension/0.0.37/native-browser-bridge-v0.0.37.bin",-  "sha256": "b1da66ff2ec964804756ea2c43c98ae72bea3392d7d836af467089aae3325582",-  "size": 43980,+  "version": "0.0.38",+  "url": "https://wiki.adom.inc/download/adom/adom-browser-extension/0.0.38/native-browser-bridge-v0.0.38.bin",+  "sha256": "861630936453a2e34e79eae9c37065e64b8b7d872521401e602942ed7efbdf08",+  "size": 44233,   "released_at": "2026-07-06T00:00:00Z" }\ No newline at end of file