Skip to content

fix: preserve query state across concurrent rebases - #1507

Merged
franky47 merged 4 commits into
nextfrom
repro/issue-1506
Jul 29, 2026
Merged

fix: preserve query state across concurrent rebases#1507
franky47 merged 4 commits into
nextfrom
repro/issue-1506

Conversation

@franky47

Copy link
Copy Markdown
Member

React can rebase hook state while the latest optimistic value remains in nuqs refs. When the URL cache already holds that value, reconciliation must restore the rebased state instead of committing a brief revert.

The regression waits for the transition to settle and covers each adapter where the faulty sequence occurs.

Fixes #1506

@franky47 franky47 added bug Something isn't working adapters/next/app Uses the Next.js app router adapters/react Uses the React SPA adapter adapters/react-router Uses the React Router adapter adapters/tanstack-router Uses the TanStack Router adapter labels Jul 29, 2026
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nuqs Ready Ready Preview Jul 29, 2026 8:15pm

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f67c5c9c-8a34-4c22-86b8-4640f6a24d56

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/nuqs@1507

commit: ba4ad53

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bundle size

Base PR Δ
✅ Client 5.55 kB 5.58 kB ⬆️ +23 B
✅ Client (minimal tree-shaken) 4.04 kB 4.05 kB ⬆️ +15 B
✅ Server 3.56 kB 3.56 kB

Brotli-compressed. Limits are set in the size-limit config in packages/nuqs/package.json.

@franky47 franky47 added the pr-waiting-for-feedback Waiting for issue reported to confirm fix from pkg.pr.new build. label Jul 29, 2026
@franky47 franky47 added this to the 🪵 Backlog milestone Jul 29, 2026
@franky47 franky47 added the AI slop PR generated by AI, needs some cleanup before merging label Jul 29, 2026
@franky47
franky47 marked this pull request as ready for review July 29, 2026 19:11
@franky47 franky47 removed pr-waiting-for-feedback Waiting for issue reported to confirm fix from pkg.pr.new build. AI slop PR generated by AI, needs some cleanup before merging labels Jul 29, 2026
@franky47
franky47 merged commit 672e0df into next Jul 29, 2026
39 checks passed
@franky47
franky47 deleted the repro/issue-1506 branch July 29, 2026 20:20
@github-actions github-actions Bot removed this from the 🪵 Backlog milestone Jul 29, 2026
@github-actions

Copy link
Copy Markdown

🚀 This PR is included in nuqs@2.9.3

The release is available on:

pnpm add nuqs@2.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adapters/next/app Uses the Next.js app router adapters/react Uses the React SPA adapter adapters/react-router Uses the React Router adapter adapters/tanstack-router Uses the TanStack Router adapter bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useTransition at the same level as useQueryState briefly reverts to the previous value — known limitation or bug?

1 participant