← Commit history
dev skill: capture back/forward-via-history + UIA-Invoke-fails-on-Win32-dialogs learnings
1 file changed
+12
dev-skills/developing-the-bridge.md+12@@ -31,6 +31,18 @@ in the same commit, or it ships hint-less. Data path: container → relay → AD → bridge `/command` → loopback → host stdio → extension SW → CDP/native. +## Hard-won runtime gotchas (extension side)+- **`chrome.tabs.goBack`/`goForward` throw on tabs we drive.** On a tab navigated via+ `chrome.tabs.update({url})` with the debugger lazily attached, `chrome.tabs.goBack` throws *"Cannot+ find a next page in history"* even when `window.history.length` proves there IS a back entry. **Route+ back/forward through the PAGE's own history** instead: `chrome.scripting.executeScript({target:{tabId},+ func: () => history.back()})`. Reliable, and stays banner-free (no debugger attach). (Fixed in ext+ 0.0.16; verified on ADOMBASELINE.)+- **UIA Invoke doesn't fire on Win32 common-dialog buttons / some Edge controls.** `desktop_ui_click`+ (UIA Invoke) returns `success:true` but the dialog's OK/Select-Folder/Reload button doesn't actuate.+ Fall back to a foreground `desktop_click {x,y}` (SendInput) at the control's screen rect. (See+ installing-the-extension for the picker + Reload cases.)+ ## Verb contract Request `{command, args}`; response `{success, output(JSON string), error?, errorCode?}` + the hints. `nbrowser_readiness` is READ-ONLY (never spawns/installs) — mirror `bridge_readiness`. Long ops: return