Skip to content

refactor: establish Observers folder feature - #331

Open
jderochervlk wants to merge 1 commit into
codex/option5-svg-folderfrom
codex/option5-observers-folder
Open

refactor: establish Observers folder feature#331
jderochervlk wants to merge 1 commit into
codex/option5-svg-folderfrom
codex/option5-observers-folder

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 21 of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #330.

Summary

  • add the target src/observers folder on the unqualified internal Observers feature
  • consolidate Intersection Observer, Mutation Observer, and Resize Observer bindings
  • add the supported WebAPI.Observers -> WebAPI.DOMNodes + WebAPI.Geometry + Observers feature
  • preserve the four existing flat observer interface modules
  • localize the instanceof Document check in IntersectionObserverRoot so the observer feature does not depend on the broad legacy Document module

Dependency note

IntersectionObserverRoot previously imported Document only for its runtime type check. Its public type already uses foundational DOM.document; keeping the check local removes an otherwise unnecessary dependency on the still-broad Document interface without changing the decoded result.

Temporary state

  • Document remains in the legacy DOM folder until the later Window/document integration layer
  • the legacy broad WebAPI.DOM source entry remains until its remaining interfaces have been assigned
  • final feature-graph guardrails and cleanup remain deferred until the stack is complete

Review focus

  • observer domain membership
  • the DOMNodes/Geometry dependency closure
  • the localized Document runtime check

Verification

  • node_modules/.bin/rescript clean
  • node_modules/.bin/rescript build --prod --features DOM,Event,DOMPlatform,Animation,CSSOM,Geometry,DOMNodes,Observers
  • npm run build
  • npm test
  • npm run format:check
  • git diff --check

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: b0306322c9

ℹ️ 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".

@jderochervlk
jderochervlk force-pushed the codex/option5-observers-folder branch from b030632 to f91f011 Compare August 4, 2026 17:31
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.

1 participant