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
{{ message }}
Repository navigation
Commit ce8e46b
Browse filesBrowse the repository at this point in the historyBrowse files
feat(solid): SSR flushes commit #0 — loadingValue/seedLoadingValue render on the server and hydrate as the claimed value, replacing the interim hydration strip. The server never suspends a loading-value source: processResult serves the loading value instead of NotReadyError on every async path (thenable, iterator, hybrid, NotReady-retry from an unready sync dep, ssrSource "client"), the boundary never trips, markup flushes from commit #0, and the landing streams as data through the existing serialization channel. The first-value lock generalizes to commit #0: on serialized paths the HTML-visible value never advances past the loading value (settle callbacks skip the comp.value write; projections mark the pending proxy ready immediately, retargeted at a frozen seed copy, and the V1 freeze skips retargeting), so later-rendered holes in the same response can't tear against already-flushed placeholder markup — landings live in the data channel, exactly as later iterator yields always have. One deliberate exception to "sync results are never serialized": a sync landing after a NotReady retry ships as a resolved promise, because placeholder markup is already on the wire and the client can't re-derive its way out of DOM claimed against commit #0. createSignal's server fn-form forwards loadingValue (it previously dropped everything but deferStream/ssrSource); ServerSsrOptions gains seedLoadingValue and createProjection applies it across all four async branches. Client side, the strip (stripLoadingValue) is deleted: hydrating nodes are born committed with the loading value so the claim matches the placeholder markup by construction — and readHydratedValue gains the inverse guard the loaded replay exposed: a settled serialized landing (s===1 stamped ref) must NOT unwrap synchronously for a loading-window node, or the client computes real-data structure during the claim walk against placeholder DOM and corrupts it (the exact mirror of the pre-strip streamed failure). It hands the async runtime a clean thenable instead — commit #0 serves through the synchronous walk, the landing applies on the following microtask, the acknowledged loaded-mode tradeoff. Parity scenarios flip from pinning the strip to pinning the design: shells now assert placeholder markup (skeltail/emptyend), settled text asserts the landing, and the update pass pins post-hydration refetch. Verified: signals 1225/1225, solid-js turbo 26/27 tasks — the one failure is solid-web's pre-existing retry-robustness timeout, reproduced identically on clean next; hydrate parity 65/65 both modes.
SSR support for `loadingValue` / `seedLoadingValue` — the server flushes commit #0 and the client hydrates with it. A loading-value memo (or seeded derived store) never suspends on the server: markup renders from the loading value (the boundary never trips), the landing streams to the client as data, and the hydrating node is born committed with the same loading value, so the claim walk matches the server markup by construction; the serialized landing then closes the window on both sides right after hydration. The first-value lock generalizes to commit #0: HTML-visible reads stay at the loading value for the whole response (later renders in the same stream can't tear against already-flushed placeholder markup), and every landing after the placeholder flushed ships as data — including synchronous landings after a NotReady retry, the one exception to "sync results are never serialized". On the client, a settled serialized landing is handed to the async runtime as a thenable instead of unwrapping synchronously, so commit #0 also serves through the claim walk when the response was fully loaded before hydration began. `ssrSource: "client"` sources flush the loading value too, matching the prev-serving hydration wrapper on the client.
0 commit comments