LearnNewsExamplesServices
Frontmatter
titlefix(vdom): Correct collision logic for sparse tree updates
authoraryanjsingh
stateClosed
createdAtApr 4, 2026, 2:37 AM
updatedAtApr 4, 2026, 6:39 AM
closedAtApr 4, 2026, 6:39 AM
mergedAt
branchesdevfix/issue-8890-fix-vdom-update-collision-logic-for-spar
urlhttps://github.com/neomjs/neo/pull/9675
Closed
aryanjsingh
aryanjsingh commented on Apr 4, 2026, 2:37 AM

Summary

This commit fixes a regression where disjoint child component updates could be lost during a batched update. The issue occurred when a parent component performed a sparse tree update (using mergedChildIds) that did not include the independently updating child. The old collision logic would incorrectly delete the child's update, but the parent's payload would also prune it, resulting in a lost update. The fix refines the collision detection to check if the parent is in sparse mode and, if so, ensures the child is in the parent's allow-list before its update is considered redundant.

Changes

  • src/mixin/VdomLifecycle.mjs: Modified the collision filtering logic in executeVdomUpdate. The check now verifies if a parent performing a deep update is also in "Sparse Tree" mode. If so, it only deletes a child's update if that child is explicitly included in the parent's mergedChildIds set, preventing the child's update from being incorrectly dropped.

Related Issue

Closes #8890