Skip to content

Expose Rename Pane via keybinding, command palette, and slash command#9374

Open
psh4607 wants to merge 5 commits intowarpdotdev:masterfrom
psh4607:psh4607/expose-rename-pane-action
Open

Expose Rename Pane via keybinding, command palette, and slash command#9374
psh4607 wants to merge 5 commits intowarpdotdev:masterfrom
psh4607:psh4607/expose-rename-pane-action

Conversation

@psh4607
Copy link
Copy Markdown

@psh4607 psh4607 commented Apr 29, 2026

Summary

Exposes the existing Rename Pane action through three additional input surfaces — the keyboard shortcut registry, Command Palette, and a /rename-pane <name> slash command — so it is reachable without using the right-click context menu on a Vertical Tabs pane row.

Resolves #9351.

Background

The Rename Pane action ships in Warp today (added together with the Vertical Tabs work), but the only way to invoke it is the context-menu entry on a pane row in the vertical tab list. There is no workspace: binding to map a key to it, no Command Palette entry, and no slash-command form, so users who don't use the vertical tabs UI cannot reach it.

The fix mirrors the existing Rename Tab registration end-to-end, so reviewing it is essentially a diff against RenameActiveTab / SetActiveTabName / /rename-tab.

Changes

  • WorkspaceAction::RenameActivePane — opens the inline rename editor for the focused pane in the active tab. Mirrors RenameActiveTab.
  • WorkspaceAction::SetActivePaneName(String) — direct-set variant used by the slash command. Mirrors SetActiveTabName.
  • CustomAction::RenamePane — new variant so the editable-binding registration can attach a stable macOS tag.
  • Registers editable binding workspace:rename_active_pane under the Settings group, which makes it discoverable in the keyboard-shortcut settings UI and the Command Palette.
  • Registers /rename-pane <name> slash command. Empty argument shows the same toast pattern as /rename-tab.

No default keybinding is shipped; users assign one as desired.

Test plan

  • Settings → Keyboard shortcuts: search "rename" — "Rename the current pane" entry appears.
  • Bind a key to workspace:rename_active_pane; pressing it opens the inline rename editor on the focused pane.
  • Command Palette (⌘P): "rename pane" appears and triggers the same editor.
  • /rename-pane Backend renames the focused pane to "Backend".
  • /rename-pane (no argument) shows a toast asking for a name.
  • Existing right-click "Rename pane" menu entry still works.
  • /rename-tab and the existing tab-rename shortcut are unchanged.

기존에 우클릭 메뉴로만 접근 가능하던 Rename Pane 액션을
workspace 키바인딩 레지스트리, Command Palette, 그리고
/rename-pane 슬래시 명령에서도 호출할 수 있도록 등록한다.

- WorkspaceAction::RenameActivePane / SetActivePaneName 추가
- CustomAction::RenamePane 추가
- workspace:rename_active_pane editable binding 등록
- /rename-pane <name> 슬래시 명령 등록

Resolves warpdotdev#9351
Copilot AI review requested due to automatic review settings April 29, 2026 06:19
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @psh4607 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@psh4607

I'm starting a first review of this pull request.

I requested changes on this pull request and posted feedback.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I'm re-reviewing this pull request in response to a review request.

I requested changes on this pull request and posted feedback.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

You can view the conversation on Warp.

I requested changes on this pull request and posted feedback.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@psh4607
Copy link
Copy Markdown
Author

psh4607 commented Apr 29, 2026

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR wires pane renaming into the slash command registry, editable workspace bindings, Command Palette, and WorkspaceAction dispatch by mirroring the existing tab rename flow.

Concerns

  • The new keybinding/Command Palette action can focus the pane rename editor while the vertical-tabs pane row that renders it is not visible, leaving users with an invisible rename state when the tabs panel is closed or vertical tabs are disabled.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/workspace/view.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR exposes the existing “Rename Pane” functionality across additional user input surfaces (editable keybinding registry/Command Palette and a new /rename-pane slash command), mirroring the existing “Rename Tab” flow to make pane renaming accessible without the vertical-tabs context menu.

Changes:

  • Adds new WorkspaceAction variants to rename the focused pane (open editor) and to set the focused pane’s name directly (used by slash command).
  • Registers workspace:rename_active_pane as an editable binding (discoverable in keyboard shortcuts UI and Command Palette).
  • Adds a /rename-pane <name> static slash command and dispatches the new action.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/src/workspace/view.rs Implements rename_active_pane and set_active_pane_name, and wires new WorkspaceAction variants into the dispatcher.
app/src/workspace/mod.rs Registers the new editable binding workspace:rename_active_pane with a CustomAction tag.
app/src/workspace/action.rs Adds RenameActivePane / SetActivePaneName to WorkspaceAction and related match logic.
app/src/util/bindings.rs Adds CustomAction::RenamePane and includes it in custom_tag_to_keystroke handling.
app/src/terminal/input/slash_commands/mod.rs Implements /rename-pane execution to dispatch SetActivePaneName.
app/src/search/slash_command_menu/static_commands/commands.rs Registers the /rename-pane command in the static slash command registry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/workspace/view.rs
Comment thread app/src/workspace/view.rs
Comment thread app/src/search/slash_command_menu/static_commands/commands.rs
Oz와 Copilot 리뷰 피드백을 반영한다.

