fix(pi-extension): run script/executable PLANNOTATOR_BROWSER paths directly on macOS - #1429
Merged
backnotprop merged 2 commits intoSep 15, 2026
Conversation
…rectly on macOS open -a treats the value as an app bundle and fails with LaunchServices -10811 for script paths, with the error swallowed by the detached spawn. Mirror the binary's openBrowser branch: a value containing '/' that does not end with '.app' is executed directly with the URL as its argument. Fixes backnotprop#1391
…darwin CI The backnotprop#1391 test reaches the darwin branch only on a real Mac; `bun test` runs on ubuntu, where a configured browser falls through to the generic branch and the regression is unguarded. Fake the platform the way the backnotprop#1472 WSL tests already do, and cover both arms: a slash-containing non-.app value is spawned directly, while an app name or .app bundle still goes through `open -a`.
backnotprop
force-pushed
the
pi-extension-browser-script-path
branch
from
September 13, 2026 20:39
e65717d to
d0be01b
Compare
Owner
|
Reviewed and rebased onto current main (one conflict in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1391.
On darwin the pi extension's
openBrowseralways ranopen -a $PLANNOTATOR_BROWSER <url>, treating the value as an app bundle. A script or executable path fails with LaunchServices error-10811, the error is swallowed by the detached spawn, and the extension reports "review opened" while nothing opens.This mirrors the branch the
plannotatorbinary already has inpackages/server/browser.ts: a value containing/that does not end with.appis executed directly with the URL as its argument; app names and.apppaths keep going throughopen -a.Changes
apps/pi-extension/server/network.ts: add the direct-exec branch for slash-containing non-.appPLANNOTATOR_BROWSERvalues on darwin.apps/pi-extension/server/network.test.ts: behavioral test —PLANNOTATOR_BROWSERpointing at a shell script gets executed with the URL as $1 (skipped on win32).Testing
bun test apps/pi-extension/server/network.test.ts— new test passes; the 3 pre-existing port-binding failures on my machine fail identically on a cleanmaincheckout (local environment, unrelated).