Skip to content

Commit 5f22701

Browse files
ryansolidclaude
andauthored
fix(signals): latest() read inline and through a memo show the same screen (#4401)
* fix(signals): latest() read inline and through a memo show the same screen - #4284 through a memo: a render effect a verdict memo's change re-runs reads as that pass's verdict reader (`laneDirty`), so `${x()} ${derived()} / ${L()}` tears to `1 x1 / 5` beside a lane held on downstream async, as the inline read does. - A plain write beside an async memo: a pass that read the frame's staging before the frame had a transaction re-derives once as a verdict reader if the frame parks (`provisionalVerdict` watch, `laneSeams`), so `[s(), latest(s)]` shows `v:0 l:1` as `[latest(s), s()]` does; a flush that commits runs it once. - C4: the committed frame's [s(), latest(s)] effect beside one a held pass created tears during the hold inline too: a verdict lane born at the park seam (its zombie verdict readers' work) is judged at that seam, and a reader born into the frame is not re-derived there (#4010). - latest() of a derivation's first load in flight in a verdict lane is loading (D-22), and a lane's dissolution no longer commits such a load as `undefined` (async-gen seed 3289 #464, #929). Size-Exception: size golfing waived by the maintainer (2026-10-29); the frozen live-server floor's recorded minified moves 115,217 -> 115,374 B. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a pass born in a staged reader stays the frame's on a verdict memo read (C4, #4010) C4 follows #4010 (ruling A): a render effect a held pass creates was born into the frame, has no screen, and reads its transaction's values, inline or through a verdict memo. A verdict-memo read by a pass whose creator chain read the staging or joined the hold no longer breaks it out into the verdict lane, where the seam re-derived it on the screen. The `creatorReads` helper and the `enterLane` hunk are byte-identical to #4394's, so the two merge cleanly (the lanes.ts import line aside). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a first load in flight stays loading through an identity memo, a derived store and isPending - E2/E3 (async-gen seed 91501 #504): a lane's dissolution no longer commits an empty `_value` for a first load the lane produced nothing for whose own flight is up (now whether or not its inputs were published), nor for a node pending on such a load (an identity memo of it, a derived store's derive). `latest()` of the identity memo or the store's key is loading, as the direct read is (D-22). - #156: `isPending()` of a first load in flight in a verdict lane is loading (A19 exc. 1), as `latest()` of it is; the boundary keeps its fallback instead of revealing a leaf whose effect then throws. A re-ask of a load an error answered first stays pending (D-41, #4375). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * chore(size): fold the dissolve guard into one expression and re-record this PR's size The first-load guard in dissolveLane reads as one conditional; the five grown scenarios' recorded minified and their ledger lines now carry the whole PR (C4, the identity-memo and derived-store first loads, #156). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a plain write beside latest() runs once; an error stays the display while the memo it came through re-asks - provisionalVerdict watches a `latest` reader only for a staged read made before the frame had a transaction; one made in an action's world stays the frame's (#4394's E9 pin). The lane seam judges a watched pass no transaction holds (an effect) by the frame's transaction: it re-derives only if the frame parks, so a plain sync write computes once. - An error boundary keeps a reader that is pending again after the source that threw answered (D-39: a pending is not a value), so a grouped and a split leaf show the same screen through the re-ask (async-gen 91501 #1831). - recompute's CONFIG_VERDICT clear sits behind the lane engine, the only build that sets it, so the floors drop instead of growing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * chore(size): re-record this PR's size over next @ 7ebd4a3; cite D-22 in the runs-once pin The five grown scenarios' recorded minified move to the merge's measure (+240 to +252 B minified over next; every floor -21 B). The Size-Exception cites the maintainer's "only flag me if brotli goes more than 20kb" (2026-10-29). The runs-once pin cites D-22 (a staging not yet held is the frame's read; one re-derive only if the flush parks) and F-10. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * chore(changeset): note the identity/store first loads, the one-compute plain write and the Errored re-ask Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * test(web): pass a string title in the latest() parity spec so test-types passes Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a memo of latest() computes once on a plain write; a Loading fallback behind an error keeps the error up - A transaction only a `latest()` read opened holds nothing: a verdict reader's plain read of a staging in it, from the frame's seat, is the frame's read, watched by the seam, which re-derives it once only if the flush parks (D-22, F-10). So `[s(), L()]` with `L = createMemo(() => latest(s))` computes once per write, as the inline form does (F-6), and the inline form beside such a memo does too. Lane work still sees the screen (D-37). - A Loading boundary catching under an error boundary that shows its fallback records the reader on the error boundary too: the inner fallback is hidden behind the error, which stays until the re-ask answers (D-39) — a body read now shows `[E]` like an effect read. - Pins: runs-once over inline, memo, inline beside a memo, latest(memo) × memo, render effect, user effect (two writes); JSX inline/memo × attributes/template; the D-39 body read. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): a pass with no value yet reads the screen in a latest()-only transaction; latestOpened clears on a real join - stagedScreen's frame-read branch (D-22) skips a pass with no value yet: its first answer is nobody's hold (D-6) and would commit the staging whether or not the frame parks. It reads the screen and runs again at the landing, as before. Async-gen seed 3289 #1831: a grouped leaf ended on [ROOT-E] where the split one, and next, show [F] (F-1, F-12). The minimized case and the generated one (default, grouped, split, latest-through-a-memo) are pinned. - latestOpened clears when anything else joins the flush's transaction (joinFuture) and when the flush ends. - caught()'s walk to an error fallback above a Loading is one loop with no type test outside it (-20 B on the boundary bundles). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 * fix(signals): latestOpened clears only at flush end, not on a real join Clearing the `latest()`-only record in `joinFuture` let a memo of `latest()` end on a stuck `[ROOT-E]` where the inline read shows content (async-gen 91501 #1158, E9). The two forms must show the same screen (F-6), so the record now clears only when the flush ends; a verdict reader's plain read of a staging in that transaction stays the frame's read (D-22), not lane work (D-37) and not a pass with no value yet (D-6). Pins #1158's E9 form in packages/web/test/async-gen/e9-91501-1158.spec.ts (fails on 9efb987). Ledger lines and the live-server floor follow the -8 B minified. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2 --------- Co-authored-by: Claude <[email protected]>
1 parent 24adaff commit 5f22701

15 files changed

Lines changed: 1095 additions & 95 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+
`latest(x)` read inline and the same read through a memo (`createMemo(() => latest(x))`) show the same screen. A render effect re-run by a verdict memo's change now tears beside a held optimistic lane through the memo as it does inline (`1 x1 / 5`, #4284). A plain write beside an async memo shows the screen beside the proposal (`v:0 l:1`) in either read order and either form. The committed frame's effect beside one a held pass created tears during the hold inline as through a memo. `latest()` of an async derivation's first load still in flight in a verdict lane is loading, never `undefined`, including after the lane dissolves. The same holds through an identity memo or a derived store, and `isPending()` of such a load is loading too. A plain synchronous write beside `latest()` computes once. An `<Errored>` keeps its error on screen while the async memo the error came through re-asks after the source that threw recovers, instead of revealing content whose holes are still loading.

‎packages/signals/docs/RULES-INDEX.md‎

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

‎packages/signals/src/boundaries.ts‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ function record(b: Boundary, node: Computed<any>, source = node): void {
184184
function caught(b: Boundary, node: Computed<any>, error: unknown, source = node): void {
185185
if (b._type === STATUS_ERROR) {
186186
// An error boundary waits on what THREW (`StatusError.source`), not on
187-
// the reader that saw it: the reader recovers the moment a refetch
188-
// starts (its boundary catches the pending), while the error is settled
189-
// only when its source is neither errored nor in flight — or when the
187+
// the reader that saw it, while the error is settled only when its
188+
// source is neither errored nor in flight and the reader is not pending
189+
// on the answer that replaces it (`prune`) — or when the
190190
// reader is disposed: a source no live reader holds holds nothing
191191
// (#4373). A source that died (a memo its reader owned, kept past the
192192
// pass that disposed it) settles nothing: the reader is waited on.
@@ -199,6 +199,13 @@ function caught(b: Boundary, node: Computed<any>, error: unknown, source = node)
199199
reportClientError(caught, b._owner, source);
200200
}
201201
record(b, node, source);
202+
// A loading fallback behind an error fallback is hidden: the error stays
203+
// the display until what the fallback waits on answers (D-39) — the
204+
// error boundary waits on it too.
205+
// (`_type`: STATUS_PENDING 1 < STATUS_ERROR 2 — an error boundary above a
206+
// loading one.)
207+
for (let p: Boundary | null = b; (p = p._parent); )
208+
if (p._fallback && p._type > b._type) record(p, node);
202209
if (b._armed) flip(b);
203210
// Already showing the fallback: one more reader to wait on changes
204211
// nothing on screen. The fallback is instantiated once per show — a later
@@ -327,7 +334,11 @@ function release(b: Boundary): void {
327334
* content reveals at the commit, with its run. The tree is: the output reads
328335
* it and enters the transaction itself (its committed value shows until the
329336
* landing). The statuses that keep a reader: pending — and its error, for an
330-
* error boundary (`_type` is the status it catches). */
337+
* error boundary (`_type` is the status it catches) — on the reader or its
338+
* source. A reader pending again after the source that threw answered (it
339+
* re-asks through a memo that carried the error) has no new answer yet: the
340+
* error stays the display (D-39: a pending is not a value; async-gen 91501
341+
* #1831). */
331342
export function prune(b: Boundary, pass: boolean): number {
332343
const mask = b._type | STATUS_PENDING;
333344
for (const [r, s] of b._readers) {
@@ -336,7 +347,10 @@ export function prune(b: Boundary, pass: boolean): number {
336347
// it publishes with the commit. A reader that threw it now (a lane
337348
// pass, a reader of a node born staged) reached the boundary first
338349
// (#4364).
339-
if (s._statusFlags & mask || (mask & STATUS_ERROR && s._config & CONFIG_STAGED_ERROR))
350+
if (
351+
(r._statusFlags | s._statusFlags) & mask ||
352+
(mask & STATUS_ERROR && s._config & CONFIG_STAGED_ERROR)
353+
)
340354
continue;
341355
if (
342356
(s !== b._tree || b._armed) &&

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ import {
126126
passTx,
127127
joinPassTx,
128128
stagedReaders,
129+
latestOpened,
129130
staleReader,
130131
laneDirty,
131132
externalUntrackHook,
@@ -399,8 +400,13 @@ export function recompute(el: Computed<any>, create: boolean = false): void {
399400
// earlier pass left CONFIG_VERDICT, and a frame read here would serve the
400401
// committed screen, settle the flight and drop the hold — a superseding
401402
// write's verdict would depend on that probe. Cleared for this pass; a
402-
// probe in the body re-stamps it after the plain reads.
403-
if (el._statusFlags & STATUS_PENDING) el._config &= ~CONFIG_VERDICT;
403+
// probe in the body re-stamps it after the plain reads. Not an effect: it
404+
// has no flight of its own (its pending is a source's), and a verdict
405+
// memo's change may have just made it a verdict reader (`laneDirty`).
406+
// Only a build with the lane engine (`laneStageHook`; verdict.ts imports
407+
// it) ever sets CONFIG_VERDICT: without it the line folds away.
408+
if (laneStageHook && !isEffect && el._statusFlags & STATUS_PENDING)
409+
el._config &= ~CONFIG_VERDICT;
404410
if (el._config & CONFIG_HELD) {
405411
const tx = txOf(el);
406412
// Held by a blocked lane: the frame joins nothing — a lane never holds
@@ -2184,6 +2190,21 @@ export function stagedRead(c: Computed<any>, el?: Signal<any> | Computed<any>):
21842190
* (`bornInto`, #4010): its branch exists only there. */
21852191
export function stagedScreen(c: Computed<any>): boolean {
21862192
if (flushTransaction === null || bornInto(c, flushTransaction)) return false;
2193+
// A transaction only a `latest()` read opened holds nothing: the staging
2194+
// is the frame's read for a pass in the frame's seat, as it is before the
2195+
// frame has one, and the seam re-derives the pass once only if the flush
2196+
// parks (D-22, F-10). Lane work sees the screen (D-37). Not a pass with no
2197+
// value yet: its first answer is nobody's hold (D-6) and would commit the
2198+
// staging whether or not the frame parks — it reads the screen, and runs
2199+
// again at the landing.
2200+
if (
2201+
observeFlightHook &&
2202+
flushTransaction === latestOpened &&
2203+
passLane === null &&
2204+
c._config & CONFIG_VERDICT &&
2205+
!(c._statusFlags & STATUS_UNINITIALIZED)
2206+
)
2207+
return !stagedReaders.push(c);
21872208
staleReader(c, flushTransaction);
21882209
return true;
21892210
}

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

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {
5959
STATUS_UNINITIALIZED
6060
} from "./constants.js";
6161
import { attrHooks } from "./attribution-hooks.js";
62-
import { creatorReads, ext, stagedRead, tracking } from "./core.js";
62+
import { bornInto, creatorReads, ext, stagedRead, tracking } from "./core.js";
6363
import { NotReadyError } from "./error.js";
6464
import { laneValueOf } from "./truth.js";
6565
import { enqueueSub } from "./heap.js";
@@ -74,6 +74,7 @@ import {
7474
joinFuture,
7575
laneDirty,
7676
list,
77+
stagedReaders,
7778
staleReader,
7879
merge,
7980
newTransaction,
@@ -508,6 +509,8 @@ function dissolveLane(l: Transaction, into: Transaction | null, except?: Signal<
508509
l._verdict = null;
509510
if (lanes.indexOf(v) !== -1) dissolveLane(v, null);
510511
}
512+
// First loads this dissolution leaves loading (below).
513+
const loading: Computed<any>[] = [];
511514
for (let i = 0; i < l._nodes.length; i++) {
512515
const n = l._nodes[i];
513516
const x = n._x!;
@@ -543,8 +546,20 @@ function dissolveLane(l: Transaction, into: Transaction | null, except?: Signal<
543546
// lane's answer beside inputs that are the truth now: a fresh reader
544547
// of its flight observes it (#3648, #3651; #3305's commit beneath a
545548
// flight).
549+
// Not a first load the lane produced nothing for whose own flight is
550+
// up, nor one pending on such a load kept here (an identity memo of
551+
// it, a derived store's derive): committing its empty `_value` would
552+
// initialize it as `undefined`, which `latest()` would serve and
553+
// `isPending()` call pending. It stays loading until its flight
554+
// answers (D-22, A19 exc. 1; async-gen 3289 #929, 91501 #504, #156).
546555
x._transaction = null;
547-
if (!effect && !guess) n._pendingValue = latest;
556+
if (!effect && !guess)
557+
slot === NOT_PENDING &&
558+
((n as Computed<any>)._statusFlags & (STATUS_UNINITIALIZED | STATUS_PENDING)) ===
559+
(STATUS_UNINITIALIZED | STATUS_PENDING) &&
560+
(x._inFlight || loading.some(q => x._pendingSources?.has(q)))
561+
? loading.push(n as Computed<any>)
562+
: (n._pendingValue = latest);
548563
commitPendingNode(n);
549564
if (!effect) {
550565
if (
@@ -926,17 +941,22 @@ const applyGuessesAt = (parent: Transaction | null): void => {
926941
judged = lanes.length;
927942
if (pendingGuesses.length !== 0) applyGuesses(parent);
928943
};
929-
const laneSeams = (leaks: Computed<any>[] | null): void => {
944+
const laneSeams = (t: Transaction | null): void => {
930945
// Passes that read a write the parked frame holds as the screen
931946
// (`stagedReaders`: lane work, a verdict reader before the verdict): they
932947
// re-derive on the committed world next round (and register as stale
933948
// readers of the transaction there); a lane's runs wait that round — a
934949
// lane sees the screen plus its own guesses.
935950
const leaked: Transaction[] = [];
936-
if (leaks !== null)
937-
for (let i = 0; i < leaks.length; i++) {
938-
const r = leaks[i];
939-
const l = r._x?._transaction;
951+
if (t !== null)
952+
for (let i = 0; i < stagedReaders.length; i++) {
953+
const r = stagedReaders[i],
954+
// A pass no transaction holds that read the frame's staging (an
955+
// effect, a `[s(), latest(s)]` reader watched before the frame had
956+
// a transaction): judged by the frame's — it re-derives only if the
957+
// frame stays parked; landing here, what it read is the screen (one
958+
// run, D-22).
959+
l = r._x?._transaction || (r._flags & REACTIVE_STAGED_READ ? t : null);
940960
// A verdict reader a later read of the same pass routed into a verdict
941961
// lane answered for itself: it re-derives at the holder's landing, not
942962
// now (one run — #3322, #3540). Other verdict-lane work re-derives only
@@ -946,15 +966,23 @@ const laneSeams = (leaks: Computed<any>[] | null): void => {
946966
// flight, held as the frame's pending observer or its staged
947967
// derivation) has nothing to re-derive: its re-run re-enters that
948968
// transaction and parks it again, every round — it runs at the
949-
// landing (#4349).
969+
// landing (#4349). One that read a staging re-derives only if its
970+
// frame stays parked: landing at this seam, what it read is the screen
971+
// (one run, D-22). Not one born into that frame (a held pass's child,
972+
// ruling A): it has no screen, its reads are the transaction's either
973+
// way — it runs again at the landing, not now.
950974
if (
951975
r._flags & REACTIVE_DISPOSED ||
952976
(l?._lane
953977
? l._parent?._verdict === l &&
954978
(r._config & CONFIG_VERDICT
955979
? !(r._flags & REACTIVE_PROBE_UNANSWERED)
956980
: !blocked(l._parent))
957-
: l && !(r._flags & (REACTIVE_STAGED_READ | REACTIVE_PROBE_UNANSWERED)))
981+
: l &&
982+
!(
983+
r._flags & REACTIVE_PROBE_UNANSWERED ||
984+
(r._flags & REACTIVE_STAGED_READ && blocked(l) && !bornInto(r, l))
985+
))
958986
)
959987
continue;
960988
// A leaked effect re-derives seated in its lane from its first read: it
@@ -967,8 +995,12 @@ const laneSeams = (leaks: Computed<any>[] | null): void => {
967995
enqueueSub(r);
968996
if (l?._lane && leaked.indexOf(l) === -1) leaked.push(l);
969997
}
970-
for (let k = Math.min(judged, lanes.length) - 1; k >= 0; k--)
971-
laneSeam(lanes[k], leaked.indexOf(lanes[k]) !== -1);
998+
// A verdict lane born at this seam is judged with it: it exists only once
999+
// a pass routed into it — the park seam's zombie verdict readers re-run
1000+
// as its work so that this seam reveals them (#3444).
1001+
for (let k = lanes.length - 1; k >= 0; k--)
1002+
if (k < judged || lanes[k]._parent?._verdict === lanes[k])
1003+
laneSeam(lanes[k], leaked.indexOf(lanes[k]) !== -1);
9721004
// A verdict reader that entered a lane this seam held: its run waits with
9731005
// the lane, and the verdict beside it would freeze — it re-derives next
9741006
// round from the frame's seat, a stale reader of the lane (#4284).

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

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export let laneOutcomeHook:
7676
| null = null;
7777
export let laneWriteHook: (<T>(el: Signal<T> | Computed<T>, v: T) => T) | null = null;
7878
export let applyGuessesHook: ((parent: Transaction | null) => void) | null = null;
79-
export let laneSeamsHook: ((leaks: Computed<any>[] | null) => void) | null = null;
79+
export let laneSeamsHook: ((t: Transaction | null) => void) | null = null;
8080
export let laneCorrectionsHook: (() => boolean) | null = null;
8181
export let endLanesHook: ((u: Transaction) => void) | null = null;
8282
export let lanesBlockedHook: ((t: Transaction) => boolean) | null = null;
@@ -326,6 +326,13 @@ export function setPassLane(l: Transaction | null): void {
326326
* schedules the seam that consumes it: membership is the tick's — the same
327327
* synchronous frame — and the next tick's writes are not this one's. */
328328
export let flushTransaction: Transaction | null = null;
329+
/** The flush's transaction while only a `latest()` read of a staging opened
330+
* it (verdict.ts `provisionalVerdict`): it holds nothing, and a verdict
331+
* reader's plain read of a staging in it is the frame's read (D-22). */
332+
export let latestOpened: Transaction | null = null;
333+
export function openedByLatest(): void {
334+
latestOpened = flushTransaction;
335+
}
329336
/** The transaction the passes running OUTSIDE a flush this tick derive from
330337
* (a mainline mount, a mainline re-pass): the passes' own (A29, creation-
331338
* time form — "the entry is the pass's alone"): their results are staged
@@ -917,7 +924,7 @@ export class GlobalQueue implements IQueue {
917924
// pure round — the parent's flights before the parent is judged below.
918925
if (laneCorrectionsHook?.()) runHeap(dirtyQueue, GlobalQueue._update);
919926
const joined = flushTransaction;
920-
flushTransaction = null;
927+
flushTransaction = latestOpened = null;
921928
// The frame's verdict is in: the guesses written since the last seam
922929
// open their lane under the frame's transaction (a lane's own flush
923930
// parents a nested lane to it), or are dropped — the frame commits, and
@@ -1036,7 +1043,7 @@ export class GlobalQueue implements IQueue {
10361043
// world (a lane's runs wait this round).
10371044
if (laneSeamsHook) {
10381045
this._queues = lanes;
1039-
laneSeamsHook(t !== null ? stagedReaders : null);
1046+
laneSeamsHook(t);
10401047
if (stagedReaders.length) stagedReaders.length = 0;
10411048
}
10421049
this._queues = [[], []];
@@ -1324,11 +1331,22 @@ export function insertSubs(node: Signal<any> | Computed<any>): void {
13241331
* inert for its pass (`recompute` seats a lane only from its own `_x`), it
13251332
* is a live write if the effect becomes a zombie later this flush — an
13261333
* on-screen reader whose removal an adopted write stages follows the lane
1327-
* (the lane-membership ruling, 2026-10-05; `_update`). */
1334+
* (the lane-membership ruling, 2026-10-05; `_update`).
1335+
*
1336+
* A render effect re-run by a verdict memo's change (`createMemo(() =>
1337+
* latest(x))`, CONFIG_VERDICT) is the verdict reader the same read inline
1338+
* makes it, for that pass (F-6; D-26 `[s(), L()]`, #4284): a frame reader
1339+
* of its other reads — a staging's screen, a flight's committed value. One
1340+
* an earlier propagation this flush seated in another lane leaves that
1341+
* seat: its pass starts from the frame's, as the inline effect's does, and
1342+
* `laneRead` re-derives it on the screen if that lane holds (`entered`). */
13281343
export function laneDirty(node: Signal<any> | Computed<any>, l: Transaction): void {
13291344
for (let s = node._subs; s !== null; s = s._nextSub) {
1330-
const t = s._sub._x?._transaction;
1331-
if (t?._lane ? sameLane(t, l) : (s._sub as any)._type) s._sub._flags |= REACTIVE_LANE_DIRTY;
1345+
const c = s._sub,
1346+
t = c._x?._transaction;
1347+
if ((c as any)._type === EFFECT_RENDER && node._config & CONFIG_VERDICT)
1348+
((c._config |= CONFIG_VERDICT), (c._flags &= ~REACTIVE_LANE_DIRTY));
1349+
if (t?._lane ? sameLane(t, l) : (c as any)._type) c._flags |= REACTIVE_LANE_DIRTY;
13321350
}
13331351
}
13341352
/** One lane, or two of one link group (#3335): one reveal unit. */

0 commit comments

Comments
 (0)