Skip to content

feat(browser): add a shortcut to open a browser tab in a split to the right - #35994

Merged
AmoabaKelvin merged 2 commits into
mainfrom
browser-tab-split-shortcut
Oct 29, 2026
Merged

AmoabaKelvin merged 2 commits into
mainfrom
browser-tab-split-shortcut

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​138 $\color{#cf222e}{\Huge{\mathbf{−}}}$​49 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​89

ELI5

You can now press a key to open a browser next to your terminal instead of on top of it. On macOS it's Cmd+Opt+B, and it can be rebound in Settings → Keyboard. It's also in the Cmd+J palette as "New Browser Tab in Right Split".

What Changed

Before: Cmd+Shift+B (tab.newBrowser) always added the browser as another tab in the active pane, which hid the terminal. Putting a browser on the right meant dragging the tab with the mouse. Settings had no action to bind a key to.

After: a new action, tab.newBrowserSplitRight ("New browser tab in right split"), opens a new browser tab in a new pane to the right of the active pane. The terminal stays visible and the new pane gets focus. Cmd+Shift+B behaves as before.

How:

  • Store owner (browser-tab-actions.ts): openNewBrowserTabInActiveWorkspace(groupId, splitDirection?) takes an optional direction.
    • Local and SSH workspaces pass split to createBrowserTab, which already supports it, including through the main-owned layout path.
    • Paired runtime / web client workspaces use resolveWebRuntimeBrowserClientTargetGroup, the same helper link routing uses for "open to the side".
    • With no direction, both paths send exactly what they sent before.
  • Keybinding (definitions-core-2.ts, types.ts): tab.newBrowserSplitRight in the Tabs group.
    • Default is Cmd+Opt+B on macOS. Nothing in Orca uses that chord, and it sits next to Cmd+Shift+B.
    • Linux and Windows are unbound, because Ctrl+Alt+letter is AltGr text input there (same reasoning as tab.newAgentDefault and editor.addReviewNote).
  • Renderer: the workspace keydown handler runs the action. With a browser page focused, main already replays every tab-scope chord into this same handler, so it works from inside a page too. The terminal create actions share one opener for the plain and split cases.
  • Cmd+J palette: a "New Browser Tab in Right Split" quick action that reuses the existing browser availability check.
  • Settings: the row and its search entry are hidden while browser creation is disabled, like "New browser tab". The title is localized, and the English catalog was synced with sync:localization-catalog.

Why

The UI could already create a pane with a browser in it (link routing, "open to the side"). The only thing missing was a bindable action that asks for it. Giving the existing store owner one optional argument reuses that split path on every route, instead of creating an empty group and then filling it from the keyboard handler. That would fail in builds where main owns the layout, because the new group isn't in the window until main's frame arrives.

Only "right" is added, as the issue asks. Left, down and up would each be a one-line definition plus a branch if wanted later. The floating workspace panel claims the chord and does nothing, the same as tab.newSimulator, because it has its own shortcut system.

Linked Issue

Fixes #32222

Visual Proof

Hidden macOS dev build. BEFORE is origin/main (the changed files checked out at the base commit, main process rebuilt); AFTER is this branch.

Before: Cmd+Opt+B does nothing; Cmd+Shift+B covers the terminal After: Cmd+Opt+B opens the browser in a new pane on the right
(screenshot removed: contained real product data) (screenshot removed: contained real product data)

Settings → Keyboard, searched for "browser":

Before After
(screenshot removed: contained real product data) (screenshot removed: contained real product data)

Palette, "browser split":

Before After
(screenshot removed: contained real product data) (screenshot removed: contained real product data)

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Manual, hidden macOS dev build (store read after each press):

  • Single terminal pane, Cmd+Opt+B: the layout became a horizontal split with the terminal's group first and a new group holding the browser second. The new group is active.
  • Cmd+Shift+B in a single pane: the browser was added to the same group, with no split, as before.
  • Settings → Keyboard and the palette show the new action (screenshots above).

Automated: browser-tab-creation-placement.test.ts adds one case: openNewBrowserTabInActiveWorkspace(G1, 'right') leaves G1's tabs alone and puts the new browser in a new group split beside G1. It fails without the store change and passes with ORCA_LAYOUT_OWNER set to main and unset. Ran the focused keybinding, settings, palette, terminal keydown/create-action and browser store tests, plus check:code-quality:changed, check:react-doctor:changed and verify:localization-catalog.

Not run on Linux or Windows. Those platforms only get an unbound action, with no default chord.

AI Disclosure

Review

Codex and Claude reviewed it. Fixed: the new test found the created tab by array position, which broke when main owns the layout. It now finds the tab by id. Not changed: in a paired workspace whose layout is drawn by server frames under the off-by-default ORCA_LAYOUT_OWNER=main build, a client-only split group can be folded back into a server group. That build is off in shipped builds (layout-owner-switch.ts), and link routing's "open to the side" goes through the same helper with the same limit, so it belongs to the layout-owner migration, not this PR.

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

  • Cross-platform: macOS gets Cmd+Opt+B. Linux and Windows are unbound to avoid AltGr text input, and anyone can bind it in Settings.
  • Remote / SSH: SSH workspaces are drawn by the desktop and use the same createBrowserTab({ split }) path. Paired runtimes use link routing's client split group, and no new RPC fields are sent, so mixed client and host versions are unaffected.
  • Mobile: no change. The phone has no desktop pane keyboard actions.
  • Folder workspaces: same path as git worktrees, since the group lookup is by workspace id.

To try (waiting for blessing): dev build from /Users/kelvinamoaba/orca/workspaces/orca/browser-split-shortcut.

  • In a workspace with one terminal pane, press Cmd+Opt+B. A browser opens in a new pane on the right and the terminal stays on the left.
  • Press Cmd+Shift+B. It still adds a browser tab to the active pane, with no split.
  • Open Settings → Keyboard and search "browser" to find "New browser tab in right split", which you can rebind. In the Cmd+J palette, type "browser split".

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)

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge.

Summary

Adds a bindable action and palette entry to open a browser in a split to the right.

  • A new browser action opens a pane to the right of the active pane.

Reviews (2) · Last reviewed commit: "fix(browser): keep new-browser handlers ..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 29, 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: 57366ad1-65e9-4b15-95e0-e26b5b016457
Commits

Reviewing files that changed from the base of the PR and between d4fb319 and a9b4cbf.

Files selected for processing: 1
  • src/renderer/src/components/use-terminal-create-actions.ts
Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/components/use-terminal-create-actions.ts

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

Walkthrough

The browser creation action now accepts an optional split direction. A new right-split action is available from the terminal shortcut and command palette. Shortcut settings and English labels include the new action, and a test checks that the browser tab is placed to the right of the invoking group.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to a9b4c

No actionable issue is established for this incremental change; it is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding a shortcut to open a browser tab in a right split.
Linked Issues check Passed Issue [#32222] requires a bindable tab.newBrowserSplitRight action that opens a browser tab in a new split group to the right of the active group. The PR adds the action definition and keybinding ty…
Out of Scope Changes check Passed The changed files support the right-split browser action. They add keybinding registration, renderer dispatch, store placement, Cmd+J palette access, Settings visibility and labels, localization, and …
Description check Passed The description follows the template closely. It has an ELI5, a What Changed section with before/after and mechanism, a Why section that explains the alternative (empty group then fill from keyboard h…
Full details: Linked Issues check

Explanation

Issue [#32222] requires a bindable tab.newBrowserSplitRight action that opens a browser tab in a new split group to the right of the active group. The PR adds the action definition and keybinding type. The renderer invokes a shared browser-opening flow with the right split direction. The store passes that direction through local, SSH, and paired-runtime creation paths. The added placement test verifies that the invoking group keeps its tabs and that the browser opens in a horizontal split beside it. The optional Down, Left, and Up actions are not required.

Full details: Out of Scope Changes check

Explanation

The changed files support the right-split browser action. They add keybinding registration, renderer dispatch, store placement, Cmd+J palette access, Settings visibility and labels, localization, and automated coverage. The shared opener refactor preserves the existing non-split path. No demonstrated change implements unrelated product behavior. Additional English catalog entries are consistent with the reported localization catalog synchronization and do not establish an unrelated scope change.

Full details: Description check

Explanation

The description follows the template closely. It has an ELI5, a What Changed section with before/after and mechanism, a Why section that explains the alternative (empty group then fill from keyboard handler) and the scope limit to 'right', and a Linked Issue (Fixes #32222). Visual Proof has before/after videos and screenshots for keybinding, settings, and palette. Testing lists manual macOS checks and an automated test case, and states Linux/Windows were not run. The Review, Notes, and Checklist sections are filled in. The AI Disclosure section is empty. The template says to leave it blank only for StablyAI team members, and the author's identity is not stated. The Notes cover cross-platform, SSH/remote, mobile, and folder workspaces. The Checklist items are ticked. Two parts need attention: the 'Agent skill upstream boundary' checkbox is ticked as not applicable, which is consistent with the diff, and the 'Review' section is filled in with the author's own AI tool usage. The main gap is the empty AI Disclosure section.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. 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 3 functions across 13 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

@rahul05ranjan rahul05ranjan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I traced the new shortcut end to end and the wiring is consistent everywhere I checked:

  • Keydown parity: the tab.newBrowserSplitRight branch in terminal-workspace-keydown.ts mirrors the adjacent tab.newBrowser branch exactly (repeat guard, preventDefault, notifyTerminalCapture, floatingWorkspaceFocused + ensureClientCreationActionAllowed(..., 'managed-browser') gate), so the two paths won't drift in behavior.
  • Binding choice: Mod+Alt+B doesn't collide with any existing darwin binding — I checked the definition files; the Mod+Alt namespace currently holds T, W, Shift+E, arrows and brackets, but not B. The macOS-only default with the AltGr comment matches the pattern of other darwin-only chords in the same file.
  • The wrapper split in use-terminal-create-actions.ts is the right call. The old handleNewBrowserTab was a zero-arg callback, so menu code passing it as a select handler was harmless; openNewBrowserTab(splitDirection?) would have received the select event as its first argument if passed the same way, and the comment records exactly that hazard. Both menu-facing callbacks now go through () => ... wrappers.
  • Placement either/or is explicit and matches the contract: ...(split ? { split } : { targetGroupId: groupId }) in browser-tab-actions.ts lines up with the documented CreateBrowserTabOptions semantics ("split wins over targetGroupId"), and the paired-runtime path goes through resolveWebRuntimeBrowserClientTargetGroup, which pre-creates a client-only split group (activate: false) and drops targetGroupId — consistent with the host-unknown-group comment there.
  • The shortcut-row-visibility / shortcuts-search filters now hide tab.newBrowserSplitRight alongside tab.newBrowser when managed browser creation is off, which would otherwise leave a row that silently does nothing.

Two small notes:

  1. Degraded fallback when there's no group to split beside: in openNewBrowserTab, when the worktree has no active/first group, the flow falls through to the no-workspace path, which calls createBrowserTab / createWebRuntimeSessionBrowserTab with no split at all — the "split right" action quietly becomes a plain new tab. That's probably the right behavior (nothing to split beside), but a user on an empty workspace hitting the shortcut or the Cmd-J action gets no visual indication of why. Fine to leave, just flagging it's silent.
  2. The new placement test covers the local-desktop split layout nicely; the paired-runtime split path (createEmptySplitGroup + clientTargetGroupCreated cleanup on failed creation) is exercised only via the pre-existing resolver's other callers. If a follow-up test of openNewBrowserTabInActiveWorkspace with a paired-runtime provider and a split is ever cheap, this call site would be where it belongs.

@AmoabaKelvin
AmoabaKelvin merged commit 08e5522 into main Oct 29, 2026
56 checks passed
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]: Keyboard shortcut to open a browser tab in a split pane

2 participants