Skip to content

feat(desktop): wire up ⌘K command palette#3480

Merged
esengine merged 1 commit into
esengine:main-v2from
ttmouse:feat/cmd-k-palette
Jun 8, 2026
Merged

feat(desktop): wire up ⌘K command palette#3480
esengine merged 1 commit into
esengine:main-v2from
ttmouse:feat/cmd-k-palette

Conversation

@ttmouse

@ttmouse ttmouse commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

The CommandPalette component 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+K opens a quick-action modal.

Changes

desktop/frontend/src/App.tsx (+70)

  • Import CommandPalette and PaletteItem type
  • Add paletteOpen state with ⌘K/Ctrl+K toggle listener (keydown capture phase)
  • Add buildPaletteItems() generating two item groups:
    • Chats — each open tab as a quick-switch target
    • Actions — New Session, History, Settings, Trash
  • Render <CommandPalette> below existing overlay components

desktop/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

  • TypeScript compilation passes (tsc --noEmit --pretty)
  • wails build succeeds (darwin/arm64)
  • The existing CommandPalette.tsx component is unchanged — no new component code needed.

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)
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 7, 2026
@ttmouse

ttmouse commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author
image

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +10390 to +10394
.drawer-backdrop:has(.palette) {
justify-content: center;
align-items: flex-start;
padding-top: 12vh;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Wires the existing-but-unmounted CommandPalette to ⌘K/Ctrl+K. Frontend-only, capture-phase toggle, clean.

@esengine esengine merged commit fbc80b8 into esengine:main-v2 Jun 8, 2026
10 checks passed
@ttmouse ttmouse deleted the feat/cmd-k-palette branch June 8, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants