Repository navigation
fix: preserve streamed root signal namespaces during hydration - #1222
Merged
domgan-oai merged 1 commit intoSep 21, 2026
Merged
domgan-oai merged 1 commit into
domgan-oai merged 1 commit into
Conversation
domgan-oai
marked this pull request as ready for review
September 21, 2026 19:33
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root queries consumed directly inside a streamed
@trynow join their server result stream during hydration. Both completed-arm and pending-template adoption retain the inherited signal namespace while keeping their DOM ID prefix and counter.Fixes #1220.
Validation
tsrx-tsctypechecking.pnpm sync.Fast 2, and produce zero compile/browser/SSR diagnostics. All six also pass with production browser runtime branches enabled.Full local
pnpm test, repo-wide formatting, and repo-wide typechecking were not run; CI covers the wider repository.Risk / follow-ups
Two shared-reference assignments are added only when adopting streamed Suspense arm ID state. Fresh/recovery namespaces and streamed identity validation keep their existing behavior. No compiler or server source changes. Against the issue's original
37b756e78baseline, paired reproduction SSR output is byte-identical and the development browser bundle grows by 109 raw bytes / 15 gzip bytes / 35 Brotli bytes. No hydration latency, paint, or GC performance claim is made.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches hydration ID/signal namespace wiring for streamed Suspense arms; scope is narrow (two field copies) but incorrect matching could still cause duplicate fetches or hydration issues.
Overview
Streamed Suspense hydration now keeps the parent’s
signalStatewhen arms get a boundary-scoped DOM ID prefix, so rootquery$streams can attach to server results instead of spinning up duplicate browser producers.The runtime change is two assignments in
runtime.tswhen buildingidStatefor streamed boundaries; DOMprefix/nextbehavior is unchanged. A changeset, fixture, and hydration tests cover completed and still-pending root queries (streamed/buffered delivery, nested boundaries, optional ID prefixes), including adopted DOM, preserved inputs, and no hydration diagnostics.Reviewed by Cursor Bugbot for commit f4518b4. Bugbot is set up for automated code reviews on this repo. Configure here.