feat(command-palette): add Cmd/Ctrl+K command palette#164
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a global command palette (Cmd/Ctrl+K) to the Electron renderer so users can quickly discover and run common actions via fuzzy search on both the home (projects) screen and workspace screen, aligning with issue #90’s “keyboard-heavy users” goal.
Changes:
- Introduces a reusable
CommandPaletteUI component and afuzzyScoreutility for filtering/sorting commands. - Wires Cmd/Ctrl+K open/close behavior and command lists into the Home and Workspace routes.
- Adds an E2E spec validating open/close, filtering, and key actions (settings + worktree switch).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/index.ts | Exports CommandPalette, CommandPaletteItem, and fuzzyScore from the UI package. |
| packages/ui/src/fuzzy-match.ts | Adds fuzzy matching score helper used by the palette’s filtering/sorting. |
| packages/ui/src/components/CommandPalette.tsx | New portal-rendered command palette modal with keyboard navigation and fuzzy search. |
| e2e/specs/command-palette.spec.ts | New E2E coverage for palette open/close, filtering, and representative actions. |
| app/src/renderer/routes/workspace.tsx | Integrates the palette into workspace with a comprehensive action list and Cmd/Ctrl+K handler. |
| app/src/renderer/routes/index.tsx | Integrates the palette into the home/projects screen with recents + navigation actions and Cmd/Ctrl+K handler. |
01a05b2 to
10cc523
Compare
Adds a fuzzy-searchable command palette to the home and workspace views, covering jump-to-worktree, create worktree, launch agent, delete worktree, tab/settings navigation, fetch/pull/push, workspace hooks, and recent projects. Opens with Cmd/Ctrl+K, closes with Escape. Closes #90
- Rebasing onto main picked up packages/ui/src/fuzzy.ts (added by the model picker PR), which duplicated this branch's own fuzzy-match.ts and broke the build with a duplicate-identifier error. Drop the duplicate and reuse fuzzy.ts's fuzzyScore/fuzzyFilterSort instead (already unit tested). - Fix ArrowDown pushing activeIndex to -1 when the filtered list is empty. - Use the app's "Cmd/Ctrl+B" shortcut label convention instead of the macOS-only "⌘B" glyph. - Update agent-launch/agent-gating references for the agent roster refactor that also landed on main (agentConfig -> defaultAgent on the home screen; pass agentConfig?.id through to launchAgent).
10cc523 to
b6b3c88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Summary
Why
Keyboard-heavy users expect a command palette, and toolbar icons don't scale as actions grow. See #90 and docs/improvement-ideas.md.
Screenshots / recordings
Captured locally via the WebdriverIO E2E harness (Electron app — not a browser-previewable target,
window.apidoesn't exist outside Electron, so I verified through the real Electron binary rather than a browser preview). Not embedded here since GitHub has no public API for inline PR image uploads; happy to attach if you paste it in via the web UI, or let me know if you'd like it committed to the repo or gisted instead.Breaking changes
None
Test plan
pnpm lintpnpm typecheckpnpm test(unit + full E2E suite, including newe2e/specs/command-palette.spec.ts)Closes #90