feat(shortcuts): add configurable shortcut to show Files sidebar#884
feat(shortcuts): add configurable shortcut to show Files sidebar#884roberto-fernandino wants to merge 8 commits into
Conversation
feat(tabs): select tabs by index within active space
…dow-shortcut feat(shortcuts): add ai toggle mini shortcut
…nd-palette feat: terminals in command-palette
Adds a new keyboard shortcut (Cmd+Shift+G by default) that switches the
sidebar to the Files/explorer view. Pairs naturally with Cmd+G (source
control) so the user can toggle between them without touching the mouse.
The shortcut uses cycleSidebarView("explorer") — same pattern as pane.source
uses for source-control — and is fully configurable in Settings > Shortcuts.
Also exposed as "Show Files sidebar" in the command palette.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR bumps the pnpm packageManager version and updates space-scoped tab selection, AI and explorer shortcut wiring, and terminal-tab command-palette items. ChangesNavigation and command palette controls
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/App.tsx`:
- Around line 643-647: The `shortcutHandlers` memo in `App.tsx` is missing
`activeSpaceId`, so the `"tab.selectByIndex"` handler can keep using a stale
space after switching spaces. Update the dependency list for the
`shortcutHandlers` memo (and any related memoized shortcut setup around the same
block) to include `activeSpaceId`, so `selectByIndex` always resolves against
the current space. Verify the Cmd+1..9 path uses the latest `activeSpaceId`
rather than a previously captured value.
In `@src/modules/ai/components/AiStatusBarControls.tsx`:
- Around line 173-174: The mini-chat status bar control in
AiStatusBarControls.tsx is only opening the window because its onClick handler
always points to openMini, even though the title now reflects an open/close
toggle. Update the click behavior in the status bar button so it actually
toggles the mini chat state by calling the appropriate open/close handler based
on miniOpen, and keep the title in sync with that same state logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ed812ecc-d7ec-4486-977e-8aaecf0bcf30
📒 Files selected for processing (7)
package.jsonsrc/app/App.tsxsrc/modules/ai/components/AiStatusBarControls.tsxsrc/modules/command-palette/commands.tssrc/modules/shortcuts/shortcuts.tssrc/modules/tabs/lib/pickTabBySpaceIndex.test.tssrc/modules/tabs/lib/useTabs.ts
Summary
Motivation
After pressing ⌘G to open Source Control, there was no keyboard shortcut to switch back to the Files sidebar — users were forced to click with the mouse.
How it works
Uses
cycleSidebarView("explorer")— the same patternpane.sourceuses for source-control:Three files changed:
src/modules/shortcuts/shortcuts.ts— adds"sidebar.files"shortcut id + entrysrc/modules/command-palette/commands.ts— adds context field + command palette itemsrc/app/App.tsx— wires up the handlerTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit