Skip to content

feat(command-palette): add Cmd/Ctrl+K command palette#164

Merged
liam-russell merged 2 commits into
mainfrom
feat/command-palette
Jul 7, 2026
Merged

feat(command-palette): add Cmd/Ctrl+K command palette#164
liam-russell merged 2 commits into
mainfrom
feat/command-palette

Conversation

@liam-russell

Copy link
Copy Markdown
Contributor

Type

  • feat — new feature or user-visible capability

Summary

  • Added a Cmd/Ctrl+K command palette with fuzzy search, available on the home and workspace screens.
  • The palette covers jump-to-worktree, create worktree, launch agent, delete worktree, tab/settings navigation, fetch/pull/push, workspace hooks, and recent projects.

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.api doesn'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 lint
  • pnpm typecheck
  • pnpm test (unit + full E2E suite, including new e2e/specs/command-palette.spec.ts)
  • Manually verified opening/closing, fuzzy filtering, and jump-to-worktree via the E2E harness against a real Electron build

Closes #90

Copilot AI review requested due to automatic review settings July 7, 2026 10:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CommandPalette UI component and a fuzzyScore utility 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.

Comment thread packages/ui/src/components/CommandPalette.tsx
Comment thread app/src/renderer/routes/workspace.tsx Outdated
Comment thread packages/ui/src/fuzzy-match.ts Outdated
@liam-russell liam-russell force-pushed the feat/command-palette branch from 01a05b2 to 10cc523 Compare July 7, 2026 10:34
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).
@liam-russell liam-russell force-pushed the feat/command-palette branch from 10cc523 to b6b3c88 Compare July 7, 2026 10:44
@liam-russell liam-russell merged commit 8a25856 into main Jul 7, 2026
28 of 29 checks passed
@liam-russell liam-russell deleted the feat/command-palette branch July 7, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command palette (Cmd+K)

2 participants