- rename_active_pane: vertical_tabs_panel_open이 false이면 자동으로
  true로 설정해, inline rename editor가 보이지 않는 패널 안에서 포커스되어
  사용자가 invisible rename state에 빠지는 문제를 방지한다 (Oz IMPORTANT).
- set_active_pane_name: set_active_tab_name과 동일한 패턴으로 in-flight
  pane rename state를 먼저 clear해 슬래시 커맨드와 inline editor 간 race를
  제거하고, set_custom_pane_name 이후 workspace:save_app을 dispatch해
  finish_pane_rename / clear_pane_name과 동일하게 영구 저장되도록 한다.
- /rename-pane 인자 요구사항을 검증하는 단위 테스트 추가
  (rename_tab_command_requires_argument 미러).
@psh4607
Copy link
Copy Markdown
Author

psh4607 commented Apr 29, 2026

/oz-review

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR exposes pane renaming through a new workspace action, editable binding/command-palette entry, and /rename-pane slash command.

Concerns

  • The command-palette/keybinding path relies on the vertical-tabs inline editor, but only flips the panel-open flag; in horizontal-tab mode the panel is not rendered, so the action can focus an invisible editor.
  • The new CustomAction is inserted before existing variants in a #[repr(isize)] enum used as CustomTag, which renumbers all following custom action tags.
  • Manual security pass found no security-specific issues in the changed surfaces.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/workspace/view.rs Outdated
Comment thread app/src/util/bindings.rs Outdated
Oz의 두 번째 리뷰에서 제기된 IMPORTANT 두 건을 수정한다.

- rename_active_pane: panel_open 플래그만 켜는 것으로는 부족하다.
  TabSettings::use_vertical_tabs가 false면 vertical-tabs panel이
  애초에 render되지 않아 inline rename editor가 보이지 않는 상태로
  포커스되는 문제를 막기 위해, FeatureFlag::VerticalTabs와
  TabSettings::use_vertical_tabs 두 조건을 모두 검사하고
  비활성 상태에서는 ephemeral toast로 /rename-pane 슬래시 사용을
  안내한 뒤 early return한다. (view.rs:1047, 4933, 6248과 동일한 패턴.)
- CustomAction::RenamePane 위치 이동: enum이 #[repr(isize)]로
  CustomTag와 직접 매핑되므로 RenameTab 다음에 끼워넣으면 그 이후
  variant들의 discriminant가 모두 +1 shift되어 사용자가 저장한
  메뉴/키바인딩 태그가 다른 액션에 매핑될 수 있다. RenamePane을
  enum 끝(ToggleConversationListView 뒤)으로 옮겨 기존 variant들의
  discriminant를 보존한다. custom_tag_to_keystroke match arm 위치는
  가독성을 위해 유지(enum 순서와 무관하므로 영향 없음).
@psh4607
Copy link
Copy Markdown
Author

psh4607 commented Apr 29, 2026

/oz-review

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds a rename-pane workspace action, editable binding/Command Palette entry, and /rename-pane slash command mirroring the existing rename-tab paths.

Concerns

  • The new keybinding/Command Palette action is registered globally but does not rename panes in the default horizontal-tab configuration; it only shows a toast.
  • In Vertical Tabs summary mode, the action can focus the pane rename editor even though that editor is not rendered, so the command appears to do nothing.
  • Supplemental security pass: no security issues found in the changed slash-command parsing or pane-title persistence paths.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/workspace/view.rs Outdated
Comment thread app/src/workspace/view.rs Outdated
psh4607 added 2 commits April 29, 2026 16:41
- inline editor 가시 조건을 `use_vertical_tabs && granularity == Panes`로 좁힘
  (Tabs granularity의 FocusedSession/Summary resolved 모드에서 pane row 루프
   진입 전 early return하므로 `pane_rename_editor`가 렌더되지 않음 — Thread D 해소).
- 가시 조건 미충족 시 `replace_buffer_content`로 active terminal input에
  `/rename-pane ` 을 prefill하고 input box를 focus → horizontal-tab 기본 모드와
  summary 모드 모두에서 binding/Command Palette가 실제 rename 흐름을 수행함
  (Thread C 해소).
- terminal이 없을 때만 toast로 안내 (드물지만 안전한 fallback).
`vertical_tabs_display_granularity`는 직접 `*` deref가 불가한 SettingsValue
variant라 `.value()`를 거쳐야 enum reference를 얻을 수 있다 (view.rs:1048-1050의
`tab_rename_editor_font_size` 가 동일 패턴 사용). a37269d가 이 호출을 누락해
`error[E0614]: type 'VerticalTabsDisplayGranularity' cannot be dereferenced`로
컴파일 실패하던 것을 수정.

원인 진단: 이전 cargo check task들이 `cargo ... | tail -N` 형태라 pipefail 미설정
시 cargo의 실제 exit code가 tail의 exit code(항상 0)로 가려졌음. 본 commit과
이후 검증은 `set -o pipefail` 적용 후 정직한 EXIT=0 확인.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename Pane action is reachable only from the right-click menu — not bindable, not in Command Palette

2 participants