You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Solid 2 whole-document streamed SSR, a <Loading> boundary can append duplicate resolved content after a Solid Refresh HMR update instead of replacing the previous content.
The page initially renders Hello World2. After reloading once and making repeated text-only edits inside the boundary, the DOM can end up containing output such as:
Hello World2Hello World2333
The duplication only appears after a full page reload followed by HMR. A cold first navigation does not reliably reproduce it, which suggests the cached async client entry allows hydration to begin against the streamed fallback before the server reveal arrives.
This looks related to #2801 bug 1, but that regression coverage exercises a reactive refresh after streamed hydration rather than a component replacement through Solid Refresh HMR.
Open http://localhost:3000 in Chrome and wait for Hello World2 to resolve.
Reload the page once and wait for Hello World2 again.
In src/App.tsx, change the boundary child from {asyncValue()} to {asyncValue()}111 and save.
Wait for the HMR-triggered async operation to settle.
Change 111 to 222, save, and wait for it to settle.
Repeat with 333 if needed.
Observe that resolved values can accumulate instead of replacing the previous DOM.
The artificial one-second delay in the server function makes the boundary transitions visible and deterministic enough to trigger the issue.
Expected behavior
After each HMR update, the boundary should contain exactly one resolved value plus the latest edited text. Previous resolved DOM should be removed rather than retained as a duplicate.
Screenshots or Videos
None yet.
Platform
OS: macOS
Browser: Chrome
Version: unknown
Additional context
The SSR output uses renderToStream and passes virtual:solid-manifest.
The client hydrates the whole document.
The browser entry is emitted as an async module script, matching the vite-plugin-solid SSR example.
Server hydration keys and loading-boundary IDs are stable across repeated HTTP requests.
A client-only simulation of the installed Solid Refresh runtime replaces the boundary correctly; hydration is required for the duplicate.
Describe the bug
With Solid 2 whole-document streamed SSR, a
<Loading>boundary can append duplicate resolved content after a Solid Refresh HMR update instead of replacing the previous content.The page initially renders
Hello World2. After reloading once and making repeated text-only edits inside the boundary, the DOM can end up containing output such as:The duplication only appears after a full page reload followed by HMR. A cold first navigation does not reliably reproduce it, which suggests the cached async client entry allows hydration to begin against the streamed fallback before the server reveal arrives.
This looks related to #2801 bug 1, but that regression coverage exercises a reactive refresh after streamed hydration rather than a component replacement through Solid Refresh HMR.
Your Example Website or App
https://github.com/brenelz/solid-2/tree/b8c94efa
Relevant files:
src/App.tsxsrc/entry-server.tsxsrc/entry-client.tsxsrc/HtmlDocument.tsxVersions are pinned in the reproduction:
solid-js@2.0.0-beta.20@solidjs/web@2.0.0-beta.20vite-plugin-solid@3.0.0-next.13vite@8.0.10nitro@3.0.260610-betaSteps to Reproduce the Bug or Issue
b8c94efa.pnpm install.pnpm dev.http://localhost:3000in Chrome and wait forHello World2to resolve.Hello World2again.src/App.tsx, change the boundary child from{asyncValue()}to{asyncValue()}111and save.111to222, save, and wait for it to settle.333if needed.The artificial one-second delay in the server function makes the boundary transitions visible and deterministic enough to trigger the issue.
Expected behavior
After each HMR update, the boundary should contain exactly one resolved value plus the latest edited text. Previous resolved DOM should be removed rather than retained as a duplicate.
Screenshots or Videos
None yet.
Platform
Additional context
renderToStreamand passesvirtual:solid-manifest.document.vite-plugin-solidSSR example.beta.20, which includes the original 2.0.0-beta.15 Many hydration bugs #2801 fixes.