Frontmatter
| id | 8477 |
| title | Refactor Progress Component ID handling |
| state | Closed |
| labels | airefactoringcore |
| assignees | tobiu |
| createdAt | Jan 9, 2026, 6:14 PM |
| updatedAt | Jan 9, 2026, 6:19 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8477 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8469 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 9, 2026, 6:19 PM |
Refactor Progress Component ID handling
tobiu added parent issue #8469 on Jan 9, 2026, 6:14 PM
tobiu assigned to @tobiu on Jan 9, 2026, 6:18 PM

tobiu
Jan 9, 2026, 6:19 PM
Input from Gemini 3 Pro:
✦ I have refactored
src/component/Progress.mjsto useensureStableIdsinstead ofafterSetId.Changes:
- Replaced
afterSetIdwithensureStableIds.- Moved the
this.label.for = this.idlogic intoensureStableIds.- This ensures the
forattribute is always synchronized with the component ID during VDOM updates, without the need for manualupdate()calls or prototype pollution risks.Verification:
- Added
test/playwright/unit/component/Progress.spec.mjs.- Verified that the
label.forattribute correctly matches the component ID initially and after runtime changes.Commit: 1c2f6a725 (#8477)
tobiu closed this issue on Jan 9, 2026, 6:19 PM
Context:
src/component/Progress.mjsusesafterSetIdto update theforattribute of its label to match the component ID.afterSetId(value, oldValue) { super.afterSetId(value, oldValue); this.label.for = value; this.update() }This is a standard DOM synchronization task. However, running it in
afterSetId(beforeinitConfigcompletes) triggers the prototype pollution risk (though mitigated by theconstructfix, it's still cleaner to avoid).Goal: Refactor
afterSetIdintoensureStableIds. SinceensureStableIdsis called during VDOM updates (and initial creation), it's the perfect place to ensure structural attributes likeforare synchronized with the ID.Verification:
test/playwright/unit/component/Progress.spec.mjs.label.formatchescomponent.id.idupdateslabel.for.