Skip to content

Fix VDOM Update Collision Logic for Sparse Trees (Teleportation) #8890

@tobiu

Description

@tobiu

The recent implementation of Disjoint VDOM Updates (Teleportation) introduced a regression where disjoint child updates can be incorrectly dropped from the update batch.

This occurs when:

  1. A Parent component is updating with updateDepth > 1.
  2. The Parent has at least one merged child (triggering Sparse Tree generation via mergedChildIds).
  3. A Disjoint Child (Distance < ParentDepth) is updating independently in the same batch.
  4. The Disjoint Child is NOT in the Parent's mergedChildIds set.

The current collision filtering logic (parentDepth > distance) deletes the Disjoint Child's update, assuming the Parent will cover it. However, because the Parent is generating a Sparse Tree (mergedChildIds is present), TreeBuilder prunes any child not in the AllowList.

Result: The Disjoint Child is deleted from the batch AND pruned from the Parent payload, leading to a lost update (e.g., Loading Mask failing to show).

The fix is to refine the collision detection in src/mixin/VdomLifecycle.mjs to check if the Parent is excluding the Child (Sparse Mode) before deleting the disjoint update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aibugSomething isn't workingcoreCore framework functionalityregression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions