Skip to content

Commit ea11f22

Browse files
committed
Merge next into claude/project-thread-x1ore2-4268
Resolves the boundaries.ts conflict with #4277 (#4270): the fallback drop keeps #4277's schedule() for an errored fallback, inside #4282's shared drop helper. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
2 parents d4084b1 + 0856fee commit ea11f22

27 files changed

Lines changed: 1132 additions & 57 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
A derived store's per-key `isPending` now reads `true` while the derive re-asks under a `Loading` boundary that has shown content, when the verdict is read in the same computation as the value (`${state.a} ${isPending(() => state.a)}`). The derive's first flight left a commit-beneath-a-flight mark that its setter landing never cleared, so the next re-ask suspended the verdict reader to the boundary (which kept the stale screen with `isPending` false) instead of serving it the committed value with `isPending` true, as an async memo does. (#4269)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
An error boundary that caught an error rethrown from an inner boundary's fallback now recovers when the inner content does: switching the inner boundary back to its content disposes the fallback that threw, and the outer boundary now drops that error and shows its content again in the same flush, instead of keeping its fallback until some later error re-rendered it (#4270).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"solid-js": patch
3+
---
4+
5+
An `<Errored>` boundary hydrated in the error state the server rendered now recovers. Before, hydration threw the server's error without running the content, so the boundary tracked nothing and stayed on the fallback until `reset()`, even after the failed content's inputs changed. Now the content runs during hydration, reading its server data without refetching but claiming no DOM, while the fallback claims the server's markup. If the content fails on the client, the boundary holds that client error and recovers when the content's inputs change. If the error only happened on the server, the server's fallback and error stay up until `reset()` is called or the content re-runs (#4273).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
A render effect that reads `latest(s)` before an async value that has never shown now holds its mount the same way the reverse read order does: an earlier `latest()` read no longer turns the later unready read into waiting lane work, so a newly mounted branch (for example under `<Show>`) stays unpublished until the value lands instead of appearing with an empty slot (S-39, D-28) (#4275).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/web": patch
3+
---
4+
5+
The focused node keeps focus when the runtime moves it, where the browser has `Element.moveBefore()` (#3997). List reconciliation moves the node that holds `document.activeElement` with `moveBefore()`, so a focused row survives a reorder, and a move into a list that updates before the one it leaves. While focus is in the list, the reconcile's `replaceChild` path inserts instead, leaving the old row in place until the pass places it. Focus is read once per pass, and not at all without `moveBefore()` or with focus on the body; every other node keeps plain `insertBefore()`, so reorders cost the same as before. Browsers without `moveBefore()` behave as before, with no focus restore. Array inserts into an empty slot now go through the same reconcile.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
A derived store (`createProjection` or `createStore(fn)`) over a memo now follows the memo after it has shown a value: when the memo goes pending again, `isPending` on the store's keys reports it, and when the memo later throws, the error reaches the error boundary instead of the store silently keeping its last value. (#4271)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/signals": patch
3+
---
4+
5+
`IMMUTABLE_UPDATE_IN_STORE` no longer reports an array index that now holds an item the array already had, such as the next item shifted down by an in-place `splice` (the repair the diagnostic recommends). Before, if the removed item and its neighbour shared at least half of their leaves, the move was reported as a spread-copy replacement (#4262). A fresh copy assigned to an index is still reported. Production output is unchanged.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/universal": patch
3+
---
4+
5+
A dynamic child region of a universal-renderer element that renders an empty fragment (for example a `<Show>` with `fallback={<></>}`) no longer loses its place among its siblings: the region now keeps its sentinel while empty, so the content that later replaces it is inserted where the region sits instead of being appended after the following siblings (#4274).

‎packages/signals/src/boundaries.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,10 @@ function createBoundary<T>(
704704
const fb = b._fb;
705705
const drop = () => {
706706
if (!b._fallback && b._fb === fb) {
707+
// A fallback that threw (a rethrow the boundary does not
708+
// handle) is what an enclosing boundary waits on: it died, and
709+
// the seam of another round drops it there (#4270).
710+
if (fb!._statusFlags & STATUS_ERROR) schedule();
707711
dispose(fb!);
708712
b._fb = null;
709713
}

‎packages/signals/src/core/async.ts‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
CONFIG_GUESS,
55
CONFIG_OVERRIDE,
66
CONFIG_HELD,
7+
CONFIG_INPUTS_PUBLISHED,
78
CONFIG_STAGED,
89
CONFIG_STAGED_ERROR,
910
CONFIG_SYNC,
@@ -550,8 +551,14 @@ export function handleAsync<T>(
550551
return;
551552
}
552553
// A store derive's landing commits through its setter: unheld, the
553-
// shown error leaves now; held, at the derive's commit.
554-
if (!(el._config & CONFIG_HELD)) el._x!._shownError = undefined;
554+
// shown error leaves now, and so does a commit-beneath-a-flight's
555+
// CONFIG_INPUTS_PUBLISHED (its first flight's, #4269) — left standing,
556+
// a verdict reader of the next flight would suspend instead of being
557+
// served the screen; held, both at the derive's commit.
558+
if (!(el._config & CONFIG_HELD)) {
559+
el._x!._shownError = undefined;
560+
el._config &= ~CONFIG_INPUTS_PUBLISHED;
561+
}
555562
if (wasUninitialized) landStatus(el, true);
556563
// Attribution hook: this path landed through the setter (derived
557564
// stores, projections), which does not go through setSignal, so the
@@ -1026,6 +1033,9 @@ export function propagateStatus(el: Computed<any>, status: number, error: any):
10261033
joinFuture(txOf(sub));
10271034
}
10281035
notifyStatus(sub, status, error);
1036+
// A derived store's derive (store/projection.ts): marked, not re-run —
1037+
// its leaves' readers are not its dependents, so the family walks them.
1038+
(sub as any).fam?.st(status, error);
10291039
}
10301040
});
10311041
}

0 commit comments

Comments
 (0)