Skip to content

FPFNFIXAPEX: preserve native Next query state snapshots - #2201

Draft
aidenybai wants to merge 2 commits into
fix/effective-webpack-script-aliasesfrom
fix/next-query-state-snapshot
Draft

aidenybai wants to merge 2 commits into
fix/effective-webpack-script-aliasesfrom
fix/next-query-state-snapshot

Conversation

@aidenybai

@aidenybai aidenybai commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Why

hook-use-state asks for an unused setter when a client component deliberately keeps an initial query snapshot built from an unchanged Next App Router page input. Allow the supported native URLSearchParams builder while retaining advice for other single-value state declarations.

What changed

  • Recognize the exact lazy builder and verify its bindings, page forwarding and complete bounded source graph under the supported Next 16 API contract.
  • Retain diagnostics for alternate callers, provider replacement, unsupported configs, loaders and imports back to the selected component. Keep unrelated sibling declarations checked independently.
  • Refuse per-file cache fingerprints for syntactic candidates before deciding whether the cross-file proof passes. Propagate collector refusal through the existing probe dispatcher.
  • Add synthetic rule tests, a project corpus regression and patch changesets for the published packages.

This is a bounded source proof using ordinary framework and declared dependency API boundaries. It does not interpret arbitrary dependency implementations or prove runtime heap purity. Stacked on #2200.

The review also closes two provider-refusal gaps: constructor access through destructuring in supporting source, and executable JSX script content. Those sources must prevent the initial-snapshot exemption.

Test plan

  • Focused provider controls: 72 passed, including two cases that failed before the repair.
  • All seven packages: 35,658 passing assertion rows, 1,119 skipped. These results combine source-matching continuations after local context failures; this is not a claim that one full test process succeeded. Repeated passing rows were counted once.
  • Typechecks, lint, format, registry, published-dependency checks and JSON schema smoke passed. Fresh build: five successful tasks, no cache hits; all 175 runtime artifacts and five package edges verified.
  • Strict hook-use-state fuzzing: 500 iterations, seed 42; 2,246 executions, 400 target firings, no findings.
  • Deduplication checks passed. Normal hooks used the candidate’s own built CLI and passed without a staged warning. All five natural checks/statuses passed on the pushed repair.

This PR remains draft while the updated ancestor fixes are integrated and performance profiles and remote parity are completed. Local functional checks do not establish full-corpus parity or performance clearance.

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@2201
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@2201
npm i https://pkg.pr.new/react-doctor@2201

commit: ed90064

This branch has not been deployed

No deployments
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