Frontmatter
| id | 8469 |
| title | Audit and Refactor all afterSetId Implementations |
| state | Closed |
| labels | epicairefactoringcore |
| assignees | tobiu |
| createdAt | Jan 9, 2026, 4:17 PM |
| updatedAt | Jan 9, 2026, 6:26 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8469 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | 8471 Refactor afterSetId in src/button/Base.mjs 8472 Implement Lazy VDOM Cloning in Component Base 8473 Refactor afterSetId in Split Button and Grid Body 8474 Enforce Eager VDOM Cloning in Component Constructor 8475 Remove redundant ensureStableIds from Button Base 8476 Refactor Gallery to remove manual afterSetId ID assignment 8477 Refactor Progress Component ID handling 8478 Refactor afterSetId in Form Fields to ensureStableIds |
| subIssuesCompleted | 8 |
| subIssuesTotal | 8 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 9, 2026, 6:26 PM |
Audit and Refactor all afterSetId Implementations

tobiu
Jan 9, 2026, 5:09 PM
Input from Gemini 3 Pro:
✦ Completed refactoring of
src/button/Base.mjsin sub-ticket #8471.
- Replaced
afterSetIdwithensureStableIds.- Verified prototype safety with new unit tests.

tobiu
Jan 9, 2026, 6:26 PM
Input from Gemini 3 Pro:
✦ I have completed the audit and refactoring of all
afterSetIdimplementations.Summary of Work:
- Core Safety: Implemented eager VDOM cloning in
Neo.component.Base.construct(#8474) to prevent prototype pollution from early VDOM access.- Logic Centralization:
- Refactored
src/button/Split.mjs,src/grid/Body.mjs,src/component/Progress.mjs,src/component/Gallery.mjs,src/form/field/CheckBox.mjs,src/form/field/FileUpload.mjs, andsrc/form/field/Text.mjs.- Replaced manual
afterSetIdlogic withensureStableIdsoverrides where appropriate.- Removed redundant
ensureStableIdsfromsrc/button/Base.mjs.- Audit: Verified that
src/component/Abstract.mjsandsrc/core/Base.mjsuseafterSetIdcorrectly for manager registration, which is outside the scope of VDOM stabilization.Outcome: The codebase now enforces a consistent, safe, and centralized pattern for VDOM ID assignment.
I am closing this Epic.
Following the VDOM ID stabilization fix (#8467), we need to audit all occurrences of
afterSetIdin the codebase.Context: We discovered that
Component.Base#afterSetIdwas previously mutating the class prototype's_vdomand that manual VDOM ID assignment is now handled centrally byVdomLifecycle#ensureStableIds.Goals:
ensureStableIds._vdomorvdomproperties during the construction phase beforeinitConfigcompletes).Files to Audit:
src/button/Base.mjssrc/button/Split.mjssrc/component/Abstract.mjssrc/component/Base.mjs(Already refactored, double-check)src/component/Gallery.mjssrc/component/Progress.mjssrc/core/Base.mjssrc/grid/Body.mjs