Skip to content

Commit 593eec0

Browse files
committed
refine: only show workspace switching by default, not mutations
Changed the default filter to only show `ws:switch:*` commands, excluding workspace mutations like create, delete, and rename. These management commands are still accessible via the `>` prefix. **Why:** - Workspace switching is the primary use case - Create/delete/rename are mutations that should require explicit intent - Keeps the default palette extremely focused and fast **Changes:** - Filter by command ID prefix `ws:switch:*` instead of section name - Updated documentation to clarify "switching" vs "workspace management" - Updated Storybook story descriptions
1 parent e4a2d30 commit 593eec0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/keybinds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ When documentation shows `Ctrl`, it means:
5858

5959
The command palette (`Ctrl+Shift+P`) is primarily a **workspace switcher** by default:
6060

61-
- **Default**: Shows only workspace commands (switch, create, rename, etc.)
62-
- **`>` prefix**: Shows all commands (navigation, chat, modes, projects, etc.)
61+
- **Default**: Shows only workspace switching commands (no mutations like create/delete/rename)
62+
- **`>` prefix**: Shows all commands (navigation, chat, modes, projects, workspace management, etc.)
6363
- **`/` prefix**: Shows slash command suggestions for inserting into chat
6464

65-
This design keeps the palette focused on the most common use case (workspace switching) while still providing quick access to all commands when needed.
65+
This design keeps the palette focused on the most common use case (switching between workspaces) while still providing quick access to all commands when needed.
6666

6767
## Tips
6868

src/components/CommandPalette.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ export const Default: Story = {
185185
<br />
186186
<strong>Features:</strong>
187187
<br />
188-
• By default, shows workspace switching commands
189-
<br />• Type <kbd>&gt;</kbd> to see all commands across all sections
188+
• By default, shows only workspace switching commands (no create/delete/rename)
189+
<br />• Type <kbd>&gt;</kbd> to see all commands including workspace management
190190
<br />• Type <kbd>/</kbd> to see slash commands for chat input
191191
<br />
192192
• Use ↑↓ arrow keys to navigate, Enter to execute

src/components/CommandPalette.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ export const CommandPalette: React.FC<CommandPaletteProps> = ({ getSlashContext
208208
// Filter actions based on prefix
209209
const showAllCommands = q.startsWith(">");
210210

211-
// When no prefix is used, only show workspace-related commands
211+
// When no prefix is used, only show workspace switching commands (not mutations like create/delete/rename)
212212
const actionsToShow = showAllCommands
213213
? rawActions
214-
: rawActions.filter((action) => action.section === COMMAND_SECTIONS.WORKSPACES);
214+
: rawActions.filter((action) => action.id.startsWith("ws:switch:"));
215215

216216
const filtered = [...actionsToShow].sort((a, b) => {
217217
const ai = recentIndex.has(a.id) ? recentIndex.get(a.id)! : 9999;

0 commit comments

Comments
 (0)