Repository navigation
Commit f14ce8d
committed
fix(solid): a fragment failing while parked in a pending fragment goes to the nearest boundary (#4316)
A <Loading> that failed after the shell while its fragment was parked in
an enclosing <Loading> still pending was settled as a blank region that
reported success. The renderer (web/src/server.ts registerFragment)
parks a settled child into its pending parent and resolves its `_fr`
whether or not it failed. Nothing upstream heard of the failure: the
error was routed only to an <Errored> that could draw at exactly that
position (errorOutcome). The client then hydrated the blank region as
success and halted or drew nothing.
Now the failure is the enclosing fragment's content's, as when the same
read fails in that fragment's own render pass. Handlers get an
escalation mode (ESCALATE, server-internal) for a failure that surfaced
after the render passed them:
- A <Loading> whose fragment is still pending fails it, the way a hole
failure in its own pass does.
- An <Errored> whose finished markup sits raw in such a fragment renders
its fallback in place of that markup (FragmentContainer.region): the
fallback is waited for, its error is serialized once it is finished,
and its own failure goes up the same way. An <Errored> still pending
shows the fallback on its next pull, and one already showing its
fallback absorbs the failure.
- A boundary already settled with a failure absorbs it.
- Otherwise the failure goes to the next boundary up.
The enclosing <Loading> applies the regions to its markup before it
settles, outermost first. If a region is not found, or its fallback never
finishes, that fragment fails with the region's error. This replaces the
`escalating` counter from 7ce3c98: an <Errored> fallback that fails
while the server waits for it uses the same mode, so it is drawn one
level up too.
Not covered:
- The late case. If the enclosing fragment settled before the inner read
failed, its markup is already out. The inner fragment rejects on its own
and the client renders it, and the client's <Errored> meets the failure,
unchanged.
- An <Errored> inside a nested fragment that settled into the pending one
first. Its markup is out of the enclosing fragment's own markup, so the
enclosing fragment fails instead of drawing.
Tests: parked shapes with an <Errored> between, around the inner
<Loading> with a failing fallback, and around everything, each against a
twin with no inner <Loading> (the failure met in the enclosing pass). The
server harness holds the stream text to the twin's. The hydrate spec,
loaded and streamed, holds the client outcome to the twin's and checks
that the drawn fallback is claimed. Server specs cover the late case and
a nested fragment that settled first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf21 parent 7ce3c98 commit f14ce8d
25 files changed
Lines changed: 625 additions & 35 deletions
File tree
- .changeset
- packages
- solid/src/server
- web/test
- harness
- __artifacts__
- hydration
- server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
158 | 177 | | |
159 | 178 | | |
160 | 179 | | |
| |||
406 | 425 | | |
407 | 426 | | |
408 | 427 | | |
| 428 | + | |
409 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
410 | 443 | | |
411 | 444 | | |
412 | 445 | | |
| |||
428 | 461 | | |
429 | 462 | | |
430 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
431 | 473 | | |
432 | 474 | | |
433 | 475 | | |
| |||
464 | 506 | | |
465 | 507 | | |
466 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
467 | 547 | | |
468 | 548 | | |
469 | 549 | | |
| |||
561 | 641 | | |
562 | 642 | | |
563 | 643 | | |
| 644 | + | |
564 | 645 | | |
565 | 646 | | |
566 | 647 | | |
| |||
672 | 753 | | |
673 | 754 | | |
674 | 755 | | |
675 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
676 | 760 | | |
677 | 761 | | |
678 | 762 | | |
| |||
683 | 767 | | |
684 | 768 | | |
685 | 769 | | |
686 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
687 | 775 | | |
688 | 776 | | |
689 | 777 | | |
| |||
739 | 827 | | |
740 | 828 | | |
741 | 829 | | |
| 830 | + | |
742 | 831 | | |
743 | 832 | | |
744 | 833 | | |
| |||
750 | 839 | | |
751 | 840 | | |
752 | 841 | | |
| 842 | + | |
753 | 843 | | |
754 | 844 | | |
755 | 845 | | |
756 | 846 | | |
757 | 847 | | |
758 | | - | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
759 | 855 | | |
760 | 856 | | |
761 | 857 | | |
| |||
0 commit comments