Skip to content

refactor: clean up shared feature helpers - #340

Open
jderochervlk wants to merge 1 commit into
codex/option5-window-folderfrom
codex/option5-helper-cleanup
Open

refactor: clean up shared feature helpers#340
jderochervlk wants to merge 1 commit into
codex/option5-window-folderfrom
codex/option5-helper-cleanup

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 30 of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #339.

Summary

  • split cache-specific support types into internal src/storage/CacheTypes.res
  • return WebWorkersTypes to the Workers folder
  • update Cache, CacheStorage, Window, browser globals, and worker scopes to use the owning helper modules
  • fold the shared Blob/File type identity into foundational DOM.res
  • remove the internal BaseFile helper while preserving FileTypes.blob and FileTypes.file aliases

Why this cleanup is last

Earlier PRs temporarily kept WebWorkersTypes with Storage and BaseFile in core so folder moves could remain mechanical. With the complete graph in place, the ownership directions are now explicit: Workers depends on Storage, and File aliases the small foundational identities in DOM.

Resolved temporary state

  • cache and worker support types no longer share one misplaced helper module
  • the standalone BaseFile module is removed
  • no module-slice exception is required

Review focus

  • preservation of Blob/File type identity through the new DOM aliases
  • cache/worker helper ownership
  • the unchanged public feature closures

Verification

  • node_modules/.bin/rescript build --prod --features WebAPI.DOM
  • node_modules/.bin/rescript build --prod --features WebAPI.Storage
  • node_modules/.bin/rescript build --prod --features WebAPI.Workers
  • node_modules/.bin/rescript build --prod --features WebAPI.Window
  • 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. Chef's kiss.

Reviewed commit: 6aad67b61d

ℹ️ 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-helper-cleanup branch from 6aad67b to 105cdfd 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