feat: ⌘K command palette (fuzzy search, grouped, keyboard-first) - #1
Merged
Conversation
hellno
force-pushed
the
hellno/commit-open-pr
branch
from
June 5, 2026 12:51
120f945 to
e215857
Compare
A Superhuman/Linear-style command palette built on gpui-component's List + ListDelegate (the same searchable-list primitive Zed's palette uses): - Floating top-anchored panel over a soft scrim; fuzzy search with accent-highlighted matched characters; commands grouped by category with a Recent group; live shortcut chips derived from the keymap. - Commands run by dispatching real gpui actions, so palette == hotkey == menu. A small Run enum (Action | Accent) keeps the registry a clean, one-line-to-add literal. - Compact dependency-free fuzzy matcher (prefix/word-boundary/consecutive bonuses, returns match ranges for highlighting) with unit tests. - Wired via TogglePalette action + secondary-k; overlay rendered by Shell; run bridged through ListEvent (delegate stashes pending, Shell drains). New: src/command_palette.rs. Wiring: main.rs, shell.rs. Docs: README, LEARNINGS.
hellno
force-pushed
the
hellno/commit-open-pr
branch
from
June 5, 2026 12:57
e215857 to
2e3bd65
Compare
The Linux job's `cargo build --features tray` failed to link with `unable to find library -lxdo`: tray-icon pulls libxdo-sys, which needs the system libxdo on Linux, but it was missing from the apt list (and the README's tray deps). Pre-existing — unrelated to the command palette.
hellno
added a commit
that referenced
this pull request
Jun 5, 2026
Brings in the ⌘K command palette (#1) and the LEARNINGS tightening (13a300d). Conflict resolution: - src/main.rs (View menu): keep the new "Command Palette…" item AND the git-gpui-required `Menu { disabled: false, .. }` field. - docs/LEARNINGS.md §2: keep the corrected git-default dependency story (the incoming side reverted to the old "longbridge fork" text). Ported the merged-in palette to the git gpui API: - src/command_palette.rs: window.focus(&handle, cx) (gained a cx arg). - README "Why this exists": "pure crates.io deps" -> "fresh git-pinned GPUI". Re-verified on the merged tree: cargo build (default + tray), clippy -D warnings (default + tray), cargo fmt, runtime smoke (no panic).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⌘K Command palette
A Superhuman/Linear-style command palette, built on gpui-component's
List+ListDelegate(the same searchable-list primitive Zed's own palette uses — so search, keyboard nav, scrolling
and selection come for free).
What you get
Recent group that floats recently-run commands out of their category (Raycast/Spotlight style).
KeyBindingand the chip follows.↵to run,esc/backdrop to close; footer hint bar; subtle fade-in.The "shadcn" promise — adding a command is one line
It dispatches the same gpui action as the hotkey and the menu, so the three can never drift:
A small
Runenum (Action|Accent) keeps the registry a clean literal; an## Extendingdocblock covers new
Runvariants, categories, and persistent recents.How it's wired
TogglePaletteaction +secondary-kkeybinding + a View-menu item (main.rs).Shellowns the open/closed state, rebuilds a freshListStateeach open (query always startsempty), and renders the overlay as its last child (
shell.rs).Shell, so running a command is bridged throughListEvent: thedelegate stashes the chosen command,
Shell::on_palette_eventdrains it, closes the palette,then dispatches (so the action lands on Shell's focus tree).
match ranges for highlighting) with 6 unit tests.
Files
src/command_palette.rs(registry, matcher, delegate, overlay, tests)src/main.rs,src/shell.rsREADME.md(Command palette section),docs/LEARNINGS.md §16(load-bearing details + gotchas)Quality
cargo check+clippyclean (0 warnings) ·fmtapplied · 6 matcher tests pass · verifiedrunning in light and dark. Reviewed by a multi-agent pass (correctness / DX / design) with each
finding verified against source; the confirmed polish items (light-mode scrim, selected-row icon,
long-title truncation, extension docs) are included.
🤖 Generated with Claude Code