← Commit history

Bridge: redirect nbrowser_alert_window->flash, nbrowser_close->close_window

John Lauer ·ec69668c35 ·4mo ago ·parent baedaf3
1 file changed +7
bridge/server.js+7
@@ -480,6 +480,13 @@ function dispatch(verb, args) {         _hint: `Use the CORE AD verb instead: desktop_bring_to_front ${target}. The extension intentionally never raises or steals the user's focus — nbrowser_focus only activates the tab + flashes its taskbar button; desktop_bring_to_front is the explicit "bring it to the front so the user can watch" action.`,       });     }+    // Other pup verbs with no 1:1 extension verb — redirect to the right one instead of failing opaquely.+    if (verb === 'nbrowser_alert_window') {+      return resolve({ success: false, error: 'nbrowser_alert_window is not an extension verb', _hint: 'Flash the driven window\'s taskbar button with nbrowser_flash {sessionId} (orange "come look" cue; nbrowser_flash_stop to clear). For an arbitrary OS window, the core AD verb is desktop_flash_window {hwnd}.' });+    }+    if (verb === 'nbrowser_close') {+      return resolve({ success: false, error: 'nbrowser_close is not an extension verb', _hint: 'Close a specific window with nbrowser_close_window {sessionId} or a tab with nbrowser_close_tab {sessionId,tabId}. There is no global "detach all" — the extension idle-detaches the debugger automatically when no verb is running.' });+    }     const tgt = targetConn(args);     if (!tgt || tgt.blocked || !tgt.conn) {       if (tgt && tgt.blocked) {