Skip to content

feat(web): add nuqs for URL search-param state#72

Merged
GRACENOBLE merged 1 commit into
mainfrom
add-nuqs
Jun 27, 2026
Merged

feat(web): add nuqs for URL search-param state#72
GRACENOBLE merged 1 commit into
mainfrom
add-nuqs

Conversation

@GRACENOBLE

@GRACENOBLE GRACENOBLE commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Installs nuqs v2.8.9 and adds NuqsAdapter as the outermost wrapper in app/providers.tsx, enabling useQueryState / useQueryStates hooks across the app
  • Updates web/docs/trpc.md to reflect the corrected provider nesting order (NuqsAdapter > SessionProvider > TRPCProvider) and documents the Toaster sibling
  • Adds web/docs/url-state.md covering useQueryState, built-in parsers, createSearchParamsCache for Server Components, and a when-to-use guide vs plain useSearchParams

Test plan

  • pnpm build passes with no TypeScript errors
  • pnpm lint passes
  • Dev server starts and existing pages load without errors

Summary by CodeRabbit

  • New Features

    • Added support for URL search-param state across the app.
    • Introduced a new documentation guide covering how to use and manage URL-based state.
  • Documentation

    • Added a docs index entry for the new URL state guide.
    • Updated provider wiring examples and refreshed the verification date in existing docs.
  • Chores

    • Added the required dependency for URL state handling.

Installs nuqs v2.8.9 and mounts NuqsAdapter as the outermost provider in
app/providers.tsx. Updates trpc.md to reflect the new provider nesting order
and adds url-state.md documenting useQueryState, parsers, and server-side
createSearchParamsCache usage.
@github-actions github-actions Bot added area: web Next.js web app type: chore Cleanup or maintenance tasks labels Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds nuqs (^2.8.9) as a dependency and mounts NuqsAdapter as the outermost wrapper in app/providers.tsx. Adds a new url-state.md documentation page covering nuqs usage, updates the trpc.md provider snippet to reflect the new nesting, and adds an index entry for the new doc.

nuqs integration

Layer / File(s) Summary
nuqs dependency and provider wiring
web/package.json, web/app/providers.tsx
nuqs added to dependencies; NuqsAdapter imported and placed as the outermost wrapper around SessionProvider, TRPCProvider, and Toaster.
Documentation
web/docs/url-state.md, web/docs/trpc.md, web/docs/_index.md
New url-state.md documents client usage, parsers, server component access, and when to prefer nuqs. trpc.md provider snippet updated to show NuqsAdapter wrapping, and the docs index gains a new row.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

A NuqsAdapter hops to the top,
Wrapping the tree without a stop.
Search params now live in the URL bar,
Parsed and synced both near and far.
🐇 The rabbit approves — what a clean swap!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding nuqs for URL search-param state in the web app.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-nuqs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GRACENOBLE GRACENOBLE merged commit 904b3cf into main Jun 27, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: web Next.js web app type: chore Cleanup or maintenance tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant