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 077432b
Browse filesBrowse the repository at this point in the historyBrowse files
An `<Errored>` recovery re-arms its subtree: every `<Loading>` under an error fallback counts as not shown, so on recovery it catches what is still pending in the replacement frame and shows its fallback beside the recovered content, instead of the error staying up until the nested content is ready (#4627).
Copy file name to clipboardExpand all lines: packages/signals/docs/RULES-DERIVED.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,9 +340,9 @@ The optimistic world is the screen plus the action's guesses: derivations of a g
340
340
341
341
**From:** F-12, F-3, F-1. **Scenarios:** S-38.
342
342
343
-
An `<Errored>` flipping to its fallback is a boundary going back to its fallback: the nodes behind it stop holding (unless read elsewhere, where they error too), and non-errored nodes that lose their only visible consumer that way stop holding as well. The error stays on screen until a new answer replaces the errored one — a pending is not a value: over `Errored > Loading(never shown)`, a write publishes beside the old error (`0 | Fetch error for 0` → `1 | Fetch error for 0` → `1 | Fetch error for 1`); the inner fallback is hidden behind the error. `Errored` builds its function fallback in its own scope, like `Show`, once per show: a re-derive of the boundary while the fallback shows — a second reader caught, the same error propagated again, a retry pending after `reset()`, a later error — keeps the built fallback, its DOM and focus with it; a later error reaches it through the error accessor; the fallback is disposed once the content that replaces it is on screen — at the commit, when the swap is held (#3991). A fallback that no live reader holds heals: the boundary waits on what threw only while a reader that caught the error is alive, so when the last one is disposed (a `<Show when={isPending(m)}>` closing over `m()` as the action that made `m` throw settles) the content shows again — what a fresh render with the same inputs shows, since nothing on it reads the error (ruled 2026-10-28, #4373).
343
+
An `<Errored>` flipping to its fallback is a boundary going back to its fallback: the nodes behind it stop holding (unless read elsewhere, where they error too), and non-errored nodes that lose their only visible consumer that way stop holding as well. The error stays on screen until a new answer replaces the errored one — a pending is not a value: over `Errored > Loading(never shown)`, a write publishes beside the old error (`0 | Fetch error for 0` → `1 | Fetch error for 0` → `1 | Fetch error for 1`); the inner fallback is hidden behind the error. While the fallback shows, nothing under it is on screen, so its recovery re-arms the whole subtree (ruled 2026-11-02, #4627, re-ruling async-gen 91501 #1831): every `<Loading>` under it has not shown content — whether or not it showed content before the error — and once the errored source has its new answer, each catches what is still pending in the replacement frame and shows its fallback beside the recovered content, as on a first load (F-4, D-12): `[Crash][finding related]`. After the recovery the ordinary rules apply: the first content such a `<Loading>` shows makes it a shown boundary, and a later re-ask keeps that content (F-5). The error stays up while something no inner `<Loading>` catches still waits: the errored source's own re-ask (the write above), a pending read directly under the `<Errored>` with no `<Loading>` between (a pending is not a value; #4592), or a recovery that is part of a held write, action or transition, which reveals with that hold (D-41). `Errored` builds its function fallback in its own scope, like `Show`, once per show: a re-derive of the boundary while the fallback shows — a second reader caught, the same error propagated again, a retry pending after `reset()`, a later error — keeps the built fallback, its DOM and focus with it; a later error reaches it through the error accessor; the fallback is disposed once the content that replaces it is on screen — at the commit, when the swap is held (#3991). A fallback that no live reader holds heals: the boundary waits on what threw only while a reader that caught the error is alive, so when the last one is disposed (a `<Show when={isPending(m)}>` closing over `m()` as the action that made `m` throw settles) the content shows again — what a fresh render with the same inputs shows, since nothing on it reads the error (ruled 2026-10-28, #4373).
344
344
345
-
**Collapses:** §23.1 items 2–3, §27 7b (2026-10-02; the top-level `isPending(count)` affordance was lost by this ruling, knowingly), recovery 9.1–9.3. **Status:** standing. Once per show: `tests/createErrorBoundary.test.ts` ("instantiates the fallback once per show"), `packages/web/test/errored-show-retry-3991.spec.tsx`; the held swap: `tests/boundary-fallback-held-swap-3991.test.ts`; healing when the last reader is disposed: `tests/errored-heal-disposed-reader-4373.test.ts`, `packages/web/test/errored-heal-disposed-reader-4373.spec.tsx`.
345
+
**Collapses:** §23.1 items 2–3, §27 7b (2026-10-02; the top-level `isPending(count)` affordance was lost by this ruling, knowingly), recovery 9.1–9.3. **Status:** standing. The recovery re-arm (#4627): `tests/errored-recovery-fresh-loading-4627.test.ts`, `tests/latest-memo-inline-parity.test.ts` (#1831 rows), `packages/web/test/errored-recovery-nested-loading-4425.spec.tsx`, `tests/derived-store-recovery-wake.test.ts` (the store twin, plain and held in an action), the "inside Loading" rows of `tests/errored-recovery-stale-memo-4592.test.ts` and `packages/web/test/errored-recovery-stale-memo-4592.spec.tsx` (their no-boundary rows keep the error: a pending is not a value). A recovery written in an action's tick is the action's and keeps the error up until its hold reveals the inner fallback: the last row of `tests/errored-recovery-fresh-loading-4627.test.ts`, `packages/web/test/async-gen/e1-3289-122.spec.ts` (async-gen 3289 #122). Once per show: `tests/createErrorBoundary.test.ts` ("instantiates the fallback once per show"), `packages/web/test/errored-show-retry-3991.spec.tsx`; the held swap: `tests/boundary-fallback-held-swap-3991.test.ts`; healing when the last reader is disposed: `tests/errored-heal-disposed-reader-4373.test.ts`, `packages/web/test/errored-heal-disposed-reader-4373.spec.tsx`.
Copy file name to clipboardExpand all lines: packages/signals/docs/RULES-FUNDAMENTALS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ These are the only words the fundamentals use. Internal names (transaction, stag
72
72
73
73
## F-5. A disarmed boundary forwards: it keeps its content and holds like any reader, until `on` arms it again
74
74
75
-
**Immutable.** Once a `<Loading>` has shown content it is disarmed: a later refetch or hold does not send it back to its fallback — it keeps the content, and the pending render effects under it are forwarded into the change's hold exactly as if they were read in the open (F-2). The only way back is `on` — a dependency list: a change to anything `on` reads arms the boundary again (F-4), so the render effects under it leave the hold they were forwarded into and the boundary shows its fallback, with the change's frame, until the new content is ready; if nothing under it is pending, nothing happens. The value `on` returns is never compared, and the children are not re-created — they stay alive behind the fallback. A lane is that same hold: the async under a disarmed boundary is forwarded into it, so a display-ahead value and the content move together, exactly as they would with no boundary there.
75
+
**Immutable.** Once a `<Loading>` has shown content it is disarmed: a later refetch or hold does not send it back to its fallback — it keeps the content, and the pending render effects under it are forwarded into the change's hold exactly as if they were read in the open (F-2). The only way back is `on` — a dependency list: a change to anything `on` reads arms the boundary again (F-4), so the render effects under it leave the hold they were forwarded into and the boundary shows its fallback, with the change's frame, until the new content is ready; if nothing under it is pending, nothing happens. One exception (D-39): behind a shown error fallback nothing is on screen, so a `<Loading>` there has not shown content — the error boundary's recovery re-arms it, and it catches what is still pending in the replacement frame as on a first load (ruled 2026-11-02, #4627). The value `on` returns is never compared, and the children are not re-created — they stay alive behind the fallback. A lane is that same hold: the async under a disarmed boundary is forwarded into it, so a display-ahead value and the content move together, exactly as they would with no boundary there.
76
76
77
77
**What it does not say.** It does not say the fallback of a re-arm appears _ahead_ of the change that caused it (F-7: it lands with that change's frame). It does not say a re-arm paints its fallback while its frame waits on the same data read outside the boundary. The boundary is armed; the screen stays on the old content until that hold lifts (D-16).
Copy file name to clipboardExpand all lines: packages/signals/docs/SCENARIOS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -909,6 +909,8 @@ const data = createMemo(() => fetchOrFail(count())); // rejects for every co
909
909
910
910
`<Errored>` never catches a pending: `ASYNC_OUTSIDE_LOADING_BOUNDARY` is a warning (A6).
911
911
912
+
Row 1 holds because the errored source itself re-asks. Once it has its new answer, the recovery re-arms the subtree (#4627): the inner `<Loading>`, never shown — or shown before the error — catches what is still pending in the replacement frame, and its fallback shows beside the recovered content. A pending read directly under the `<Errored>` with no `<Loading>` between still keeps the error up, and a recovery held with an action reveals with it (D-41).
913
+
912
914
### S-42. A held rejection reveals with its frame — D-41 (#3886)
0 commit comments