Coalesce background Root notifications without delaying input updates

This commit is contained in:
2026-11-10 17:56:00 +08:00
parent 0abb7c96ba
commit b7fe214d97
5 changed files with 56 additions and 5 deletions
+14
View File
@@ -908,3 +908,17 @@ operation/history-effect admission and final registry/topology validation. This
removes a full table copy for every pending change without adding intermediate
Roots, history units or network writes. `applyChanges` uses the same conditional
change application path and retains its existing strict/default behavior.
CanvasView coalesces Root presentation notifications with `createFrameSource`.
Local user updates/deletes, undo and redo flush pending presentation work
synchronously so controlled inputs retain their native value/caret. Pure creation
and background invalidations may share a frame. Each subscription owns one
disposable frame queue; all editor commits still
advance scene-change hints synchronously. Snapshot reads always delegate to the
current authoritative Root, so commands, history, persistence and input identity
checks do not wait for a frame. The adapter holds no delayed document snapshot.
Unsubscription cancels pending work, including callbacks delivered late by a
clock; eager subscription failures also dispose their queue. This batches source
notifications, not every React render: another store/prop update may read the
current Root before the pending frame. Session and element subscriptions retain
their existing routing and immediate read semantics.