Repository navigation
Minor Changes
-
Apply every
MessageStoremutation in the order it was made, and stop repeating work that changes nothing. (#4414)pushno longer copies the buffer;getSnapshot()builds its frozen array on demand.<A2UI>applies messages when the store reports them instead of re-rendering its shell for every push.- A rejected
replaceis reported once. Its appended tail is still ignored until a correctedreplaceor aclear, but later pushes no longer re-evaluate the rejected snapshot or resend its errors. - Swapping
messageStorefor another non-null store reconciles to the new store's contents, asreplacedoes, instead of skipping its first messages. - A component definition or data value identical to the current one is a no-op. Template instances are rebuilt only when their items or their template change, and instances whose item is gone are released.
- Components may arrive in any order across messages: a parent renders a child once both exist. Nested templates expand against each item.
- A
@callreturning a new non-JSON object on every call no longer causes a render loop, and a failing expression is reported once per agent update instead of on every evaluation. - A surface that names no catalog uses the catalog passed to
<A2UI>; a surface that names an unregistered catalog reportsVALIDATION_FAILEDonce. - A malformed message is reported and skipped without discarding the messages after it.
MessageProcessor.registerCatalogaccepts{ default: true }, andNodeRendererPropsis exported. -
Add
messageStore.replace(fullMessages)for streams that end with a complete response. Reconcile final state while retaining unchanged components and local input on unchanged server fields, remove missing state, and continue consuming subsequentpushcalls. Replacement snapshots do not replay RPC calls or responses. (#4404)Rejected replacements report errors and leave the live state and consumption cursor unchanged; appended messages wait for a corrected replacement or a buffer clear.
MessageProcessor.replaceMessagesreturns whether it accepted the snapshot. Fix messages being skipped whenclear()andpush()occur in the same batch.Match array entries by unique
idorkeyto preserve local edits through server insertions, deletions, and reordering. Arrays without usable identities merge by index when all three lengths agree; otherwise they use the server array. Recognize child references from catalog schemas or built-in child fields instead of treating every matching string as a component ID.Use
replace([])to clear rendered surfaces;clear()retains its buffer-only behavior. Preserve existingpushlifecycle behavior: deleting the active surface leaves a blank renderer, and switching surfaces does not force a subtree remount.