Repository navigation
fix(links): open local html file links in the browser link routing picks - #32706
Conversation
Their hint and popover promise Orca before the path resolves to this computer.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
… their own modules terminal-file-open-routing.ts went over the 300-line limit after #32706, failing every PR's lint. Move two self-contained pieces out, unchanged: the open-request turn (shared with click hit-testing) and opening a local HTML file in Orca's browser.
What you saw
With Link Routing set to System Browser, Cmd/Ctrl-clicking a local
.htmlpath in the terminal or in an agent chat still opened it in Orca's browser. Only http(s) links honored the setting.Root cause
openDetectedFilePath(terminal-file-open-routing.ts) opened every local HTML file in an Orca browser tab and never asked the link-routing owner. Terminal and chat file links both go through it, so both were affected.Fix
Local HTML files now take their destination from
httpLinkActionDestinationsFor, the same owner http links use:httpLinkDirectClickDestination. The terminal and chat http paths already did this inline, and now call the helper too.shell.openFilePathcall that Shift+Cmd already used, so main isn't touched. Main'sshell:openUrlrejectsfile:URLs.Remote workspaces keep today's behaviour. SSH and paired-runtime HTML still opens through the doc preview, because the OS can't open a remote path. This includes a file that turns out to be on this computer: its hint and popover are built before the path resolves and promise Orca.
Known limit. The OS route opens the app associated with
.html, which is the default browser on most machines. If.htmlis associated with an editor, that editor opens. Main's Shift+Cmd path already had this limit, and its hint called it "default browser". Opening the real default browser would need a per-platform opener in main, so that's left for a follow-up.Noticed, not fixed. With Link Routing on System Browser and "Shift inverts" off, the terminal's http hint says "⇧⌘+click for system browser", but Shift+Cmd on an http link opens Orca, because the terminal always takes the alternate destination. That's a separate fix.
Testing
openDetectedFilePath: under System Browser, Cmd-click calls the OS and Shift-click opens an Orca tab. Fails on main.openDetectedFilePath: a client-local HTML file in a server workspace stays in Orca under the default setting.openLinksInApp: trueso they keep testing the Orca path.check:code-quality:changedandcheck:react-doctor:changedare clean.shell.openPathcall it received.Visual Proof
Terminal, BEFORE (System Browser: ⌘-click opens Orca's browser):
(screenshot removed: contained real product data)
Terminal, AFTER (⌘-click goes to the OS browser, ⇧⌘-click to Orca; the popover and hint name both):
(screenshot removed: contained real product data)
Agent chat, BEFORE:
(screenshot removed: contained real product data)
Agent chat, AFTER:
(screenshot removed: contained real product data)
Linked Issue
Fixes #32547
Linear: STA-11878