Skip to content

Add Cmd+K command palette with extensible registry#36

Merged
stylessh merged 2 commits intomainfrom
stylessh/cmd-k-palette
Apr 9, 2026
Merged

Add Cmd+K command palette with extensible registry#36
stylessh merged 2 commits intomainfrom
stylessh/cmd-k-palette

Conversation

@stylessh
Copy link
Copy Markdown
Owner

@stylessh stylessh commented Apr 9, 2026

Summary

  • Adds a global command palette triggered via Cmd+K using the existing cmdk library, with searchable navigation across pages, repos, PRs, and issues read from TanStack Query cache (no extra network requests).
  • Displays status-aware icons/colors for PRs (draft/open/merged/closed) and issues, plus metadata (repo name, comment count, stars, relative timestamps) sorted by last updated.
  • Implements chord keyboard shortcuts (G then H/P/I/R) for quick page navigation, with proper input-awareness to avoid triggering inside text fields.
  • Introduces an extensible singleton command registry (registerCommands) mirroring the existing tab-store.ts pattern, designed for future action-based commands (create issue, AI prompts, route-scoped commands).
  • Updates CommandDialog and CommandShortcut in the shared UI package for larger container, top-anchored positioning, keys prop support, and explicit size- class preservation on SVGs.

Test plan

  • Press Cmd+K — palette opens with search input focused
  • Type to filter across pages, repos, PRs, and issues via fuzzy match
  • Select an item — navigates to correct route and closes palette
  • Press Escape or Cmd+K again to close
  • Test chord shortcuts: G then H (Overview), G then P (Pulls), G then I (Issues), G then R (Reviews)
  • Verify shortcuts don't fire when typing in an input or textarea
  • Confirm PR/issue icons reflect correct status and color
  • Confirm comment counts display on the right side with proper spacing

Introduces a global command palette (cmdk) triggered via Cmd+K with:
- Searchable navigation across pages, repos, PRs, and issues from cache
- Status-aware icons and colors for PRs (draft/open/merged/closed) and issues
- Metadata display (repo, comments, stars, timestamps) sorted by updated date
- Chord keyboard shortcuts (G+H, G+P, G+I, G+R) for quick page navigation
- Extensible command registry pattern for future actions (create issue, AI prompts)
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 9, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
🔵 In progress
View logs
diffkit 91e88ea Commit Preview URL

Branch Preview URL
Apr 09 2026, 02:08 AM

@stylessh stylessh merged commit 198cb82 into main Apr 9, 2026
4 checks passed
stylessh added a commit that referenced this pull request Apr 18, 2026
* Add command palette with Cmd+K shortcut and extensible registry

Introduces a global command palette (cmdk) triggered via Cmd+K with:
- Searchable navigation across pages, repos, PRs, and issues from cache
- Status-aware icons and colors for PRs (draft/open/merged/closed) and issues
- Metadata display (repo, comments, stars, timestamps) sorted by updated date
- Chord keyboard shortcuts (G+H, G+P, G+I, G+R) for quick page navigation
- Extensible command registry pattern for future actions (create issue, AI prompts)

* Fix useRef missing initial value for React 19 types
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.

1 participant