Conversation
A quick-open over the app's existing destinations: the pages, the 51 My Grid states, the tracked tickers from the supply-chain config, the cluster detail pages, and the research posts. Typing texas lands on My Grid with Texas chosen; ccj opens the Cameco page; abilene lists the Abilene clusters. Pure ranking in lib/palette.ts (7 tests) over static and file-backed lists - the palette never touches a quote API, so opening it costs at most two cached JSON reads. Self-contained component: it owns the Cmd+K/Ctrl+K hotkey and the gt-open-palette event, so App.tsx only mounts it and the G-chord handler is untouched. Top nav gains the search button; the shortcuts panel lists the binding. Combobox/listbox semantics per the a11y pass. tsc 0, 491 tests, build green. Driven in a real browser: hotkey, typed queries, arrow/enter, nav button, escape. Claude-Session: https://claude.ai/code/session_019VHXaB2wsfodFneo1VvANN
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.
Bottom line: press Cmd+K anywhere and type where you want to go. "texas" lands on My Grid with Texas chosen, "ccj" opens the Cameco stock page, "abilene" lists the Abilene clusters and takes you to the detail page. GridTilt has 235 cluster pages, dozens of ticker pages, and 51 state views that are only reachable by knowing where to click; now they are one keystroke away.
What it searches
Only what already exists, nothing invented: the 12 sections, the 51 My Grid states (choosing one sets the state and opens the page), the tracked tickers from the supply-chain config, every cluster detail page, and the research posts. Ranking is a pure function in
lib/palette.ts(7 tests): label prefix beats word match beats hint/keyword match, ties break pages > states > stocks > clusters > research.Cost discipline: clusters and research load lazily from their file-backed endpoints on first open. The palette never touches a quote API.
Wiring
Self-contained component that owns its Cmd+K/Ctrl+K hotkey and a
gt-open-paletteevent; App.tsx just mounts it, the G-chord handler is untouched. The top nav gains a search button with the ⌘K hint, and the?shortcuts panel lists the binding. Combobox/listbox semantics witharia-activedescendant, in line with the keyboard-access pass from #21.Known limit: no mobile entry point yet (the nav button is md-and-up and phones have no hotkey); a follow-up can surface it on the phone nav.
Verification
tsc 0, 491/491 tests (7 new), build green. Driven in a real browser: hotkey open, typed queries, arrow/enter navigation, the nav button, escape close - each landing URL asserted, including the My Grid state select reading "TX" after choosing Texas.
Touches only
App.tsx,top-nav.tsx, and new files, so it stays clear of the other open PRs.🤖 Generated with Claude Code
https://claude.ai/code/session_019VHXaB2wsfodFneo1VvANN