Plan

Add Command Palette (Cmd+K)

Summary

Add a global command palette to the app, opened with Cmd+K (or Ctrl+K on Windows and Linux). It lets the user jump to any page, run common actions, and pull up recent items without leaving the keyboard.

Implementation Changes

  • Add the palette component in src/components/command-palette.tsx:
    • Mount it at the root so it overlays any route.
    • Render through a portal so it sits above existing dialogs.
  • Wire the global hotkey in src/hooks/use-command-palette.ts:
    • Listen for Cmd+K and Ctrl+K and toggle the palette open.
    • Skip the shortcut when focus is inside an input or contenteditable.
  • Register actions in src/lib/commands.ts:
    • Pull navigation entries from the existing route manifest.
    • Let feature modules register their own commands at boot.
  • Surface recent items from the activity log:
    • Read the last 10 viewed items from local storage and put them at the top.
    • Update the log whenever a route view is recorded.

Acceptance

  • Cmd+K opens and closes the palette from anywhere in the app.
  • Typing filters navigation, actions, and recent items in a single list.
  • The first match is preselected and Enter triggers it.
  • Esc closes the palette and returns focus to the previously focused element.