Skip to content

feat(browser): add a setting to open links as a tab instead of a split - #41252

Open
lukebward wants to merge 3 commits into
stablyai:mainfrom
lukebward:feat/link-routing-split-setting
Open

lukebward wants to merge 3 commits into
stablyai:mainfrom
lukebward:feat/link-routing-split-setting

Conversation

@lukebward

@lukebward lukebward commented Nov 11, 2026 •

Copy link
Copy Markdown

ELI5

Clicking a link in a terminal that fills the whole workspace opens Orca's browser in a new pane beside it. Some people want the link as a new tab in the same pane instead. This adds a switch for that.

What Changed

  • New setting under Browser > Link Routing: Open links in a split. On by default, so nothing changes unless you turn it off.
  • Off: when a link would have created a split (no browser visible, the source pane is the only one), it opens as a new tab in the pane you clicked.
  • A visible browser pane or a neighbor pane still receives the link, same as today.
  • With the setting off, the terminal link popover hides "Open in new tab" when the link would otherwise have split, since a plain open now does the same thing. With a neighbor pane, the action stays, because a plain open goes to the neighbor.
  • Combined with Open links in the background, the link joins the clicked pane as an unselected tab and focus stays in the terminal.
  • Mechanism: resolveLinkOpenSidePlacement takes an allowSplit flag and returns the source group instead of a split target. The local and runtime link paths (selectBrowserLinkDestination, resolveHttpLinkBrowserPlacement) and the popover availability check pass the setting through. File links are unchanged.

Why

#31844 made split-beside the only behavior for HTTP links. That is a good default, but there is no way back to tab-in-place for users with a single pane who do not want their layout changed by every link. Adding the flag at the one function that decides "split" keeps the change small and leaves visible-browser and neighbor-pane routing alone.

Linked Issue

Fixes #41251

Visual Proof

Same flow both times: a fresh folder workspace with one terminal pane, echo https://example.com, then Cmd+click the link.

Before: "Open links in a split" on (default) After: off
Link opens in a new split beside the terminal Link opens as a new tab in the terminal's pane

New toggle under Settings > Browser > Link routing:

Open links in a split toggle

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
  • Every added test fails without this change and avoids the test anti-patterns

Manual: ran the PR build with pnpm dev:fresh on macOS and Cmd+clicked a terminal link with the toggle on and off (screenshots above).

Added one case to browser-link-destination.test.ts: a single occupied pane with the setting off resolves to that pane, not a split. It fails when allowSplit is ignored. On macOS, pnpm tc and oxlint/oxfmt on the changed files pass. pnpm check:changed passes except for 48 src/main/agent-hooks unit tests, which fail the same way on the base commit locally.

Risk

Low. Default is on, and a missing key reads as on, so existing users see no change. The riskiest part is a link landing in the wrong pane with the setting off; the fallback target is the pane the user clicked. Plain revert backs it out; a saved openLinksInAppInSplit: false is ignored after revert.

Level: Low

AI Disclosure

Claude Code (Claude Opus 5.5) wrote the code, the test, and this description.

Review

  • Cross-platform: no platform-specific code; setting copy has no shortcut labels.
  • SSH/remote: runtime path uses the same placement (prepareRuntimeBrowserLink passes the group through); no new IPC or contract.
  • Agents/integrations: not affected.
  • Performance: one boolean read per link open.
  • UI: reuses SettingsSwitchRow and the indented layout of the background toggle; English-only copy per the i18n source rules.
  • Security: none.

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

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

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)
  • I stated the risk: what could break, for whom, and how to back it out
  • 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)

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds the openLinksInAppInSplit setting, enabled by default. When disabled, link placement in the single-pane fallback uses the source pane instead of creating a split. The preference is applied to browser and HTTP link routing. A searchable switch is added to Browser settings, with English title, description, and search terms. A test covers disabled splitting for a single-pane workspace.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 64f6d

