What happens
apps/pi-extension/server/network.ts (line ~335) always runs open -a $PLANNOTATOR_BROWSER <url> on darwin, treating the value as an app bundle. A script or executable path fails with LaunchServices error -10811, the error is detached and swallowed (stdio: "ignore", no-op error handler), and openBrowser returns { opened: true } — the extension shows "Code review opened" and the review silently never appears anywhere.
Repro (macOS)
export PLANNOTATOR_BROWSER=/path/to/any-script.sh
- Trigger a plan or code review from pi
- Greyed "review opened" message, nothing opens
Direct proof of the failing call:
$ open -a /path/to/any-script.sh https://example.com
_LSOpenURLsWithCompletionHandler() failed ... with error -10811
Expected
The plannotator binary already handles this correctly in its own openBrowser: value contains / and does not end with .app → execute it directly with the URL as argument; otherwise open -a. The pi extension should mirror that branch.
Happy to send a PR — it's a small diff mirroring the binary's existing logic.
Context
Hit while wiring Plannotator reviews into Herdr via zenbu-labs/terminal-browser with a small PLANNOTATOR_BROWSER handler script (interim until #1147 lands).
What happens
apps/pi-extension/server/network.ts(line ~335) always runsopen -a $PLANNOTATOR_BROWSER <url>on darwin, treating the value as an app bundle. A script or executable path fails with LaunchServices error-10811, the error is detached and swallowed (stdio: "ignore", no-operrorhandler), andopenBrowserreturns{ opened: true }— the extension shows "Code review opened" and the review silently never appears anywhere.Repro (macOS)
export PLANNOTATOR_BROWSER=/path/to/any-script.shDirect proof of the failing call:
Expected
The
plannotatorbinary already handles this correctly in its ownopenBrowser: value contains/and does not end with.app→ execute it directly with the URL as argument; otherwiseopen -a. The pi extension should mirror that branch.Happy to send a PR — it's a small diff mirroring the binary's existing logic.
Context
Hit while wiring Plannotator reviews into Herdr via zenbu-labs/terminal-browser with a small
PLANNOTATOR_BROWSERhandler script (interim until #1147 lands).