Repository navigation
fix(solid): preserve SSR DOM when hydrating islands - #488
Merged
Brooooooklyn merged 4 commits intoOct 19, 2026
Merged
Conversation
Brooooooklyn
self-requested a review
October 19, 2026 04:26
The client must render the frontmatter provider even when the page has no frontmatter: every createComponent call opens a hydration context, so skipping the provider shifts the island's hydration keys and it never hydrates. Add a production case for that page and say why in the client entry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7219ea39cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Brooooooklyn
approved these changes
Oct 19, 2026
Member
Merge activity
|
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.
The current Solid island implementation calls
render()instead ofhydrate().It clears the server HTML and replaces the DOM, discarding input entered before activation. This PR uses
hydrate()with a matching SSR root for each island instance.What this PR changes
renderId, scope its SSR hydration keys to that root, and store the ID indata-solid-render-id. The existing SSR serializer and Suspense state are retained, and the parent hydration context is restored infinally.FrontmatterContext.Providertree on the server and client, then callhydrate()with the stored ID without clearing the element.The island import syntax and hydration scheduling API are unchanged.
Decisions for review
The implementation accesses Solid 1.x's
sharedConfig.context,sharedConfig.doneandglobalThis._$HY.done. The latter two writes prevent a laterhydrate()from falling back to client rendering after a click in an earlier island. This dependency on Solid's internal hydration state needs review, especially for other asynchronous hydration scenarios. Local verification used Solid 1.9.17.Testing
The pre-fix DOM-reuse regression failed: both the button and input were replaced, and the input value was lost. The new browser suite passes all 6 cases across Vite dev and a production build/preview:
vp run build:all,vp run check,vp lint, and the formatter check for the two changed files passed.The full suite is not green locally: 13,895 passed, 18 failed, 27 skipped. The same 18 failures reproduced after restoring and rebuilding the base adapter at
83799305bbe4and rerunning the three affected test files.Validation commands and existing failures
The failures are in:
packages/void/test/integration/init-install.test.ts: 3 failures.packages/void/test/unit/init.test.ts: 14 failures.packages/void/test/unit/nitro.test.ts: 1 failure.The changed-file selection also completed: 10,598 passed, the same 18 failed, and 27 skipped. Live Cloudflare deployment credentials were unset during both suite runs.
Searched issues and PRs in all states for
solid hydrateandhydration Solid; no matching report or fix was found.AI disclosure
I used OpenAI Codex to implement the fix, write the regression tests, and prepare this PR description. The verification commands above were run locally.