Migrate all URL query-param state to nuqs - #37
Open
ajvpot wants to merge 2 commits into
Open
Conversation
Replace the hand-rolled useQueryParams hook for the search and map-position features with nuqs type-safe parsers. Adds the NuqsAdapter provider, rewrites useSearchQuery on useQueryStates, switches MapView lat/lng/zoom to nuqs, and fixes node-link URLs to emit exact=true/is_repeater=true so parseAsBoolean reads them. The generic useQueryParams hook stays for ChatBox. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move ChatBox's selectedTab to nuqs useQueryState, inline the search params directly in the search page, and remove the now-unused generic useQueryParams hook (and its file). The entire app's URL query-param state is now nuqs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ajvpot
force-pushed
the
ajvpot/noqa-search-map-params
branch
from
June 16, 2026 01:33
8785cdf to
1f94c54
Compare
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.
Replaces the hand-rolled
useQueryParamshook with nuqs type-safe parsers across the whole app, and adds theNuqsAdapterprovider to the root layout. Search params (q/limit/exact/is_repeater) and map position (lat/lng/zoom) are inlined withuseQueryStates, and ChatBox'sselectedTabusesuseQueryState. Booleans are now real booleans, so the search page's string-coercion helpers are gone, and node-link search URLs emitexact=true/is_repeater=truesoparseAsBooleanreads them. The olduseQueryParams.tshook now has no consumers and is deleted entirely. Verified with a cleannpm run build(/searchand/messagesstill prerender statically).🤖 Generated with Claude Code