Add tab and workspace rename keyboard shortcuts (macOS)#3280
Conversation
Add two rebindable catalog actions: - tab.rename (Cmd+R, macOS) — rename the active terminal tab - workspace.rename (Cmd+Opt+R, macOS) — rename the active worktree Both open the existing inline title editor via an id-based store flag (renamingTabId / renamingWorktreeId) that the matching component consumes and clears once. App-level Cmd+R stays clear of browser reload because the browser pane owns its own focus zone, so the chord never reaches the app handler there; Cmd+Opt+R is used for workspace rename to avoid the global Force Reload chord (Cmd+Shift+R), which is left untouched. Both are unbound on Windows/Linux, where Ctrl+R is the shell reverse-search and no safe default exists — users bind them in Settings. Follow-up to stablyai#3193 (tab number-jump); covers the rename portion of stablyai#3163. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Keep rename shortcuts scoped to the active workspace surface, make workspace rename visible from collapsed/compact sidebar states, and add component/keybinding seam coverage.
|
Review/fix pass on the rename shortcuts is pushed as What changed:
CDP/manual evidence:
Verification:
Draft status preserved; not merged. |
|
Revalidated this shortcut/default-decision branch and moved it out of draft. Decision on the draft/default concern:
Fresh validation on head
Manual/CDP evidence from the review pass remains applicable on this head:
No merge performed. |
Co-authored-by: Orca <[email protected]>
# Conflicts: # src/renderer/src/components/sidebar/WorkspaceKanbanCard.tsx # src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts # src/renderer/src/components/sidebar/WorktreeList.tsx # src/renderer/src/store/slices/worktrees.test.ts # src/shared/keybindings.ts
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks, this is a useful follow-up to the tab shortcut work.
I pushed a maintainer follow-up that:
- keeps tab/workspace rename shortcuts in a shared conflict group so user overrides cannot bind both to the same active-workspace chord
- reveals the active workspace before beginning workspace rename, so filtered/collapsed/offscreen sidebar rows still mount the editor
- routes nested lineage child titles through the same inline rename surface
- prevents rename shortcuts from targeting the background workspace while focus is in the floating workspace panel
- preserves the current main-branch macOS Option punctuation fallback while merging latest main
Validation:
RUN v4.1.5 /Users/jinwoohong/orca/workspaces/orca/pr-review-3280
Test Files 6 passed (6)
Tests 233 passed (233)
Start at 16:18:27
Duration 957ms (transform 1.80s, setup 0ms, import 1.42s, tests 1.24s, environment 0ms)
- WARN Unsupported engine: wanted: {"node":"24"} (current: {"node":"v26.0.0","pnpm":"10.24.0"})
[email protected] typecheck /Users/jinwoohong/orca/workspaces/orca/pr-review-3280
tsgo --noEmit -p config/tsconfig.node.json && tsgo --noEmit -p config/tsconfig.tc.cli.json && tsgo --noEmit -p config/tsconfig.tc.web.json
- WARN Unsupported engine: wanted: {"node":"24"} (current: {"node":"v26.0.0","pnpm":"10.24.0"})
[email protected] lint /Users/jinwoohong/orca/workspaces/orca/pr-review-3280
oxlint && pnpm run lint:switch-exhaustiveness && node config/scripts/check-styled-scrollbars.mjs
src/renderer/src/components/right-sidebar/ChecksPanel.tsx:2083:5: warning react-hooks(exhaustive-deps): React Hook useCallback has unnecessary dependency: prNumber help: Either include it or remove the dependency array.
src/renderer/src/components/right-sidebar/ChecksPanel.tsx:2083:5: warning react-hooks(exhaustive-deps): React Hook useCallback has unnecessary dependency: pr.headSha help: Either include it or remove the dependency array.
src/renderer/src/components/right-sidebar/ChecksPanel.tsx:2083:5: warning react-hooks(exhaustive-deps): React Hook useCallback has unnecessary dependency: pr.prRepo help: Either include it or remove the dependency array.
src/renderer/src/components/right-sidebar/ChecksPanel.tsx:2248:5: warning react-hooks(exhaustive-deps): React Hook useCallback has unnecessary dependency: linkedGitLabMR help: Either include it or remove the dependency array.
WARN Unsupported engine: wanted: {"node":"24"} (current: {"node":"v26.0.0","pnpm":"10.24.0"})
[email protected] lint:switch-exhaustiveness /Users/jinwoohong/orca/workspaces/orca/pr-review-3280
oxlint --type-aware --config config/oxlint-switch-exhaustiveness.json src/main src/preload src/shared src/relay src/cli src/renderer/src config tests --quiet (existing ChecksPanel hook-dependency warnings only)
- Electron dev app: verified ⌘R opens the terminal-tab rename input and ⌘⌥R opens the workspace rename input in the rendered UI.
# Conflicts: # src/main/git/status-upstream-probe-churn.test.ts # src/renderer/src/components/sidebar/WorktreeList.lineage-child-card.test.ts
Adds configurable macOS shortcuts for renaming the active terminal tab and active workspace, with review follow-up fixes for conflict detection, sidebar reveal, lineage child rename surfaces, and floating workspace focus scoping.
Summary
Follow-up to #3193 (tab number-jump). Covers the rename portion of #3163 that was explicitly deferred there ("Rename shortcuts remain for a follow-up because Cmd+R / Cmd+Shift+R overlap with browser reload and force-reload behavior and need a keybinding/default decision").
This is meant as a base sketch — the defaults are the debatable part, so I've made the safe choices explicit below; feel free to take this branch and change the chords/scope however you prefer.
Two rebindable catalog actions:
tab.rename→ ⌘R (macOS) — rename the active terminal tabworkspace.rename→ ⌥⌘R (macOS) — rename the active worktreeThe keybinding/default decision
browser.reload.app.forceReload(⌘⇧R) untouched. (⌘⇧R would have required remapping a built-in; avoided.)Ctrl+Ris the shell reverse-search andCtrl+Shift+Ris reload, andCtrl+Alt+Rhas no safe/conventional default (often grabbed by the DE). Function keys aren't supported by the binding parser either. Mirrors the existing macOS-onlysidebar.ports.toggle. Users bind them in Settings → Shortcuts.How it works
Rename state lives locally in the inline editors (
SortableTab,WorktreeTitleInlineRename). A global shortcut can't reach it directly, so it sets an id-based store flag the matching component consumes and clears once:renamingTabId(tabs slice) — keyed by terminal-tab id (same id space asactiveTabId)renamingWorktreeId(worktree slice)App.tsxdispatches: ⌘R →setRenamingTabId(activeTabId)when the active tab is a terminal; ⌥⌘R → reveal the active worktree (so its card is mounted even when filtered) thensetRenamingWorktreeId.WorktreeTitleInlineRenamestays presentational — driven by abeginEditingprop +onBeginEditingConsumedcallback thatWorktreeCardderives from / clears the store flag (consume-always so it can't linger; skips opening whiledisabled).Known limitations (open to direction)
WorktreeCardbut notWorkspaceKanbanCard— ⌥⌘R won't open rename in the kanban view yet (small follow-up if wanted).Validation
pnpm typecheck✅pnpm lint✅pnpm test— added unit tests pass (catalog defaults + no-conflict via scope separation; both store flags set/clear). The only failing suite tests are unrelated live-network hosted-review integration tests.🤖 Generated with Claude Code
Risk assessment
Risk: HIGH
Historic risk metadata backfill based on the existing
risk:highlabel.Risk: high
Historic risk metadata backfill based on the existing
risk:highlabel.