Repository navigation
chore: upgrade React Query to 5.90 and keep cancelled streams out of the cache - #3406
Conversation
…the cache Lock @tanstack/react-query at 5.90.21 (query-core 5.90.20) and react-query-devtools at 5.91.3, the versions the EE build already ships, so the two run the same React Query. Since query-core 5.85, a cancelled fetch reverts to its last setQueryData write instead of its pre-fetch state. useStreamingQuery writes partial results with setQueryData, so a stream superseded mid-load stayed cached as a complete result (caught by "does not write a superseded stream into the cache"). It now restores the pre-stream state on abort.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 15e3c74 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor 1 posted as inline comment(s) on the changed lines. 1 listed below. Findings outside the changed lines1 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
[Medium impact] The PR appears safe to merge based on the checked code; no blocking issue was established. SummaryUpgrades React Query and its devtools, and adds an abort listener to restore the cache state captured before a stream writes partial results.
Reviews (2) · Last reviewed commit: "Merge branch 'main' into aaron/react-que..." · Reviewed by Greptile |
Deep ReviewUpgrade of ✅ No critical issues found. 🟡 P2 — recommended
🔵 P3 nitpicks (3)
Reviewers (10): correctness, testing, maintainability, project-standards, agent-native, learnings-researcher, kieran-typescript, julik-frontend-races, reliability, previous-comments. Testing gaps:
Notes: The same-key cancel-then-refetch race flagged by two reviewers was traced against query-core 5.90.20 and found safe — the restore's No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 444 passed • 1 skipped • 1813s
Tests ran across 4 shards in parallel. |
Summary
Downstream uses a newer version of react query, I am backporting it to OSS.
useStreamingQueryrequires a slight alteration to continue intended behavior.References