feat(palette): command palette overlay bound to cmd/ctrl+k on home#38
Merged
Conversation
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.
Summary
Turns the inert search bar on Home into a real command palette. Cmd+K / Ctrl+K (⌘K on macOS, Ctrl K elsewhere) or a click on the Home search bar opens a backdropped overlay with grouped results. Lives behind a partial scaffold that was sitting untracked in
src/palette/— this PR plugs the sources, filter, renderer, shortcut listener and styles around it.Scope for v1: Home only. The IDE toolbar placeholder is untouched — a follow-up PR can decide whether to bridge it or drop it.
Groups shown:
lastOpenedAt, minus the active oneWhat changed
User-facing
<mark>amber tint.↑ / ↓navigate,Enterruns the selected row,Escapecloses (focus returns to where it was viauseModalA11y).Ctrl+N,Ctrl+W,Ctrl+Tab) stay untouched.Internal
src/palette/— new module.types.tsgrowsPALETTE_GROUP_ORDERandPALETTE_GROUP_LABELS;paletteStore.ts(open/query singleton),formatShortcut.ts(OS-adaptive modifier),commands.ts(typed registry),sources.ts(aggregator reading live stores),filterPaletteItems.ts(pure substring matcher with title/subtitle ranking),highlightMatch.tsx(wraps the matched slice in<mark>),iconForFile.ts(path → glyph + tone),CommandPalette.tsx(overlay with grouped results, keyboard nav,useModalA11y),useCommandPaletteShortcut.ts(window keydown listener withview === "home"guard).src/App.tsx— renders<CommandPalette />next to<Toasts />and binds the shortcut hook.src/home/sections/HomeSearch.tsx— no moredisabledinput, now a clickable trigger that opens the palette.shortcutLabel("K")replaces the hardcodedCtrl K.src/styles/global.css— new.palette-*class family (~300 lines). All token-based — new oklch values only for the per-type icon tones.