Repository navigation
Scope a boundary's children to its pending streamed range - #5360
Merged
Merged
Conversation
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
|
Size Change: +67 B (+0.41%) Total Size: 16.3 kB 📦 View Changed
ℹ️ View Unchanged
|
marvinhagemeister
approved these changes
Nov 17, 2026
MaxwellCohen
added a commit
to MaxwellCohen/pracht-dpu
that referenced
this pull request
Nov 17, 2026
…-to-string PR #496 Fixes /parallel hydration mismatches. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
JoviDeCroock
marked this pull request as ready for review
November 18, 2026 09:22
A range the server is still streaming opens with $s? and holds the fallback, a range it gave up on opens with $s!. When the client rendered the content there, hydration adopted the fallback's elements with their attributes, or elements of a later sibling. The boundary's children now only get that range to adopt from and diff the attributes of what they adopt.
Same behaviour, 24 B gzip less in core. - rangeEnd() notes on the list it collects whether the range holds a fallback, so the resume block and the boundary branch don't each spell out the marker test. - rangeEnd() collects a start node that isn't a comment, so the resume block doesn't branch on the node type. - rangeEnd() collects the closing marker too: the boundary branch takes the list as it is, the resume block pops the marker off. - The boundary branch collects into `tmp`, so there is nothing to reset when it leaves the range alone, and keeps what followed the range without wrapping it in an array.
Removing a prop that maps to a DOM property leaves the attribute empty (`id=""`), so the tests compared against markup they can't get.
JoviDeCroock
force-pushed
the
pending-range-hydration
branch
from
November 18, 2026 12:18
1ceeb74 to
63e1c81
Compare
MaxwellCohen
added a commit
to MaxwellCohen/pracht-dpu
that referenced
this pull request
Nov 18, 2026
- Bump preact to a build of preactjs/preact#5360 head 63e1c81 - Boot the client as soon as #pracht-state is parsed so hydration meets boundaries that are still streaming (opt out with ?late-hydrate) - Add hydration probes and seven edge cases: fallback attributes, next sibling adoption, $s! from a render error and a mid-stream rejection, client-null content, nested pending ranges, and 400 boundaries landing while the client is suspended Co-Authored-By: Claude Opus 5.5
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.
A streamed Suspense range can still hold its fallback when the client hydrates it: the server is still streaming the content (
<!--$s?:id-->), or gave up on it (<!--$s!:id-->). When the client renders the real content there, hydration adopts the fallback's elements and keeps their attributes, or adopts an element of a later sibling, which ends in duplicated ids and dead handlers.A boundary in front of such a range now gives its children only that range to adopt from, and they diff the attributes of what they adopt. Resolved ranges hydrate as before.
Needs the
$s?marker from preactjs/preact-render-to-string#496.