Skip to content

Commit 197064e

Browse files
committed
fix(octane): propagate view Dirty flag during promoteDeclarationView
If a view's thrown thenable settles before promoteDeclarationView runs, settleThrown → invalidateNode marks the view Dirty and clears view.wakeup. Promotion then installs the stale pending state, skips wakeup handoff (view.wakeup is gone), and overwrites node.flags to Mutable|Watching without Dirty. The cell presents an already-settled waiting promise and no wakeup, so async read() spins indefinitely. Carry the view's Dirty flag into the promoted node's flags so it re-evaluates instead of presenting the stale pending state.
1 parent 515bdc1 commit 197064e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/octane/src/signals/graph.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,9 @@ export function promoteDeclarationView(view: ScopedNode, node: ScopedNode): void
11941194
// A view nobody read has no state to install; the cell evaluates its new definition.
11951195
const unevaluated = state === undefined;
11961196
node.flags =
1197-
ReactiveFlags.Mutable | ReactiveFlags.Watching | (unevaluated ? ReactiveFlags.Dirty : 0);
1197+
ReactiveFlags.Mutable |
1198+
ReactiveFlags.Watching |
1199+
((unevaluated ? ReactiveFlags.Dirty : 0) | (view.flags & ReactiveFlags.Dirty));
11981200
// Committed consumers learn the accepted state first. The render's own
11991201
// consumers already presented it; move them without another notification.
12001202
if ((currentChanged || retainedChanged || unevaluated) && node.subs) {

0 commit comments

Comments
 (0)