Skip to content

feat(browser): setting to open links as a tab instead of a split beside the pane - #35254

Open
msaggiorato wants to merge 2 commits into
stablyai:mainfrom
msaggiorato:feat/link-split-beside-setting
Open

msaggiorato wants to merge 2 commits into
stablyai:mainfrom
msaggiorato:feat/link-split-beside-setting

Conversation

@msaggiorato

Copy link
Copy Markdown

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:

  • New setting openLinksInAppSplitBeside (default true), shown under Link Routing next to "Open links in the background".
  • When it's false, the "no visible browser" case opens the link as a tab in the source group instead of splitting beside it.
  • Everything else stays the same with either value:
    • a visible browser pane still receives the link
    • an exact matching page is still reused
    • an empty source pane is still filled
    • explicit "Open in this group" requests still win

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:

  • the setting's default value, type and telemetry whitelist entry
  • a settings search entry
  • English strings (other locales fall back until localization picks them up)

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

Toggle on (default) Toggle off
settings-on settings-off

Clicking a terminal link

Before / toggle on: splits beside the terminal After / toggle off: tab in the same pane
link-split-on link-split-off

Testing

Tested on macOS (arm64) only. With this change, Linux, Windows, SSH and paired runtimes all follow the same shared placement code.

  • I manually tested these changes locally. I ran a dev build driven through the Playwright Electron harness, hidden (ORCA_BACKGROUND_LAUNCH=1), and Cmd+clicked a terminal URL with the toggle on and off. The layout went from split (on) to a single leaf (off), as the screenshots show.
  • Automated tests added/updated:
    • browser-link-destination.test.ts: with the setting off, the source group gets the tab instead of a split
    • http-link-browser-placement.test.ts: same for the placement path
    • BrowserPane.search-catalog.test.tsx: mock for the new row
  • Ran locally:
    • pnpm lint (all 36 steps)
    • pnpm tc:web
    • verify:localization-catalog
    • the settings and link-routing test suites (202 files / 1,397 tests)
    • the full vitest suite before the final lint fixes
  • Not run locally: pnpm 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • With the toggle off, the terminal link popover's Open in this group action can still appear when there are several groups. It's now the same as the default click, which is harmless but redundant. I left it alone to keep this PR small.
  • Backwards compatible: the key is optional and defaults to true, so existing settings files behave exactly as before.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred). Lint, tc:web and tests pass locally; build is left to CI.

…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]>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a3e18f63-ab3c-4e3e-aade-3ac4a5daab32
Commits

Reviewing files that changed from the base of the PR and between 8cd53e0 and a04c2a1.

Files selected for processing: 6
  • src/renderer/src/components/settings/BrowserLinkRoutingSplitBesideSetting.tsx
  • src/renderer/src/components/settings/BrowserPane.tsx
  • src/renderer/src/components/settings/browser-link-routing-copy.ts
  • src/renderer/src/components/settings/browser-search.ts
  • src/renderer/src/lib/browser-link-destination.ts
  • src/shared/default-global-settings.ts
Files skipped from review as they are similar to previous changes: 6
  • src/renderer/src/components/settings/BrowserLinkRoutingSplitBesideSetting.tsx
  • src/renderer/src/components/settings/browser-search.ts
  • src/shared/default-global-settings.ts
  • src/renderer/src/components/settings/BrowserPane.tsx
  • src/renderer/src/lib/browser-link-destination.ts
  • src/renderer/src/components/settings/browser-link-routing-copy.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The change adds the openLinksInAppSplitBeside setting. It defaults to true. When set to false, link destination selection uses the source pane instead of opening a split beside it. The setting is available as a searchable switch in browser settings.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to a04c2

No merge-blocking issue was identified; the change is ready for normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main change: adding a browser setting that opens links as tabs instead of splitting beside the pane.
Description check Passed The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issues, visual proof, testing, AI use, compatibility considerations, and…
Linked Issues check Passed The changes meet the coding requirements in [#34437]. The new optional openLinksInAppSplitBeside setting defaults to true and appears in Browser → Link Routing. When it is false, `selectBrowserL…
Out of Scope Changes check Passed The changes stay within [#34437]. The UI, settings metadata, localization, search integration, placement logic, and focused tests directly implement configurable tab-versus-split link routing. No unre…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Description check

Explanation

The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issues, visual proof, testing, AI use, compatibility considerations, and known limitations. It also discloses that pnpm build was not run locally.

Full details: Linked Issues check

Explanation

The changes meet the coding requirements in [#34437]. The new optional openLinksInAppSplitBeside setting defaults to true and appears in Browser → Link Routing. When it is false, selectBrowserLinkDestination and resolveHttpLinkBrowserPlacement target the source group instead of creating a split when no browser is visible. The setting type, default, telemetry whitelist, search entry, English strings, and focused tests are included.

Full details: Out of Scope Changes check

Explanation

The changes stay within [#34437]. The UI, settings metadata, localization, search integration, placement logic, and focused tests directly implement configurable tab-versus-split link routing. No unrelated change is shown in the reviewed change summary.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 12 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nekoium

nekoium commented Nov 9, 2026

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Setting to open links as a tab in the current group instead of a new split

2 participants