← Commit history

nb 0.4.4: auto-resolve pending profile labels on connect (was only manual)

John Lauer ·e645c579d2 ·2mo ago ·parent b8e6755
5 files changed +22−8
bridge/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.4.3+0.4.4
bridge/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "native-browser",   "displayName": "Adom Native Browser",-  "version": "0.4.3",+  "version": "0.4.4",   "expectedExtensionVersion": "0.2.5",   "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.4.3",+  "version": "0.4.4",   "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+14
@@ -165,6 +165,20 @@ function registerProvisional(sock) {   const key = 'pending-' + (++provSeq);   conns.set(key, { sock, profile: { id: key, email: '' }, since: Date.now(), provisional: true });   if (!activeProfile) activeProfile = key;+  // AUTO-RESOLVE THE LABEL (2026-08-22): resolvePendingProfiles was only ever called from the badge+  // fallback and the manual nbrowser_resolve_profiles verb, so after a bridge restart the reconnected+  // hosts sat at pending-N FOREVER unless someone happened to call one of those. The connection was+  // fully drivable the whole time, but everything keyed by profile (readiness labels, avatars, pins)+  // stayed blank. Nudge shortly after every provisional connect (delay lets the extension's own hello+  // land first and win), and retry a few times for a slow chrome.identity.+  let tries = 0;+  const nudge = () => {+    const c = conns.get(key);+    if (!c || !c.provisional || !c.sock || c.sock.destroyed) return;+    _lastResolveNudge = 0; resolvePendingProfiles();+    if (++tries < 5) setTimeout(nudge, 6000);+  };+  setTimeout(nudge, 3000);   return key; } // ---- credential QUERY LAYER (reads the BROWSER's own saved-login store) -----
native-browser-bridge-manifest.json+5−5
@@ -1,8 +1,8 @@ {   "manifest_version": 1,-  "version": "0.4.3",-  "url": "https://wiki.adom.inc/download/adom/nb-bridge/0.4.3/native-browser-bridge-v0.4.3.zip",-  "sha256": "efea3c4dbf183caeb34892cacbea9087347779575e4d2eec39f603977136f84d",-  "size": 104682,-  "released_at": "2026-08-22T14:11:28Z"+  "version": "0.4.4",+  "url": "https://wiki.adom.inc/download/adom/nb-bridge/0.4.4/native-browser-bridge-v0.4.4.zip",+  "sha256": "71c08eeab8b52e910cff4a266f7f7d096295f89c2b34602c9c33e2f89163bcda",+  "size": 105003,+  "released_at": "2026-08-22T14:14:52Z" }