Adds an optional Open links in a split setting that is on by default, so existing users see no change. No outstanding defects remain in the reviewed changes, and the risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(browser): add a setting to open links as a tab instead of a split" names the main change: a new browser setting that makes links open as a tab rather than a split. The changeset adds t…
Description check Passed The description follows the repository template. It includes ELI5, What Changed, Why, a linked issue (Fixes #41251), Visual Proof with before/after images and a settings screenshot, Testing with the m…
Linked Issues check Passed Directly linked issue #41251 requires: (1) an on-by-default toggle under Settings > Browser > Link Routing, next to "Open links in the background"; (2) when off, a link that would create a split opens…
Out of Scope Changes check Passed Every changed file serves the requested setting. The changes cover the setting type and default (browser-link-opening-settings.ts, default-global-settings.ts), the settings UI row and search entries (…
Full details: Title check

Explanation

The title "feat(browser): add a setting to open links as a tab instead of a split" names the main change: a new browser setting that makes links open as a tab rather than a split. The changeset adds the "Open links in a split" toggle (BrowserLinkRoutingSplitSetting), wires an allowSplit flag through link placement, and passes it to the HTTP link paths. The title is specific and matches the linked issue and objectives.

Full details: Description check

Explanation

The description follows the repository template. It includes ELI5, What Changed, Why, a linked issue (Fixes #41251), Visual Proof with before/after images and a settings screenshot, Testing with the manual test and the added unit test, Risk with level Low and a revert note, AI Disclosure, Review, the upstream boundary checkbox, Notes, and Checklist. Its gaps are small: the pnpm lint, typecheck, test, and build checklist item is unchecked, and the description does not state which platforms were tested beyond macOS.

Full details: Linked Issues check

Explanation

Directly linked issue #41251 requires: (1) an on-by-default toggle under Settings > Browser > Link Routing, next to "Open links in the background"; (2) when off, a link that would create a split opens as a new tab in the clicked pane; (3) a visible browser pane or neighbor pane still receives the link. Evidence: BrowserLinkRoutingSplitSetting is rendered in the routing group (BrowserPane.tsx) and has a search entry (browser-search.ts, browser-link-routing-copy.ts). The control treats the setting as on unless it is explicitly false, and the default is true (default-global-settings.ts). The reviewed head diff of adjacent-link-open-group.ts confirms that resolveLinkOpenSidePlacement takes allowSplit (default true). The split branch is unchanged when allowed. When splitting is disallowed, it returns { groupId: sourceGroupId }. This fallback sits after the existing visible-browser and neighbor-pane checks, so those paths are unchanged. selectBrowserLinkDestination and resolveHttpLinkBrowserPlacement pass the setting through, and canHttpLinkOpenInSourceGroup uses the same check for popover availability. Coding requirements are covered. Non-coding items in the PR (manual testing, screenshots) are not required. Minor note, not blocking: the raw summary lists the added test in browser-link-open.test.ts, while the PR description names browser-link-destination.test.ts. Test placement does not change the requirement result.

Full details: Out of Scope Changes check

Explanation

Every changed file serves the requested setting. The changes cover the setting type and default (browser-link-opening-settings.ts, default-global-settings.ts), the settings UI row and search entries (BrowserPane.tsx, browser-search.ts, BrowserLinkRoutingSplitSetting.tsx, browser-link-routing-copy.ts, en.json), the placement flag in the shared placement helpers (adjacent-link-open-group.ts, link-open-intent.ts), the local and runtime HTTP link paths (browser-link-destination.ts, http-link-browser-placement.ts, http-link-routing.ts), a telemetry whitelist entry for the new key (telemetry-property-schemas.ts), and a focused test. The summary reports no file-link changes, which matches the PR statement that file links are unchanged. No unrelated product behavior appears in the summary or the verified diff.

  • 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

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: 3e595056-0b28-49a3-8bf2-569ab7f6d425
Commits

Reviewing files that changed from the base of the PR and between 526827a and 64f6d5c.

Files selected for processing: 8

  • src/renderer/src/components/settings/browser/BrowserPane.tsx
  • src/renderer/src/components/settings/browser/routing/BrowserLinkRoutingSplitSetting.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/browser/navigation/browser-link-open.test.ts
  • src/renderer/src/lib/links/placement/adjacent-link-open-group.ts
  • src/shared/browser/navigation/browser-link-opening-settings.ts
  • src/shared/settings/default-global-settings.ts
  • src/shared/telemetry/schemas/telemetry-property-schemas.ts
Files skipped from review as they are similar to previous changes: 1

  • src/renderer/src/i18n/locales/en.json

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

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: f4e38fd3-0ff4-47b9-83c3-93a1aefcb45e
Commits

Reviewing files that changed from the base of the PR and between 576a6c9 and 3d2b68b.

Files selected for processing: 14

  • src/renderer/src/components/settings/browser/BrowserPane.tsx
  • src/renderer/src/components/settings/browser/browser-search.ts
  • src/renderer/src/components/settings/browser/routing/BrowserLinkRoutingSplitSetting.tsx
  • src/renderer/src/components/settings/browser/routing/browser-link-routing-copy.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/browser/navigation/browser-link-destination.test.ts
  • src/renderer/src/lib/browser/navigation/browser-link-destination.ts
  • src/renderer/src/lib/browser/navigation/http-link-browser-placement.ts
  • src/renderer/src/lib/browser/navigation/http-link-routing.ts
  • src/renderer/src/lib/links/placement/adjacent-link-open-group.ts
  • src/renderer/src/lib/links/placement/link-open-intent.ts
  • src/shared/browser-link-opening-settings.ts
  • src/shared/default-global-settings.ts
  • src/shared/telemetry-property-schemas.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.

@lukebward

Copy link
Copy Markdown
Author

@AmoabaKelvin Had Opus whip this quick setting change. There was old tab opening behavior that was removed recently that was actually my preference. I want to be able to cmd + click a link and have it open as a new tab as a default behavior, opening multiple links is now frustrating.

Thanks!

SearchableSetting already hides the split row when the search does not
match, so the pane-level guard around it is redundant.
@lukebward
lukebward force-pushed the feat/link-routing-split-setting branch from 526827a to 64f6d5c Compare November 19, 2026 15:17
@lukebward

Copy link
Copy Markdown
Author

@brennanb2025 would appreciate a look here. This is just adding an option to reintroduce old browser behavior before recent updates. Thanks!

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 instead of a split

1 participant