Skip to content

refactor: migrate core DOM tree interfaces - #302

Merged
jderochervlk merged 4 commits into
mainfrom
codex/dom-tree-interfaces
Aug 7, 2026
Merged

refactor: migrate core DOM tree interfaces#302
jderochervlk merged 4 commits into
mainfrom
codex/dom-tree-interfaces

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Summary

  • migrate core node, element, range, traversal, selection, and character-data APIs onto DOMTree
  • add focused interface modules including Attr, AbstractRange, StaticRange, CDATASection, and ProcessingInstruction
  • move interface-specific operations out of the broad type modules

Temporary state

Review focus

  • recursive type relationships and public method signatures
  • completeness of each newly owning interface module
  • absence of behavioral changes beyond type ownership

Verification

  • npm run build
  • npm test
  • npm run format:check

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08f7c6a1ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/DOM/Selection.res
Comment thread src/DOM/HTMLSlotElement.res
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from 08f7c6a to 5a859e2 Compare August 4, 2026 17:31
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from 5a859e2 to b327f5d Compare August 5, 2026 12:14
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from b327f5d to 0268243 Compare August 5, 2026 12:31
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch 2 times, most recently from d7bb287 to 4f100d7 Compare August 5, 2026 13:40
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from 4f100d7 to 62c8673 Compare August 5, 2026 13:57
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from 62c8673 to 0c3bb67 Compare August 5, 2026 14:00
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from 0c3bb67 to ea6fb05 Compare August 5, 2026 15:08
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch 2 times, most recently from 9727a53 to f8a846b Compare August 6, 2026 14:52
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from f8a846b to 02905ae Compare August 6, 2026 14:58
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from 02905ae to 87a2c53 Compare August 6, 2026 15:04
Comment thread src/DOM/Comment.res
Comment thread src/DOM/HTMLFormElement.res
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch 2 times, most recently from de5f8de to b892660 Compare August 6, 2026 20:09
Comment thread src/DOM/HTMLFormElement.res Outdated
Comment thread src/DOM/NodeFilter.res Outdated
Comment thread src/DOM/StaticRange.res Outdated
Comment thread src/DOM/StaticRange.res
[See StaticRange on MDN](https://developer.mozilla.org/docs/Web/API/StaticRange)
*/
type t = AbstractRange.t = private {
...AbstractRange.t,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this so that completions actually show some contents?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. It's a pattern that @tsnobip showed to me.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The explicit private record keeps the inherited fields visible in editor completions; the type equation also preserves the intended identity with AbstractRange.t for this fieldless subtype. A stack-wide consistency audit is tracked in the parent issue follow-up checklist.

@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from ec61d7d to d06a446 Compare August 7, 2026 13:32
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from d06a446 to c39776a Compare August 7, 2026 13:44
Base automatically changed from codex/dom-tree-foundation to main August 7, 2026 13:45
@jderochervlk
jderochervlk force-pushed the codex/dom-tree-interfaces branch from c39776a to 13a324f Compare August 7, 2026 13:45
@jderochervlk
jderochervlk merged commit 2bebc1b into main Aug 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants