Skip to content

docs(resources): close out the Loader-split effort with final cleanup (Slice 4/4)#417

Merged
Exoridus merged 1 commit into
mainfrom
worktree-loader-split-slice1
Jul 26, 2026
Merged

docs(resources): close out the Loader-split effort with final cleanup (Slice 4/4)#417
Exoridus merged 1 commit into
mainfrom
worktree-loader-split-slice1

Conversation

@Exoridus

Copy link
Copy Markdown
Owner

Summary

  • Final slice of the 4-slice internal Loader-split effort (Slices 1-3: AssetTypeRegistry refactor(resources): extract AssetTypeRegistry from Loader (Loader split, Slice 1/4) #414, AssetDecoder refactor(resources): extract AssetDecoder from Loader (Loader split, Slice 2/4) #415, AssetResidency refactor(resources): extract AssetResidency from Loader (Loader split, Slice 3/4) #416 — all merged). No new extraction, no new interfaces, no behavior change.
  • Fixes documentation left stale by the earlier extractions: two dangling {@link} JSDoc references and two prose mentions of fields/methods that moved to AssetResidency in Slice 3.
  • Documents the Loader constructor's storeResource-callback ordering dependency in code (previously only in the now-archived plan), and adds a brief @remarks architecture note to Loader's class-level doc describing the three-collaborator composition (AssetTypeRegistry / AssetDecoder / AssetResidency).
  • Collapses a verified byte-identical duplicate method pair (_hasResource/_hasStored) in AssetResidency.ts.
  • Tightens visibility on 2 of 4 candidate methods with zero cross-class callers from public @internal to private (the other 2 candidates were correctly kept public @internal after review found real test-suite callers for them).
  • Completes a previously half-applied AssetResidency.destroy() fix: the background-queue teardown now also resets the active/loaded/total counters and resolves a pending awaitBackground() promise, instead of leaving them stale after a full teardown.

Test plan

  • pnpm typecheck — clean
  • pnpm test:core — 330/330 files, 5344 passed, 15 skipped, 0 failed
  • pnpm verify:quick (typecheck + guides/examples/type-tests/packages typecheck + lint + format + docs:api:check) — clean, only pre-existing unrelated warnings
  • pnpm docs:api:check — confirms zero public API drift
  • Executed via subagent-driven-development; task-level review caught one real finding (2 of 4 visibility changes had been verified against Loader.ts only, missing real callers in test/resources/asset-residency.test.ts) — fixed and re-verified. Final whole-branch review: ready to merge, no blocking findings.

Fixes documentation left stale by Slices 1-3's extractions (two
dangling {@link} references and two prose mentions of fields/methods
that moved to AssetResidency), documents the Loader constructor's
storeResource-callback ordering dependency in code instead of only in
an now-archived plan, and adds a brief architecture note to Loader's
class-level doc describing the three-collaborator composition.

Also collapses a byte-identical duplicate method pair
(_hasResource/_hasStored) introduced across Slice 3's fix rounds,
tightens 4 AssetResidency methods with no cross-class caller from
public @internal to private, and completes AssetResidency.destroy()'s
background-queue teardown (previously left the active/loaded/total
counters and a pending awaitBackground() resolver untouched).

No public API change, no behavior change — every item here is
doc-only, a visibility tightening with zero external callers, a
verified-identical duplicate collapse, or a destroy()-time-only
completeness fix. This closes the 4-slice internal Loader-split effort
(AssetTypeRegistry, AssetDecoder, AssetResidency, this cleanup pass).
@Exoridus
Exoridus enabled auto-merge (squash) July 26, 2026 06:38
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 1.93kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
exo-esm-esm 874.66kB 100 bytes (0.01%) ⬆️
exo-esm-modules-esm 3.95MB 1.54kB (0.04%) ⬆️
exo-iife-min-Exo-iife 882.4kB 100 bytes (0.01%) ⬆️
exo-full-iife-Exo-iife 2.8MB 194 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: exo-esm-modules-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
resources/AssetResidency.js 217 bytes 49.57kB 0.44%
resources/Loader.js 991 bytes 32.9kB 3.11%
resources/Loader.d.ts 614 bytes 28.59kB 2.19%
resources/AssetResidency.d.ts -283 bytes 13.24kB -2.09%

Files in resources/AssetResidency.js:

  • ./src/resources/AssetResidency.ts → Total Size: 49.05kB

Files in resources/Loader.js:

  • ./src/resources/Loader.ts → Total Size: 31.96kB
view changes for bundle: exo-iife-min-Exo-iife

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.iife.min.js 100 bytes 882.4kB 0.01%

Files in exo.iife.min.js:

  • ./src/resources/AssetResidency.ts → Total Size: 49.05kB

  • ./src/resources/Loader.ts → Total Size: 31.96kB

view changes for bundle: exo-full-iife-Exo-iife

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.full.iife.js 194 bytes 2.8MB 0.01%
view changes for bundle: exo-esm-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.esm.js 100 bytes 874.66kB 0.01%

Files in exo.esm.js:

  • ./src/resources/Loader.ts → Total Size: 31.96kB

  • ./src/resources/AssetResidency.ts → Total Size: 49.05kB

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/resources/AssetResidency.ts 72.72% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Exoridus
Exoridus merged commit ef15ba5 into main Jul 26, 2026
17 of 18 checks passed
@Exoridus
Exoridus deleted the worktree-loader-split-slice1 branch July 26, 2026 06:47
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