bump tanstack to fix hydration issue coming from incorrect streaming - #1682
Conversation
506f8e0 to
0b4018d
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
🧰 Additional context used📓 Path-based instructions (2)packages/app-builder/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
packages/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🔇 Additional comments (3)
📝 WalkthroughWalkthroughBumps pinned ChangesTanStack Upgrades and Route Tree Corrections
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
william-schlegel
left a comment
There was a problem hiding this comment.
as always,
the latest version fixes that
Why
/detection/scenarioscrashed during hydration in production (Invariant failed+ React #423) once the list had ≥15 rows. Root cause was upstream in TanStack's streamed SSR: withrouter.options.ssr.nonceset, a nonce'd<script>was injected mid-serialized-value, splitting a string in the dehydration payload →SyntaxError→window.$_TSRnever populated → router throwsInvariant failedon hydrate. Threshold was just where the payload spilled into a second stream chunk; prod-only because dev doesn't stream the document the same way.In practice, the js code contained something like this
:$R[83]=[null]},"019ef9b0-ce<script nonce="8f96db699952488dab05cd61bdd083e4">(function(t){let s;try{with mismatched quotes.Fixed upstream by the ScriptBuffer/streaming rewrite — TanStack/router#7362 (1.171.3) and TanStack/router#7497 "fix: fix streaming" (1.171.7), which prevents mid-tag script injection.
What
Bump the pinned
@tanstack/*router/start set (rootoverrides+ app-builder) to the aligned latest: react-router 1.170.16, react-start 1.168.26, router-core 1.171.13, start-server-core 1.169.15, etc. Type-check + prod build green; verified/detection/scenarioshydrates at 15+ rows.Sources:
Summary by CodeRabbit