Open
Conversation
Copilot
AI
changed the title
[WIP] Add debug assertion for node_map component children
Require hook_dom in node_map components
Jan 22, 2026
There was a problem hiding this comment.
Pull request overview
This PR enforces that components used with node_map must call hook_dom() to define their root DOM element, enabling significant simplification of the reordering logic.
Changes:
- Added debug assertion to catch missing
hook_dom()calls innode_mapcomponents - Simplified reordering by replacing recursive DOM traversal with direct
child.domaccess - Removed ~50 lines of workaround code (
instance_dom_last_getandinstance_reinsert) - Added documentation to README explaining the new requirement
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/lui.js | Added debug assertion for hook_dom requirement; simplified reordering logic; removed recursive DOM traversal functions |
| README.md | Documented that node_map components must use hook_dom |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ering code Co-authored-by: L3P3 <4629449+L3P3@users.noreply.github.com>
Co-authored-by: L3P3 <4629449+L3P3@users.noreply.github.com>
Co-authored-by: L3P3 <4629449+L3P3@users.noreply.github.com>
b916bd8 to
7221df9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
instance_dom_last_getfunctioninstance_reinsertfunctionchild.domchild.dom &&checks now that hook_dom is enforcedOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.