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 8f1d9d2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(solid): an Errored fallback's own failure goes to the next boundary up; its wait is budgeted (#4316, #4317) (#4318)
* fix(solid): an Errored fallback's own failure goes to the next boundary up; its wait is budgeted (#4316, #4317)
#4316: when a <Loading> fails after the shell and its <Errored> renders the
fallback as the outcome (renderOutcome), a fallback hole that rejected
while the server waited for it was swallowed. The retry ran with no owner,
so the hole's error never met a handler and the outcome came back empty.
Parked in a pending outer <Loading>, the inner fragment then settled as a
blank child, and the client hydrated the blank and halted. A fallback that
threw synchronously reached the parent handler instead, but in its
no-consumer mode: an outer <Errored> serialized its error record and
rendered a fallback nobody sent.
Now a failure of the fallback, sync or async, goes to the next boundary
up. The fallback owner's handler holds it while the outcome renders, and
the retry runs under that owner. The parent is first asked for the outcome
at the same position, so an outer <Errored> whose whole content is that
position draws its fallback there and serializes its error with it.
Otherwise the failure is routed as a content failure, so a pending outer
<Loading> fails its fragment. An outer <Errored> reached that way while
it is not being pulled lets it pass and does not render.
#4317: the wait now shares the <Loading> resume loop's convergence budget
(MAX_RESUME_PASSES, internal; hydration.ts uses it in place of the 10000
literal). Past the budget it answers what is available, which is no
finished fallback. It also races each wait against the fallback owner's
teardown, so an aborted render stops waiting at once.
Tests: sync-throw twins for the parked and unparked shapes, with and
without an outer <Errored>. The server harness holds the async variant's
markup to the twin's. The hydrate spec holds its client outcome, loaded
and streamed, to the twin's, and a caught variant must claim the outer
fallback. Server specs cover the budget (a fresh pending source every
pass) and the abort.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
* 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_015hPxMkC3jg3Uivh65gvaf2
* fix(solid): an Errored fallback failing in the shell goes to the enclosing boundary
An `<Errored>` whose fallback failed while rendering (a hole that rejects,
or a synchronous throw) for its content's error was left blank on the
server: the boundary's error handler had already marked the error handled
before rendering the fallback, so the fallback's own failure was dropped
and the pull returned `undefined`. At shell level, with no `<Loading>`,
the shell got a blank region with the errors recorded and no markup for
them; an enclosing `<Errored>` serialized its record but never drew.
The fallback's failure now passes up from the pull: an enclosing
`<Errored>` draws its fallback in place of the region, and with none the
request fails, the same for the async hole and its sync-throw twin.
Server only; client bundles are byte-identical.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
---------
Co-authored-by: Claude <[email protected]>
Server: when an `<Errored>` renders its fallback for a `<Loading>` that failed after the shell, and a hole in that fallback rejects while the server waits for it, the rejection now goes to the next boundary up, as it does when a fallback throws synchronously. Inside a pending outer `<Loading>`, that outer fragment fails; under an outer `<Errored>` whose whole content is that position, the outer fallback is drawn there and the client adopts it. Before, the region streamed blank and the hydrating client halted (#4316). A synchronous throw in that fallback no longer writes an error record for an outer `<Errored>` without sending its fallback.
6
+
7
+
The server's wait for that fallback now stops after the same pass budget as the `<Loading>` resume loop and then streams what it has. It also stops as soon as the render is torn down, for example when the request is aborted (#4317).
An `<Errored>` whose fallback fails while rendering (a hole that rejects, or a synchronous throw) now passes that failure to the enclosing boundary on the server, in the shell as well as in a streamed fragment. An outer `<Errored>` draws its fallback in place of the region, and with none the request fails. Before, the region was sent blank, with the errors recorded and no markup for them.
Server: a `<Loading>` that fails after the shell while its fragment waits inside an outer `<Loading>` that is still pending no longer arrives as a blank region reported as a success. The failure now goes to the nearest enclosing boundary, as it does when the same read fails inside the outer `<Loading>`'s own render. An `<Errored>` between them draws its fallback in the outer fragment, the client adopts it, and its error is serialized with it. With no `<Errored>` between them, the outer fragment fails, and an `<Errored>` whose whole content is that outer `<Loading>` draws its fallback there. This also covers an `<Errored>` fallback that fails in that position. Before, the client hydrated the blank region and either halted or rendered nothing there (#4316).
0 commit comments