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
Root rollback loses keyed rows after an @empty refill in one drain #984
A keyed @for has borrowed-marker @empty content and starts with [a,b,c]. A root-level sibling uses use(load(susp)) and holds the committed root when susp=1 is pending. In one act, make an urgent parent update clear the list, then a startTransition refill it and suspend the sibling:
awaitact(()=>{api.setStep(1);// [a,b,c] -> []: rows are parked while still connectedstartTransition(()=>{api.setLocal(1);// [] -> [d]: the @empty block is parkedapi.setSusp(1);// root-level use() stays pending});});
The @empty block's borrowed markers span the list's shared range. When that block is parked, its saved node array includes the previously parked, still-connected rows. Rollback restores a/b/c from their row entries, then flushParkedItems unmounts the transient @empty block and removes those same rows a second time. While the root is held, the list is [], although its committed rows should remain visible and connected. A later keyed insertion can then fail because the row chain and DOM disagree.
Expected regression coverage: public .tsrx fixture with keyed rows (including a multi-node row), @empty, and the sibling root suspender; assert a/b/c order, exact node identity, connected cleanup behavior, no @empty/d after the hold, and a subsequent insertion before b. Exercise the normal and nested rollback windows and the large-list clear path.
This failure reproduces on both main and the earlier PR #982 head, as observed in the review of #982. It is separate from that PR's newly introduced lazy parked-row regression, fixed there by retaining exact node ranges. Its repair needs owned content for the borrowed empty block to avoid overlapping retained row ranges across rollback windows.
Merged PR #986 fixed this issue at d5de04f. The deterministic public .tsrx reproduction queues setLocal(1) from the @empty body during the urgent clear; the refilled list then queues the sibling setSusp(1) in the same root render drain. Before the fix, the held a/b/c rows disappeared and a later keyed insertion threw NotFoundError. The direct two-setter startTransition sketch in the issue body can take a different snapshot and does not consistently trigger that failure.
The fix also checks a 1,000-row owned-list clear and the nested Suspense case where an inner rollback must leave outer-retired rows connected through cleanup. Source-only baseline/candidate probes passed, and PR current-head CI passed all relevant checks on 71b8e29f. This issue closed with the merge.
Activity
domgan-oai commentedon Sep 7, 2026
Merged PR #986 fixed this issue at
d5de04f. The deterministic public.tsrxreproduction queuessetLocal(1)from the@emptybody during the urgent clear; the refilled list then queues the siblingsetSusp(1)in the same root render drain. Before the fix, the held a/b/c rows disappeared and a later keyed insertion threwNotFoundError. The direct two-setterstartTransitionsketch in the issue body can take a different snapshot and does not consistently trigger that failure.The fix also checks a 1,000-row owned-list clear and the nested Suspense case where an inner rollback must leave outer-retired rows connected through cleanup. Source-only baseline/candidate probes passed, and PR current-head CI passed all relevant checks on
71b8e29f. This issue closed with the merge.