refactor: extract DataIO IIFE module (Phase 1 PR5/7) - #149
Merged
Conversation
Owner
Author
✅ VERIFIEDReviewed HEAD: Files Reviewed (7)
Stage 1 — Correctness
Stage 2 — Adversarial
NoteEvidence
|
Extract 5 data I/O methods from JavaScript.html into DataIO.js.html: - loadVersions, handleLoadVersion (version history) - saveDataToLocal (local persistence) - loadDataFromServer, saveDataToServer (server sync) All this.xxx → App.xxx replacements following established IIFE pattern. Index.html updated with DataIO.js include after DataCollection.js. Wiring tests updated: appWiringContracts (IIFE_EXTRACTED + count), asyncMethodsWiring (DataIO source), lifecycleRegression (DataIO source), sourceAnalysis helper (IIFE pattern support). 1147 tests green, ESLint 0 errors. refs #129 Closes t-20260624065419802905-40473-9 Agend-Agent: cb-team-impl2 Agend-Task: t-20260624065419802905-40473-9 Agend-Branch: refactor/phase1-pr5-data-io Agend-Issued-At: 2026-06-24T06:57:51.054623+00:00
cheerc
force-pushed
the
refactor/phase1-pr5-data-io
branch
from
June 24, 2026 07:25
3a0478a to
2b0edfc
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.
Phase 1 PR5: DataIO IIFE Extraction
Issue: refs #129 (Phase 1, Wave B)
Plan:
docs/plans/2026-06-24-phase1-iife-refactoring.md§PR5Summary
Extract 5 data I/O methods from
JavaScript.htmlinto a newDataIO.js.htmlIIFE module:loadVersionshandleLoadVersionsaveDataToLocalloadDataFromServersaveDataToServerPattern
Standard IIFE pattern established in PR1-PR3:
All
this.xxxreferences →App.xxx(IIFE closure).Changed Files
DataIO.js.htmlJavaScript.htmlIndex.htmlDataIO.jsinclude (after DataCollection.js, before App.init())tests/unit/appWiringContracts.test.jstests/unit/asyncMethodsWiring.test.jstests/unit/lifecycleRegression.test.jstests/helpers/sourceAnalysis.jsVerification
npm test— 1147 tests, all green ✅npx eslint --ext .html .— 0 errors ✅bash scripts/check-structure.sh— all files present ✅Dependencies
App.xxxmutual references (both close over same App object)ESLint Baseline
0 errors, 8 warnings (all pre-existing: unused vars in Modals.js.html and UI.js.html).
follows spec