Merged
Conversation
Contributor
|
@f3-jolt this sounds amazing! One question on "Single input field, debounced at 600ms, fires 3 parallel searches on each keystroke". Does that mean it's making 3 BQ queries every key stroke? Or is it hitting a local cache? |
Contributor
|
I just checked it out in staging. It is amazing!! |
Closed
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.
👋 TL;DR
Replaces the multi-field navbar search (separate Region, PAX filter, and PAX autocompletes) with a unified command-palette style search modal that searches PAX, Regions, and AOs in one place.
🔎 Details
New: Unified Search Modal (
src/components/search-modal.tsx)Jump to: Regions · AOs · PAX)↑/↓to move,↵to select,escto closeCmd+K/Ctrl+Kopens the modal from anywhere in the appNew: AO Search backend
src/lib/bq/aos.ts— addedsearchAOsByName()queryingpv_aosby name (mirrors PAX/region pattern)src/app/api/ao/list/route.ts— new GET endpoint, auth-gated, min 2 chars, returns 500 + error body on failure (no silent failures)Updated: PAX search supports optional region filter
src/lib/bq/pax.ts—searchUsersByName()accepts optionalregionIdto scope results byhome_region_idsrc/app/api/pax/list/route.ts— parses optionalregion_idquery param and passes throughSimplified: Navbar (
src/components/navbar.tsx)SEARCHbutton on both desktop and mobile, same on both breakpointsCmd+Kglobal listener added✅ How to Test
SEARCH(or pressCmd+K) → type at least 2 chars → confirm results appear in Regions / AOs / PAX sectionsJump to:bar appears with links → click each and confirm it scrolls to the correct section↑/↓to move through results across sections →↵to navigate → confirm it routes to the correct page and closes the modalCmd+Kfrom any page → confirm modal opensSEARCHbutton opens the same modal (no drawer)🥜 GIF