Skip to content

pi-extension: PLANNOTATOR_BROWSER silently fails for script/executable paths on macOS #1391

Description

@punk-dev-robot

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)

  1. export PLANNOTATOR_BROWSER=/path/to/any-script.sh
  2. Trigger a plan or code review from pi
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions