Repository navigation
Commit f5cf675
fix(solid): an Errored around a failing streamed Loading draws its fallback on the server (#4303)
* fix(solid,web): draw an Errored fallback for a Loading's async failure, and adopt it (#4287)
Outside a server component, a <Loading> whose async read failed during a
streamed render settled its fragment blank, and the hydrating client
rendered the failed boundary from scratch: it asked again and showed the
loading fallback.
Server: the failing <Loading> now asks the enclosing <Errored> for its
outcome outside server components too, passing its own id. The Errored
answers only when that Loading is all of its content (its resolved markup
is the Loading's placeholder): its fallback is drawn into the fragment, or
inlined pre-flush, and the error is serialized at the Errored id. Deeper
in the content it answers nothing, as before. A rejected fragment's
template is marked `e`, and `$dfr` records the nodes it swaps in for it.
Client: inside a hydrated Errored's no-claim content run, a <Loading>
runs its content with its data adopted instead of waiting on its
fragment, so the Errored holds the client's own error and tracks the
content's inputs (#4273). A boundary that claimed its fallback and then
renders a rejected fragment fresh clears the nodes the swap put in first,
so nothing of the server's outcome is left beside the client's render.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
* fix(solid): serialize an Errored's error only when its fallback markup is sent
When a streamed <Loading> fails after the shell and asks the enclosing
<Errored> for its outcome, the fallback may hold an async hole that has
not resolved yet. renderOutcome then returns no markup (the fragment
settles as a plain rejection), but handleError had already serialized
the error at the Errored id. A client hydrating after the failure read
that record, claimed a fallback that was never sent, and went blank
with a hydration key miss.
The outcome path now defers the record and writes it only once the
fallback resolved to finished markup. Without it the client renders the
failure itself, as on `next`. Server-only; no client bytes.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018LY7F9czoRqdMEvk2QwPr1
---------
Co-authored-by: Claude <[email protected]>1 parent ee94440 commit f5cf675
71 files changed
Lines changed: 554 additions & 157 deletions
File tree
- .changeset
- documentation/solid-2.0
- packages
- solid
- src
- client
- server
- test/server
- web
- src
- test
- harness
- __artifacts__
- hydration
- server
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
| |||
1293 | 1296 | | |
1294 | 1297 | | |
1295 | 1298 | | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
| 1299 | + | |
1299 | 1300 | | |
1300 | 1301 | | |
1301 | 1302 | | |
| |||
2859 | 2860 | | |
2860 | 2861 | | |
2861 | 2862 | | |
2862 | | - | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
2863 | 2875 | | |
2864 | 2876 | | |
2865 | 2877 | | |
| |||
2892 | 2904 | | |
2893 | 2905 | | |
2894 | 2906 | | |
2895 | | - | |
2896 | | - | |
2897 | | - | |
2898 | | - | |
2899 | | - | |
2900 | | - | |
2901 | | - | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
2902 | 2910 | | |
2903 | 2911 | | |
2904 | 2912 | | |
| |||
2920 | 2928 | | |
2921 | 2929 | | |
2922 | 2930 | | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
2923 | 2937 | | |
2924 | 2938 | | |
2925 | 2939 | | |
| |||
2934 | 2948 | | |
2935 | 2949 | | |
2936 | 2950 | | |
2937 | | - | |
2938 | | - | |
2939 | | - | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
2940 | 2958 | | |
2941 | 2959 | | |
2942 | 2960 | | |
2943 | 2961 | | |
2944 | | - | |
2945 | | - | |
2946 | | - | |
2947 | | - | |
2948 | | - | |
| 2962 | + | |
2949 | 2963 | | |
2950 | 2964 | | |
2951 | 2965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
| |||
375 | 379 | | |
376 | 380 | | |
377 | 381 | | |
378 | | - | |
379 | | - | |
| 382 | + | |
| 383 | + | |
380 | 384 | | |
381 | | - | |
| 385 | + | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
| |||
412 | 416 | | |
413 | 417 | | |
414 | 418 | | |
415 | | - | |
| 419 | + | |
416 | 420 | | |
417 | 421 | | |
418 | 422 | | |
| |||
0 commit comments