feat: extract PDFExport IIFE module from JavaScript.html (Phase 1 PR7 — final) - #151
Merged
Conversation
…Phase 1 final) Extract the last heavy method (printScheduleToPdf, ~320 lines) from JavaScript.html into PDFExport.js.html IIFE module. JavaScript.html now contains only 2 methods: init and applyTagFilters — completing Phase 1 IIFE domain separation. Convert all this.xxx references to App.xxx. Update 2 test files: - appWiringContracts: NOT_EXTRACTABLE 3→2, IIFE_EXTRACTED +1, count 3→2 - asyncMethodsWiring: PDF_EXPORT_ASYNC_METHODS + resolveSource All 1147 tests pass on first try. ESLint 0 errors. refs #129 Closes t-20260624090740918764-40473-22 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260624090740918764-40473-22 Agend-Branch: refactor/phase1-pr7-pdf-export Agend-Issued-At: 2026-06-24T09:08:20.500922+00:00
Owner
Author
✅ VERIFIEDReviewed HEAD: Files Reviewed (5)
Fast Path Checklist
🎉 Phase 1 MilestoneThis is the final PR of Phase 1 IIFE refactoring. JavaScript.html: 48→2 methods. All domain modules now IIFE-wrapped. Evidence
|
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.
What
Extract
printScheduleToPdf(~320 lines, the largest single method) from JavaScript.html intoPDFExport.js.htmlIIFE module. This is the final PR of Phase 1 IIFE domain separation (#129).After this PR, JavaScript.html contains only 2 methods:
initandapplyTagFilters.Phase 1 Complete Summary (48 → 2 methods in JavaScript.html)
How
PDFExport.js.htmlwith IIFE pattern(function(App) { ... })(App)this.xxx→App.xxxreferencesIndex.htmlafterScheduleManager.js, beforeApp.init()Changed Files (5)
PDFExport.js.html(new, ~340 lines)JavaScript.html(removed printScheduleToPdf, only init + applyTagFilters remain)Index.html(+1 include line)tests/unit/appWiringContracts.test.js(NOT_EXTRACTABLE 3→2, IIFE_EXTRACTED +1, count 3→2)tests/unit/asyncMethodsWiring.test.js(PDF_EXPORT_ASYNC_METHODS + resolveSource)Verification
npm test: 1147 tests passed on first try (36 files) ✅npx eslint --ext .html .: 0 errors (8 pre-existing warnings) ✅bash scripts/check-structure.sh: all present ✅refs #129