LearnNewsExamplesServices
Frontmatter
id8827
titletest: Comprehensive Verification of Asymmetric VDOM Merging and Callbacks
stateClosed
labels
testingcore
assigneestobiu
createdAtJan 20, 2026, 12:30 PM
updatedAtJan 20, 2026, 6:09 PM
githubUrlhttps://github.com/neomjs/neo/issues/8827
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 20, 2026, 6:09 PM

test: Comprehensive Verification of Asymmetric VDOM Merging and Callbacks

Closed v11.23.0 testingcore
tobiu
tobiu commented on Jan 20, 2026, 12:30 PM

This task aims to rigorously stress-test the new Scoped + Aggregated VDOM engine (v11) to ensure precision, efficiency, and correctness of the new merging logic (canMergeUpdate) and its integration with the promise/callback system.

Objectives:

  1. Verify Selective Merging: Ensure that when a parent updates, it only aggregates dirty children, leaving clean children pruned/untouched.
  2. Verify Callback Execution: Ensure that promises returned by child.promiseUpdate() are correctly resolved when the child is merged into a parent's update cycle.
  3. Verify State Management: Ensure needsVdomUpdate is correctly reset for merged children.

Key Test Scenarios:

  1. Selective Merging (The Toolbar Case):

    • Setup: Container with 3 Buttons.
    • Action: Dirty Button 1 and 3. Keep Button 2 clean. Trigger Parent update.
    • Expectation: Update bundle includes Parent, Btn1, Btn3. Excludes Btn2.
  2. Promise/Callback Signal Chain:

    • Setup: Child component waiting on promiseUpdate().
    • Action: Merge Child into Parent update.
    • Expectation: Child's promise resolves when Parent finishes. Verify callback data and timing.
  3. Nested Merging (Transitive chains):

    • Setup: Parent -> Child (Container) -> Grandchild.
    • Action: Dirty all three.
    • Expectation: Grandchild merges to Child, Child merges to Parent. Parent delta contains all.

Implementation:

  • Create test/playwright/unit/vdom/AsymmetricMerging.spec.mjs.
  • Use explicit tracking arrays to verify callback firing order.
tobiu added the testing label on Jan 20, 2026, 12:30 PM
tobiu added the core label on Jan 20, 2026, 12:30 PM
tobiu assigned to @tobiu on Jan 20, 2026, 12:30 PM
tobiu referenced in commit 954791b - "test: Add Comprehensive Asymmetric VDOM Merging Verification (#8827) & docs" on Jan 20, 2026, 6:08 PM
tobiu
tobiu Jan 20, 2026, 6:08 PM

Input from Gemini 3 Pro:

✦ I have completed the verification of the Asymmetric VDOM Merging logic.

Implementation:

  • Created test/playwright/unit/vdom/AsymmetricMerging.spec.mjs.
  • Implemented robust test patterns using testRun counters for unique IDs and setSilent + promiseUpdate for state mutation.

Verified Scenarios:

  1. Selective Merging: Confirmed that parent updates only aggregate dirty children (e.g., Toolbar case).
  2. Promise/Callback Chain: Confirmed that child.promiseUpdate() resolves correctly when merged into a parent update.
  3. Nested Merging: Confirmed correct bundling of Grandchild -> Child -> Parent updates.
  4. Custom Config Hooks: Confirmed that callbacks in custom config setters are executed even when merged.
  5. Leapfrog Merging: Validated that a Grandchild can merge into a Grandparent even if the intermediate Parent is clean/skipped.
  6. Structural Merging: Validated that adding a child (container.add) merges correctly into a pending parent update.

Documentation:

  • Enhanced src/manager/VDomUpdate.mjs and src/mixin/VdomLifecycle.mjs with intent-driven JSDoc explaining the merging strategies, optimization goals, and leapfrog capabilities.

All tests passed successfully. The VDOM merging engine is robust and well-documented.

tobiu closed this issue on Jan 20, 2026, 6:09 PM
tobiu referenced in commit fc9bc36 - "fix: Resolve ntype conflict in AsymmetricMerging tests (#8827)" on Jan 20, 2026, 6:13 PM