Skip to content

feat(web): add rightPanel.openTerminal keybinding command - #7835

Open
Yukaii wants to merge 1 commit into
pingdotgg:mainfrom
Yukaii:feat/right-panel-open-terminal
Open

feat(web): add rightPanel.openTerminal keybinding command#7835
Yukaii wants to merge 1 commit into
pingdotgg:mainfrom
Yukaii:feat/right-panel-open-terminal

Conversation

@Yukaii

@Yukaii Yukaii commented Aug 21, 2026

Copy link
Copy Markdown

Problem

There is no way to open a terminal in the right panel from the keyboard. terminal.new (mod+n, and mod+j for the drawer) only creates a right-panel terminal when focus is already inside one — the chicken-and-egg problem described in #4790. Every other surface (drawer, diff, preview) has a bindable command; the right-panel terminal did not.

Fix

Add an additive rightPanel.openTerminal command:

  • packages/contracts: register rightPanel.openTerminal in STATIC_KEYBINDING_COMMANDS
  • packages/shared: default binding mod+alt+j, mirroring mod+alt+b for rightPanel.toggle
  • apps/web: handle the command in ChatView by calling the existing addTerminalSurface() path

Settings → Keybindings and the command-options list derive from those constants, so the new command appears there automatically and is rebindable like any other. Default bottom-drawer behavior is unchanged.

Closes #4790

Validation

  • New focused test in packages/shared/src/keybindings.test.ts asserting the default binding
  • Targeted tests pass (contracts keybindings, web keybindings, KeybindingsSettings.logic)
  • Lint and typecheck clean for contracts, shared, and apps/web

⌘⌥J on macOS / Ctrl+Alt+J elsewhere opens a terminal as a right-panel surface.


Note

Low Risk
Additive keybinding that reuses existing terminal-open logic; no auth, data, or drawer-behavior changes.

Overview
Adds a bindable rightPanel.openTerminal command so users can open a right-panel terminal from the keyboard without already focusing one.

Default shortcut is mod+alt+j (mirroring mod+alt+b for the right panel). ChatView handles it by calling existing addTerminalSurface(). Bottom-drawer terminal shortcuts are unchanged. Docs and a default-binding test are included.

Reviewed by Cursor Bugbot for commit 002f817. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add rightPanel.openTerminal keybinding command bound to mod+alt+j

Registers the new rightPanel.openTerminal command in the keybinding contracts and sets mod+alt+j as the default shortcut. The ChatViewContent component handles the command by calling addTerminalSurface() to open a terminal. Adds corresponding tests and updates the keybindings documentation.

Macroscope summarized 002f817.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26a1929d-909c-4ef5-945e-bdf46e2a3ffe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 21, 2026
terminal.new only creates a right-panel terminal when focus is already
there (ChatView's terminalFocusOwner check), so there was no way to open
a terminal in the right panel from the keyboard. Add a bindable
rightPanel.openTerminal command, defaulting to mod+alt+j to mirror
mod+alt+b for rightPanel.toggle, wired to the existing
addTerminalSurface path. Cmd+J behavior is unchanged.

Closes pingdotgg#4790
@Yukaii
Yukaii force-pushed the feat/right-panel-open-terminal branch from 1280de0 to 002f817 Compare August 21, 2026 18:23
@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 002f817

Macroscope's review found this PR approvable — This PR adds a new keybinding command that exposes an existing function (addTerminalSurface) via keyboard shortcut. The change is purely additive, follows established patterns, includes documentation and tests, and does not modify any existing behavior.

You can add or adjust custom eligibility rules. Learn more.

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: rightPanel.openTerminal, a keybinding command to open a terminal in the right panel

1 participant