feat(desktop): wire up ⌘K command palette#3480
Conversation
The CommandPalette component existed in the codebase since its original PR but was never imported or rendered in App.tsx. Wire it up: - Import CommandPalette and PaletteItem type - Add paletteOpen state with ⌘K/Ctrl+K toggle listener - Add buildPaletteItems() generating session-switch + action items - Render <CommandPalette> below existing overlays - Add palette CSS styles (backdrop, panel, input, list, footer)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18966b98f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .drawer-backdrop:has(.palette) { | ||
| justify-content: center; | ||
| align-items: flex-start; | ||
| padding-top: 12vh; | ||
| } |
There was a problem hiding this comment.
Raise the palette above existing modals
When the shortcut is used while Settings or History/Trash is already open, the palette backdrop still inherits .drawer-backdrop's z-index of var(--z-drawer-backdrop) (90), while those visible modals use var(--z-modal) (1200). The palette is therefore mounted behind the current modal, but CommandPalette still autofocuses its input and handles Enter/arrow keys, so keyboard input can be stolen by an invisible palette and even run a hidden action. Give the palette backdrop a modal-level z-index here or suppress the shortcut while another modal is open.
Useful? React with 👍 / 👎.
esengine
left a comment
There was a problem hiding this comment.
Wires the existing-but-unmounted CommandPalette to ⌘K/Ctrl+K. Frontend-only, capture-phase toggle, clean.

The
CommandPalettecomponent has existed in the codebase since its original PR but was never imported or rendered in the app. This change wires it up so⌘K/Ctrl+Kopens a quick-action modal.Changes
desktop/frontend/src/App.tsx(+70)CommandPaletteandPaletteItemtypepaletteOpenstate with⌘K/Ctrl+Ktoggle listener (keydowncapture phase)buildPaletteItems()generating two item groups:<CommandPalette>below existing overlay componentsdesktop/frontend/src/styles.css(+135).drawer-backdrop:has(.palette)— centered backdrop layout.palette— modal panel with rounded corners, shadow, fade+slide animation.palette__inputrow/.palette__input— search bar.palette__list/.palette__group-title/.palette__item— grouped fuzzy-match list.palette__foot— keyboard hints (↑↓ navigate, ↵ run, esc close)Verification
tsc --noEmit --pretty)wails buildsucceeds (darwin/arm64)CommandPalette.tsxcomponent is unchanged — no new component code needed.