Frontmatter
| id | 8900 |
| title | Implement JIT ID Generation in TreeBuilder |
| state | Closed |
| labels | enhancementaicore |
| assignees | tobiu |
| createdAt | Jan 28, 2026, 4:29 PM |
| updatedAt | Jan 28, 2026, 5:41 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8900 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8899 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 28, 2026, 5:41 PM |
Implement JIT ID Generation in TreeBuilder
tobiu cross-referenced by #8901 on Jan 28, 2026, 4:29 PM
tobiu added parent issue #8899 on Jan 28, 2026, 4:34 PM

tobiu
Jan 28, 2026, 4:49 PM
Input from Gemini 3 Pro:
✦ I have implemented the JIT ID generation logic.
Changes:
- Modified
src/util/vdom/TreeBuilder.mjs:
- Added JIT ID generation in
#buildTreewhen running in VDOM mode (childKey === 'cn').- Uses
Neo.getId('vtext')for text nodes andNeo.getId('vnode')for others.- Assigns IDs in-place to the source VDOM node to ensure persistence.
- Modified
src/vdom/VNode.mjs:
- Removed auto-generation fallback.
- Now throws an error if
config.idis missing, enforcing the App-Worker authority.Next Steps: I will proceed with Ticket #8901 (Cleanup) in this same branch.
tobiu assigned to @tobiu on Jan 28, 2026, 5:41 PM
tobiu closed this issue on Jan 28, 2026, 5:41 PM
Objective: Implement the "App Authority" logic for VDOM IDs by modifying
TreeBuilderto generate IDs just-in-time (JIT) during payload construction.Tasks:
Modify
src/util/vdom/TreeBuilder.mjs:#buildTreemethod.childKeyis effectively for VDOM construction), check ifnode.idis missing.Neo.getId('neo-vnode').nodeobject (mutation) to ensure the ID persists on the VDOM blueprint for future updates.Modify
src/vdom/VNode.mjs:Neo.getId(...)).config.idis missing.Constraint:
vnodevsvtext).removeDom: truenodes also get IDs (to preserve identity if they are re-shown).