← Commit history

v0.16.9 (insiders): nbrowser_chrome_status.notifications now also reads ab's own notification permissions (bannersEnabled, urgentAllowed): a box that never granted Adom Bridge the one-time Allow-important-notifications permission hides every toast under Do Not Disturb, and the status says so and names the fix (nb-bridge#45).

John Lauer ·15a2a48b45 ·2mo ago ·parent 2a208ad
6 files changed +21−10
bin/nb-dashboard+1−1
@@ -20,7 +20,7 @@ const { execFile, spawn } = require('child_process'); const fs = require('fs'); const crypto = require('crypto'); -const VERSION = '0.16.8';           // keep in lockstep with package.json (pkg version)+const VERSION = '0.16.9';           // keep in lockstep with package.json (pkg version) // SEND TO AI IS UN-PARKED (John: "yeah, we are re-enabling the send to ai. it seems to be good now"). // The ah build thread certified the crash family dead on the gate-fixed build and the delivery leg is // proven end to end. The park const is DELETED rather than flipped, so no dead branch can resurrect it.
bridge/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.16.8\ No newline at end of file+0.16.9\ 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",-  "version": "0.16.8",+  "version": "0.16.9",   "expectedExtensionVersion": "0.2.10",   "description": "Drives the user's REAL signed-in Chrome/Edge, in two layers. Layer 1 (nb) needs NOTHING installed and works on any machine: nbrowser_open_os_window (open a URL in the user's real profile, background+flashing, the OAuth/consent path), nbrowser_os_windows, nbrowser_profiles, nbrowser_wake_profile, nbrowser_force_close. Layer 2 (nbe, the Adom Native Browser Extension) unlocks the rest: CDP driving (navigate/click/read/screenshot) inside their logged-in profile. The bridge binds an ephemeral loopback port and the native-messaging host pumps stdio <-> bridge.",   "homepage": "https://wiki.adom.inc/adom/nb-bridge",
bridge/package.json+1−1
@@ -1,6 +1,6 @@ {   "name": "adom-native-browser-bridge",-  "version": "0.16.8",+  "version": "0.16.9",   "private": true,   "description": "Native-browser bridge for Bridge (ab): layer 1 (nb) plus layer 2 via nbe, the Adom Native Browser Extension (Chrome + Edge).",   "main": "server.js",
bridge/server.js+16−5
@@ -1273,9 +1273,20 @@ async function notificationSwitches() {   const a = await _regDword(base + '\\inc.adom.bridge', 'Enabled');   const toastsEnabled = g === null ? true : g !== 0;          // absent = Windows default = on   const adomBridgeEnabled = a === null ? true : a !== 0;-  const v = { checked: true, toastsEnabled, adomBridgeEnabled, toastMayBeMuted: !(toastsEnabled && adomBridgeEnabled),-    _hint: !toastsEnabled ? 'Windows Do Not Disturb (or all notifications) is ON on this PC: toasts fold into the notification center unseen. Ask the user to turn Do Not Disturb off, or to answer Windows\' one-time "Allow important notifications from Adom Bridge?" prompt.'-         : !adomBridgeEnabled ? 'Notifications for Adom Bridge are switched OFF in Windows Settings > Notifications: its toasts never show. Ask the user to turn them on.'+  // ab is the authority on its own toast identity: /status carries desktop.permissions.notifications with+  // bannersEnabled and urgentAllowed (the one-time "Allow important notifications" permission). Without+  // urgentAllowed, Do Not Disturb (on by default on a fresh Windows 11) swallows every ab toast, and Windows+  // itself does not expose the live DND state, so "may be hidden" is the honest word.+  let ab = null;+  try { const r = await abCommand(null, 'status', {}); const b = r && r.body; ab = b && b.desktop && b.desktop.permissions && b.desktop.permissions.notifications || null; } catch {}+  const bannersEnabled = ab ? ab.bannersEnabled !== false : true;+  const urgentAllowed = ab ? ab.urgentAllowed === true : null;+  const toastMayBeMuted = !(toastsEnabled && adomBridgeEnabled && bannersEnabled);+  const mayBeHiddenByDnd = !toastMayBeMuted && urgentAllowed === false;+  const v = { checked: true, toastsEnabled, adomBridgeEnabled, bannersEnabled, urgentAllowed, toastMayBeMuted, mayBeHiddenByDnd,+    _hint: !toastsEnabled ? 'All Windows notifications are OFF on this PC: toasts fold into the notification center unseen. Ask the user to turn notifications back on.'+         : (!adomBridgeEnabled || !bannersEnabled) ? 'Notifications for Adom Bridge are switched OFF in Windows Settings > Notifications: its toasts never show. Ask the user to turn them on (ab notification_settings_open opens that page).'+         : mayBeHiddenByDnd ? 'This PC has never granted Adom Bridge the one-time "Allow important notifications" permission, so while Do Not Disturb is on (a fresh Windows 11 keeps it on) every ab toast, including the Approve-now one, is hidden. A human clicks Allow on Windows\' prompt or enables the priority option under Settings > System > Notifications > Adom Bridge (ab notification_settings_open); until then do not rely on the toast.'          : 'toasts can show' };   _notifSwCache = { at: Date.now(), v }; return v; }@@ -1773,10 +1784,10 @@ function dispatch(verb, args) {       const hint = st.installed         ? 'Native Google Chrome is installed. Next: help the user sign into their Google account (open chrome://settings or accounts.google.com and turn ON sync so passwords/bookmarks/autofill carry over), then load the Adom extension (installing-the-extension). Full flow: setting-up-native-chrome.'         : st.awaitingUac-          ? (sw.toastMayBeMuted ? `Waiting on a Windows security prompt that the user has probably NOT been told about: ${sw._hint} Meanwhile, anyone looking at this PC's screen can be shown the prompt again with nbrowser_install_chrome {retryUac:true} (no re-download).`+          ? ((sw.toastMayBeMuted || sw.mayBeHiddenByDnd) ? `Waiting on a Windows security prompt that the user has probably NOT been told about: ${sw._hint} Meanwhile, anyone looking at this PC's screen can be shown the prompt again with nbrowser_install_chrome {retryUac:true} (no re-download).`              : st.notifyChannel ? 'Waiting on the user to approve the Windows security prompt. A sticky "Approve now" toast is on their desktop; tapping it re-opens the UAC. Keep polling; to show the prompt again for someone already looking at the screen call nbrowser_install_chrome {retryUac:true} (never a plain re-trigger, which restarts the download).' : 'A UAC was raised once but this ab cannot pop a notification. RELAY TO THE USER: go to the machine and click YES on the Google Chrome installer prompt, then re-poll.')           : st.installing ? 'Chrome install in progress (downloading / silent install). Poll again in a few seconds.'-          : st.phase === 'failed' && st.errorCode === 'chrome_needs_approval' && st.canRetryUac ? `The Windows security prompt was never accepted (${sw.toastMayBeMuted ? sw._hint : 'the toast went unanswered'}). The installer is still on this PC: nbrowser_install_chrome {retryUac:true} shows the prompt again for someone looking at the screen.`+          : st.phase === 'failed' && st.errorCode === 'chrome_needs_approval' && st.canRetryUac ? `The Windows security prompt was never accepted (${(sw.toastMayBeMuted || sw.mayBeHiddenByDnd) ? sw._hint : 'the toast went unanswered'}). The installer is still on this PC: nbrowser_install_chrome {retryUac:true} shows the prompt again for someone looking at the screen.`           : st.phase === 'failed' ? `Chrome install failed (${st.errorCode}): ${st.error}. Fixes depend on the code - e.g. free disk, check network, or ask the user to install Chrome manually.`           : 'No native Chrome yet and no install running. Call nbrowser_install_chrome to install it.';       return resolve({ success: true, output: JSON.stringify({ ...st, _hint: hint }) });
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "nb-bridge",-  "version": "0.16.8",+  "version": "0.16.9",   "type": "app",   "title": "NB - Native Browser Bridge",   "description": "This package installs the SKILLS into your container so your AI knows how to drive your real signed-in Chrome and Edge; Bridge loads the bridge runtime itself from the release zip.",