Skip to content

fix: recover state after discarded render - #1502

Merged
franky47 merged 6 commits into
nextfrom
repro/issue-1501
Jul 24, 2026
Merged

franky47 merged 6 commits into
nextfrom
repro/issue-1501

Conversation

@franky47

@franky47 franky47 commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

The discarded-render desynchronization reproduces in React SPA, React Router v5 through v8, Remix, TanStack Router, and both Next.js routers. Each environment exercises the same shared fixture with an independent router-state probe and a direct-load control.

The fix retries a render-phase state update when reconciliation refs survive an abandoned render, while preserving the committed-pathname guard. All external-navigation cases and direct-load controls now pass.

Closes #1501.

Locks issue #1501 into React Router v6 E2E coverage before the fix lands.
@franky47 franky47 added bug Something isn't working adapters/react-router Uses the React Router adapter tests Issues & PRs related to test environments (unit, browser, e2e) labels Jul 24, 2026
@vercel

vercel Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nuqs Skipped Skipped Jul 24, 2026 12:39pm

@coderabbitai

coderabbitai Bot commented Jul 24, 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: d40e5d4b-3ecd-4df4-8693-c52500eb6c02

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.

Moves issue #1501 into shared E2E coverage so every supported router exercises the same failure signature and direct-load control.
Keeps the shared issue #1501 spec aligned with existing locator and page assertion conventions.
Retry a lost render-phase state update only on the pathname the hook last committed against.
@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026 •

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

commit: 19745cf

@github-actions

Copy link
Copy Markdown

Bundle size

Base PR Δ
✅ Client 5.55 kB 5.55 kB —
✅ Client (minimal tree-shaken) 4.02 kB 4.04 kB ⬆️ +13 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 changed the title test: reproduce discarded render desync fix: recover state after discarded render Jul 24, 2026
@franky47
franky47 marked this pull request as ready for review July 24, 2026 09:45
@franky47 franky47 added the pr-waiting-for-feedback Waiting for issue reported to confirm fix from pkg.pr.new build. label Jul 24, 2026
@franky47 franky47 added this to the 🪵 Backlog milestone Jul 24, 2026
@franky47 franky47 removed the adapters/react-router Uses the React Router adapter label Jul 24, 2026
@franky47
franky47 merged commit 8debf73 into next Jul 24, 2026
89 of 91 checks passed
@franky47
franky47 deleted the repro/issue-1501 branch July 24, 2026 13:48
@github-actions github-actions Bot removed this from the 🪵 Backlog milestone Jul 24, 2026
@github-actions

Copy link
Copy Markdown

🚀 This PR is included in [email protected]

The release is available on:

This branch was previously deployed

1 inactive deployment
Preview — 19745cfd Deployed Jul 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working pr-waiting-for-feedback Waiting for issue reported to confirm fix from pkg.pr.new build. released tests Issues & PRs related to test environments (unit, browser, e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useQueryState(s) permanently desyncs from the URL after a discarded render

1 participant