Repository navigation
fix(browser): managed SSH terminal links open in the Orca Browser again - #29215
Conversation
|
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
|
…ation instead Moving the owner predicates to their own module made their callers count as new focus reads. Keep them in workspace-browser-tab-open and move the title/error presentation helpers out to stay under the line limit. The SSH deployment check also reads the workspace's owner route instead of the focus-falling-back host lookup.
ELI5
On a computer you reach over SSH, Orca now runs a small Orca server. Since that change, clicking a web link in one of that computer's terminals only offered your normal web browser, not Orca's built-in browser. This PR brings the built-in browser back for those links. A link like
http://localhost:3000still opens the dev server running on the SSH computer, not one on your own machine.What Changed
Before (1.4.225+): in a terminal on a managed SSH host, the link popover showed only "System Browser", and Cmd-click (Ctrl-click on Linux/Windows) opened the system browser, even with "open links in Orca" turned on.
After: the popover offers "Orca Browser" again, and Cmd/Ctrl-click opens the link in an Orca browser tab on this desktop. The page's traffic goes through the SSH host, so remote
localhostURLs and hostnames that only the host can resolve both work.Mechanism:
workspace-browser-tab-open.tsadds one more accepted route for a server link. It applies when the server is an SSH deployment, cannot provide its own browser, the desktop can host the tab, and SSH browser routing is on for that host. In that case the link opens a desktop tab, exactly like a tab-bar "new browser tab" in that workspace. The existing SSH-routed browser gate then sends its traffic through the host. (The tab title and error helpers moved toworkspace-browser-tab-presentation.tsto keep the file under the line limit.)Unchanged:
localhostlink never silently opens your own machine's localhost.Why
Linked Issue
Fixes #29077
Fixes #27349
Visual Proof
N/A for screenshots in the PR body. The new Docker E2E (
tests/e2e/ssh-orcad-terminal-browser-link.spec.ts) captures the link popover with "Orca Browser" and the opened page as test artifacts.Testing
workspace-browser-tab-open.test.tscovers these cases:Existing terminal-link (28 files), native-chat, markdown-link, and http-link-destinations tests pass.
New E2E
ssh-orcad-terminal-browser-link.spec.tsruns on the Docker managed-SSH lane. It converts a Docker SSH host to a managed server and prints a URL in its terminal. It clicks the link and checks the popover offers "Orca Browser", then opens it. It confirms the request reached a server that only the container can resolve. It then Ctrl/Cmd-clickshttp://localhost:<port>/…and confirms that request was served by the container's localhost too. The spec is wired into PR e2e routing.pnpm tc:web,pnpm tc:node, andpnpm run check:code-quality:changedpass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
ControlOrMeta.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)