Skip to content

Ensure we return a full document#446

Merged
JoviDeCroock merged 4 commits intomainfrom
chunked-rendering-fixes
Feb 20, 2026
Merged

Ensure we return a full document#446
JoviDeCroock merged 4 commits intomainfrom
chunked-rendering-fixes

Conversation

@JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Feb 19, 2026

Resolves #415

I think we're not complete yet, the client-script can still bug out and we'll need to adjust

Reproduction in https://github.com/jplhomer/preact-react-router - fixes in action at https://github.com/JoviDeCroock/preact-react-router

Technically we also need preactjs/preact#5028 but we can solve that by introducing a faux-node when hydrating by means of { nodeType: 1, childNodes: [document.documentElement], firstChild: document.documentElement }

@changeset-bot
Copy link

changeset-bot bot commented Feb 19, 2026

🦋 Changeset detected

Latest commit: b7b288c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-render-to-string Patch

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

@marvinhagemeister
Copy link
Member

nit, changeset is missing

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with changeset added

@rschristian
Copy link
Member

Depending on your definition of "full document", we're still missing the preamble as mentioned here. User will be dropped into quirks mode with our current setup which feels wrong.

@JoviDeCroock
Copy link
Member Author

@rschristian good point, will add that

@JoviDeCroock JoviDeCroock force-pushed the chunked-rendering-fixes branch from 1763ae1 to b7b288c Compare February 20, 2026 06:16
@JoviDeCroock JoviDeCroock merged commit e5dbe50 into main Feb 20, 2026
1 check passed
@JoviDeCroock JoviDeCroock deleted the chunked-rendering-fixes branch February 20, 2026 06:25
@github-actions github-actions bot mentioned this pull request Feb 20, 2026
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.

Stream renderer(s) can close parent elements of suspended nodes early

3 participants