Skip to content

Migrate all URL query-param state to nuqs - #37

Open
ajvpot wants to merge 2 commits into
mainfrom
ajvpot/noqa-search-map-params
Open

Migrate all URL query-param state to nuqs#37
ajvpot wants to merge 2 commits into
mainfrom
ajvpot/noqa-search-map-params

Conversation

@ajvpot

@ajvpot ajvpot commented May 29, 2026

Copy link
Copy Markdown
Owner

Replaces the hand-rolled useQueryParams hook with nuqs type-safe parsers across the whole app, and adds the NuqsAdapter provider to the root layout. Search params (q/limit/exact/is_repeater) and map position (lat/lng/zoom) are inlined with useQueryStates, and ChatBox's selectedTab uses useQueryState. Booleans are now real booleans, so the search page's string-coercion helpers are gone, and node-link search URLs emit exact=true/is_repeater=true so parseAsBoolean reads them. The old useQueryParams.ts hook now has no consumers and is deleted entirely. Verified with a clean npm run build (/search and /messages still prerender statically).

🤖 Generated with Claude Code

@ajvpot ajvpot changed the title Migrate search & map query-param state to nuqs Migrate all URL query-param state to nuqs May 29, 2026
Alex Vanderpot and others added 2 commits June 15, 2026 21:32
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
ajvpot force-pushed the ajvpot/noqa-search-map-params branch from 8785cdf to 1f94c54 Compare June 16, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant