Skip to content

Add terminal pane title shortcuts#6508

Open
matheuscoelhomalta wants to merge 1 commit into
stablyai:mainfrom
matheuscoelhomalta:feat/terminal-pane-title-shortcuts
Open

Add terminal pane title shortcuts#6508
matheuscoelhomalta wants to merge 1 commit into
stablyai:mainfrom
matheuscoelhomalta:feat/terminal-pane-title-shortcuts

Conversation

@matheuscoelhomalta

@matheuscoelhomalta matheuscoelhomalta commented Jun 27, 2026

Copy link
Copy Markdown

Summary

Adds configurable terminal pane title shortcuts:

  • terminal.setTitle: opens the existing Set Title flow for the active terminal pane.
  • terminal.clearPaneTitle: clears the active pane’s custom title and returns it to the normal terminal title behavior.

The shortcuts are intentionally unbound by default and can be assigned from the existing keybindings system. The terminal context menu now shows assigned shortcut labels for these actions when applicable.

Screenshots

No screenshot attached. This is primarily shortcut behavior using existing terminal context menu UI.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions.

AI Review Report

Reviewed the branch for scope, shortcut registration, terminal-pane behavior, and context-menu integration. The review checked that the PR stays focused on terminal pane title shortcuts and does not include the previously considered Git Source actions.

Cross-platform compatibility was explicitly reviewed for macOS, Linux, and Windows:

  • Shortcut handling uses the existing keybinding infrastructure rather than hardcoded metaKey.
  • Shortcut display follows the existing platform-aware label formatting.
  • No file path, shell behavior, or Electron menu accelerator behavior was changed.
  • The terminal title behavior works for local and SSH-backed terminal panes because it routes through the existing pane title state/actions.

Security Audit

Reviewed input handling, command execution, path handling, IPC, secrets, dependencies, and auth impact.

This PR does not add command execution, filesystem path handling, network access, credentials, dependencies, or new IPC channels. User-provided title text continues through the existing terminal title flow. No new security follow-up is required.

Notes

  • Branch: feat/terminal-pane-title-shortcuts
  • The shortcuts are unbound by default, so this does not change existing keyboard behavior until users configure bindings.
  • Local build was run with ad-hoc signing due duplicate Apple Development identities in the local macOS keychain.
  • X handle: @matheuscmalta

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2c5cb756-8722-4184-9c5d-dbb3fd9008fe

📥 Commits

Reviewing files that changed from the base of the PR and between 96afe63 and 281e0f9.

📒 Files selected for processing (13)
  • src/renderer/src/components/terminal-pane/TerminalContextMenu.tsx
  • src/renderer/src/components/terminal-pane/TerminalPane.tsx
  • src/renderer/src/components/terminal-pane/keyboard-handlers.ts
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.test.ts
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/keybindings.test.ts
  • src/shared/keybindings.ts
✅ Files skipped from review due to trivial changes (4)
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/renderer/src/i18n/locales/en.json
  • src/shared/keybindings.ts
  • src/shared/keybindings.test.ts
  • src/renderer/src/components/terminal-pane/TerminalContextMenu.tsx
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.test.ts
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.ts
  • src/renderer/src/components/terminal-pane/keyboard-handlers.ts
  • src/renderer/src/components/terminal-pane/TerminalPane.tsx

📝 Walkthrough

Walkthrough

This change adds terminal.setTitle and terminal.clearPaneTitle keybinding actions, shortcut resolution for both actions, and keyboard handling that invokes title set/clear callbacks. TerminalPane now removes pane titles from state, refs, and persisted layout data, and wires the new clear-title path into keyboard and context-menu flows. useTerminalPaneContextMenu exposes a clear-title action, and TerminalContextMenu renders a conditional “Clear Pane Title” item with localized labels in five locales.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding terminal pane title shortcuts.
Description check ✅ Passed The description follows the template and includes the required Summary, Screenshots, Testing, AI Review Report, Security Audit, and Notes sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@matheuscoelhomalta matheuscoelhomalta force-pushed the feat/terminal-pane-title-shortcuts branch from 0e08438 to 96afe63 Compare June 27, 2026 17:27
@matheuscoelhomalta matheuscoelhomalta force-pushed the feat/terminal-pane-title-shortcuts branch from 96afe63 to 281e0f9 Compare June 27, 2026 20:10
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.

1 participant