Repository navigation
feat(browser): setting to open links as a tab instead of a split beside the pane - #35254
msaggiorato wants to merge 2 commits into
Conversation
…de the pane Adds Settings > Browser > "Open links in a split beside the pane" (on by default). When off, a link with no visible browser opens as a tab in the clicked pane, as before stablyai#31844. Fixes stablyai#34437 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review.
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Does this scope also applies to file links, as mentioned in #39064? The new behavior is also affecting the file links, and the recent update even removed the option to open in new tab, as introduced in #39950. This is becoming frustrating for many users. I would like to submit a PR for that scope, but I'd rather avoid interfering others' work. Feel free to bump me if there are anything I could help with. Cheers. |
feat(browser): setting to open links as a tab instead of a split beside the pane
ELI5
Since #31844 / #32907, clicking a link when no browser is on screen splits your workspace and opens the page next to the pane you clicked in. That's great with agents side by side, but if you work with one pane and want pages full width, every link splits the screen and you have to drag the tab back.
This adds one toggle under Settings → Browser → Link Routing: Open links in a split beside the pane. It's on by default, so nothing changes for anyone. Turn it off and links open as a tab in the pane you clicked in, as they did before #31844.
What Changed
Before: with in-app link routing on and no browser visible, a link always opened in a new split to the right of the source pane. There was no way to opt out.
After:
openLinksInAppSplitBeside(defaulttrue), shown under Link Routing next to "Open links in the background".false, the "no visible browser" case opens the link as a tab in the source group instead of splitting beside it.Mechanism: the split rule lives in two places, and both read the new setting.
selectBrowserLinkDestination(browser-link-destination.ts) handles the shared local destination path from Open browser links beside their source #32907.resolveHttpLinkBrowserPlacement(http-link-browser-placement.ts) handles the remote/runtime path and the fallback without a workspace opener.Changing only one of the two would leave the other surfaces still splitting.
Also included:
Why
Linked Issue
Fixes #34437
Related: #33252
Visual Proof
Dev build on macOS:
https://example.com/printed in a terminal, then Cmd+clicked, with no browser open.Setting
Clicking a terminal link
Testing
Tested on macOS (arm64) only. With this change, Linux, Windows, SSH and paired runtimes all follow the same shared placement code.
ORCA_BACKGROUND_LAUNCH=1), and Cmd+clicked a terminal URL with the toggle on and off. The layout went fromsplit(on) to a singleleaf(off), as the screenshots show.browser-link-destination.test.ts: with the setting off, the source group gets the tab instead of a splithttp-link-browser-placement.test.ts: same for the placement pathBrowserPane.search-catalog.test.tsx: mock for the new rowpnpm lint(all 36 steps)pnpm tc:webverify:localization-catalogvitestsuite before the final lint fixespnpm build.AI Disclosure
Implemented with Claude Code (Claude Opus 5.5). I reviewed the change, and the AI ran the tests and screenshots locally as described above.
Agent skill upstream boundary
Notes
true, so existing settings files behave exactly as before.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred). Lint,tc:weband tests pass locally; build is left to CI.