Skip to content

feat(desktop): command palette (Cmd/Ctrl+K) for fast navigation#3124

Open
HUQIANTAO wants to merge 1 commit into
esengine:main-v2from
HUQIANTAO:feat/command-palette
Open

feat(desktop): command palette (Cmd/Ctrl+K) for fast navigation#3124
HUQIANTAO wants to merge 1 commit into
esengine:main-v2from
HUQIANTAO:feat/command-palette

Conversation

@HUQIANTAO
Copy link
Copy Markdown
Contributor

Add a launcher modal triggered by Cmd/Ctrl+K (and the new Search chip in the topbar). It fuzzy-searches a flat list of palette items built from three sources: app-level actions (new session / settings / memory / history), slash-commands fetched from app.Commands(), and the saved-session list from listSessions().

Interaction: Esc closes, arrow keys move the highlight (wraps), Enter runs. Mouse hover sets the highlight. Items are grouped (Actions / Commands / Sessions) and section order is the order groups first appear in the filtered list.

Lazy data load: sessions and commands are fetched on first open, not on mount.

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 4, 2026
Add a launcher modal triggered by Cmd/Ctrl+K (and the new Search
chip in the topbar). It fuzzy-searches a flat list of palette items
built from three sources: app-level actions (new session / settings /
memory / history), slash-commands fetched from app.Commands(), and
the saved-session list from listSessions().

Interaction:
  - Esc closes, arrow keys move the highlight (wraps), Enter runs.
  - Mouse hover sets the highlight so a click is pre-confirmed.
  - Items are grouped (Actions / Commands / Sessions) and section
    order is the order groups first appear in the filtered list,
    matching the user's mental model ('sessions are the most frequent
    target').

Lazy data load: sessions and commands are fetched on first open, not
on mount, so users who never press Cmd+K pay nothing. Subsequent
opens hit the in-memory cache.

Search: every space-separated query token must appear in the
candidate's haystack (title + hint + keywords) in order; scoring
favors tight prefixes and earlier matches. A real fuzzy matcher is
overkill for the 50-200 item working set.

A11y: the palette is role=dialog + aria-modal; the input is
auto-focused; Esc restores focus to the trigger (snapshot on open,
restored on close). Each result row is role=option with
aria-selected on the active one.

The topbar's Search chip has aria-keyshortcuts='Control+K' so screen
readers announce the chord. We deliberately don't listen to the
chord while an input/textarea is focused (it would steal the
OS-default cursor-to-start shortcut on some platforms).
@HUQIANTAO HUQIANTAO force-pushed the feat/command-palette branch from 5cabc15 to 4de6b1d Compare June 5, 2026 01:44
@HUQIANTAO HUQIANTAO requested a review from SivanCola as a code owner June 5, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant