Feat/terminals in command palette#883
Conversation
feat(tabs): select tabs by index within active space
…dow-shortcut feat(shortcuts): add ai toggle mini shortcut
|
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 app adds a new ChangesNavigation and AI controls
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 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 closes over
activeSpaceId inside tab.selectByIndex, but activeSpaceId is missing from the
dependency list, so Cmd/Ctrl+1..9 can keep using a stale space after switching.
Update the useMemo dependencies that build shortcutHandlers to include
activeSpaceId, and verify the handler map is rebuilt whenever the active space
changes to keep tab selection scoped correctly.
In `@src/modules/ai/components/AiStatusBarControls.tsx`:
- Around line 173-174: The mini-window control in AiStatusBarControls should
actually toggle state instead of always opening. Update the button wiring so the
click handler matches the dynamic title from miniOpen, using the same toggle
behavior as the ai.toggleMini shortcut in App, and ensure the handler switches
between open and close actions rather than calling openMini unconditionally.
🪄 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: 25938cc4-ec19-4168-9602-0a32434e828b
📒 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
What
Adds a Terminals section to the command palette (Cmd+P) that lists all open terminal tabs in the current space by name, letting you switch to any terminal instantly without touching the mouse.
Why
The command palette already lets you switch spaces, open new tabs, and run commands — but there was no way to navigate to a specific open terminal tab by name. Power users with many terminals open had to click through the tab bar instead of staying keyboard-driven.
How
"Terminals"as a new group inCOMMAND_GROUPS(between Spaces and Tabs)CommandPaletteActionContextwithterminalTabsandswitchTabcreateCommandItems, spread dynamic palette entries for each terminal tab in the active space — usingcustomTitle ?? titleas the display name andTerminalIconas the icon; the currently active tab renders as disabled with a "Current tab" badgeApp.tsx, passedterminalTabs(filtered tokind === "terminal"in the current space) andswitchTab: (id) => setActiveId(id)into the palette contextTesting
pnpm exec tsc --noEmitcleanpnpm tauri devScreenshots / GIFs
Notes for reviewer
Only terminal tabs (
kind === "terminal") in the active space are shown — cross-space terminals are intentionally excluded since switching to one would require a space switch first. If we later want cross-space terminal navigation, we can extendswitchTabto also callswitchSpace.Summary by CodeRabbit
New Features
Bug Fixes
Chores