Frontmatter
| id | 8596 |
| title | Enhance VDOM ID Stability to Remove Manual ID Requirement in TreeList |
| state | Closed |
| labels | bugaicore |
| assignees | tobiu |
| createdAt | Jan 13, 2026, 2:11 PM |
| updatedAt | Jan 13, 2026, 2:38 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8596 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 13, 2026, 2:38 PM |
Enhance VDOM ID Stability to Remove Manual ID Requirement in TreeList
tobiu assigned to @tobiu on Jan 13, 2026, 2:11 PM

tobiu
Jan 13, 2026, 2:36 PM
Input from Gemini 3 Pro:
✦ I have implemented a core VDOM fix for the Chimera Bug and reverted the manual workaround in
TreeList.Changes:
- Core VDOM Fix (
src/util/VDom.mjs): ModifiedsyncVdomStateto abort ID synchronization if the node tags (vnode.nodeNamevsvdom.tag) do not match. This prevents the "Chimera" scenario where aULcontainer (appearing dynamically) inherits the ID of a siblingLIitem during a race condition.- TreeList Revert (
src/tree/List.mjs): Removed the manual ID assignment (parentId + '__ul') introduced in the previous fix. The core VDOM engine now handles this safely.- New Unit Test (
test/playwright/unit/vdom/SyncVdomState.spec.mjs): Added a dedicated test suite forsyncVdomStatethat explicitly reproduces the mismatched-tag scenario and asserts that IDs are NOT synced.- Test Fix (
test/playwright/unit/draggable/container/SortZone.spec.mjs): Fixed a flaky test failure by explicitly importingVdomHelper, which was previously relying on implicit global state from other tests.Verification:
npx playwright test test/playwright/unit/vdom/SyncVdomState.spec.mjs✅ Passednpx playwright test test/playwright/unit/tree/ListRaceCondition.spec.mjs✅ Passed (without manual IDs)- All unit tests passed locally.
The changes have been pushed to
dev.
tobiu cross-referenced by #8592 on Jan 13, 2026, 2:37 PM
tobiu closed this issue on Jan 13, 2026, 2:38 PM
Context: The recent fix for the TreeList "Chimera Bug" (#8595) involved manually assigning deterministic IDs to
ULcontainers to preventNeo.util.VDom.syncVdomStatefrom erroneously assigning them IDs from siblingLInodes during race conditions.Problem: While effective, this manual ID assignment feels like a workaround ("monkey patching"). The framework's core VDOM engine, specifically
Neo.util.VDom.syncVdomStateandNeo.vdom.Helper, should theoretically be robust enough to handle dynamic nodes without requiring manual IDs for every structural element. The goal ofensureStableIdsand similar initiatives was to make this automatic.Objective:
syncVdomStatefails to distinguish between theULcontainer and theLIitem when theULappears dynamically.syncVdomStatebehavior with dynamic sibling nodes where one lacks an ID.src/util/VDom.mjsorsrc/vdom/Helper.mjsthat makes the manualULID assignment inTreeListunnecessary.TreeListand running the race condition tests.Goal: Ensure
Neo.tree.List(and other components) works robustly with purely dynamic IDs for container elements.