Skip to content

Commit 0d540e5

Browse files
committed
fix: address review findings
The pullFamily comment block keeps its original lines, with one line on the staged-error pull in place of the three that narrated the issue. The web spec's header keeps only the jsxImportSource and vitest-environment pragmas, as the neighbouring specs do. The changeset states the behavior that changed in two sentences.
1 parent b9d03b4 commit 0d540e5

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

‎.changeset/projection-staged-error-reader-link-4517.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@solidjs/signals": patch
33
---
44

5-
A reader of a derived store whose derive carries a staged error (D-41) now observes the derive, as a reader of a pending or errored one does (#4517). The pull threw the staged error before any leaf was read, so the reader subscribed to nothing in the family: when the derive's source re-asked and landed, neither the wake nor the settle reached it, and an `<Errored>` mounted in the change that errored its content stayed on its fallback over a keyed `createProjection`. The reader now links to the derive and re-runs at the landing, so the answer replaces the error.
5+
A reader of a derived store whose derive carries a staged error (D-41) now links to the derive, as a reader of a pending or errored one does, so it re-runs when the derive's source answers. An `<Errored>` mounted in the change that errored its content over a keyed `createProjection` showed its fallback for good; it now shows the answer.

‎packages/signals/src/store/store.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,9 +1844,8 @@ function pullFamily(target: StoreTarget): void {
18441844
// flight up (or errored): the reader observes the flight exactly as a
18451845
// reader of a memo would — linked, so it re-runs at the landing (the
18461846
// next settled pass pulls without linking and the stale link trims), a
1847-
// verdict reader registered, a tracked pass suspended. A derive carrying a
1848-
// staged error (`stageMark`) the same: the pull throws it before any leaf
1849-
// is read, and only the link lets the reader learn of the answer (#4517).
1847+
// verdict reader registered, a tracked pass suspended.
1848+
// A staged error (D-41) throws at the pull, before any leaf would link the reader.
18501849
if (fw._statusFlags & (STATUS_PENDING | STATUS_ERROR) || fw._config & CONFIG_STAGED_ERROR) {
18511850
// A render effect outside the flight's own flush is the frame, not a
18521851
// derivation: it keeps what it shows and learns of the landing from the

‎packages/web/test/errored-born-staged-error-projection-4517.spec.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/**
22
* @jsxImportSource @solidjs/web
33
* @vitest-environment jsdom
4-
*
5-
* #4517: an <Errored> mounted in the change that errors its content, over a
6-
* keyed projection of a memo, shows the memo's next answer.
74
*/
85
import { expect, test } from "vitest";
96
import { render } from "../src/index.js";

0 commit comments

Comments
 (0)