Repository navigation
feat(shortcuts): add assignable shortcut to toggle sleeping workspaces - #6169
Conversation
Add a "Toggle Sleeping Workspaces" keybinding action that flips the sidebar's show-sleeping-workspaces filter without opening the filters menu. Ships unbound (like sidebar.checks.toggle / workspace.openBoard) so users assign their own chord in Settings -> Shortcuts. Revealing sleeping workspaces also opens the left sidebar so they're reachable, and the filter menu's "Hide sleeping" row surfaces the assigned chord for discoverability. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Screen Recording: sleepingtoggle-clean.mov |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughA new keybinding action, 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks, this is in good shape.
Verified locally:
- added
sidebar.sleepingWorkspaces.toggleas an unbound, assignable global shortcut - custom binding toggles sleeping workspace visibility
- revealing sleeping workspaces opens the left sidebar
- filter menu shows the assigned shortcut
- typecheck, lint, focused keybinding tests, and Electron validation pass
I also resolved the main conflict and included a small lint cleanup needed for current main.
What & why
Closes #5209.
Revealing a sleeping workspace today is a four-step dance: open the sidebar
filter menu -> toggle "Hide sleeping" off -> click the now-visible worktree to
wake it -> reopen the menu to hide sleeping again. This adds a keyboard
shortcut that flips the "show sleeping workspaces" filter directly.
Changes
sidebar.sleepingWorkspaces.toggle("ToggleSleeping Workspaces", Global group), shipped unbound by default —
matching existing assign-it-yourself commands (
sidebar.checks.toggle,workspace.openBoard). Users bind it in Settings -> Shortcuts. This avoidsclaiming a cross-platform chord and is exactly what the issue requests.
the now-visible worktrees are reachable (the issue's real goal). Hiding
forces no sidebar change.
menu doubles as the shortcut's discovery point.
Testing
becomes matchable once a user binds it, and is discoverable by title/keywords.
oxlint,typecheck, andbuildpass; new and adjacent test files pass.the left sidebar on reveal, and shows the chord on the "Hide sleeping" row.
AI-agent review summary
registry (
Mod-> Cmd on macOS, Ctrl on Linux/Windows). Unbound on all threeplatforms, so no default-chord collisions. Labels render via the existing
platform-aware
useShortcutLabel.showSleepingWorkspaces); no process/file/shell/network assumptions.Identical for local, remote, and SSH worktrees.
provider-neutral (no GitHub/GitLab-specific logic).
listeners, timers, or hot-path work.
DropdownMenuShortcutshadcn primitive and existingtokens — no new colors/sizes.
Platform / testing notes
Verified manually on macOS with a custom binding. The action is layout-position
based (physical
Backslashwhen bound to e.g. Cmd+), which does not collidewith terminal Ctrl+\ (SIGQUIT). No visual change unless a user assigns a binding.
Demo
Screen recording attached in the PR conversation below.