feat: extract FilterEngine IIFE module from JavaScript.html (Phase 1 PR4/7) - #148
Merged
Conversation
Extract loadAndApplyPersistedFilters, toggleAllFilterCheckboxes, applyFilters, clearAdvancedFilters, clearAllFilters, _filterScheduleData, filterDataByTags, and filterDataByActiveFilters from JavaScript.html into FilterEngine.js.html as an IIFE-wrapped module. Convert all this.xxx references to App.xxx. Update Index.html to include FilterEngine.js after DataCollection.js. Update IIFE_EXTRACTED set in appWiringContracts.test.js. Update syncMethodsWiring.test.js to load FilterEngine source and adjust wiring patterns for App.xxx references. All 1147 tests pass. ESLint 0 errors. refs #129 Closes t-20260624065419196170-40473-8 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260624065419196170-40473-8 Agend-Branch: refactor/phase1-pr4-filter-engine Agend-Issued-At: 2026-06-24T06:56:48.671228+00:00
Owner
Author
✅ VERIFIEDReviewed HEAD: Files Reviewed (5)
Stage 1 — Correctness
Stage 2 — Adversarial
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 8 filter methods from JavaScript.html into a new FilterEngine.js.html IIFE module as part of Phase 1 IIFE domain separation (#129).
Methods Extracted (8)
loadAndApplyPersistedFiltersthis→ApptoggleAllFilterCheckboxesapplyFiltersclearAdvancedFiltersclearAllFilters_filterScheduleDatafilterDataByTagsfilterDataByActiveFiltersNot extracted:
applyTagFilters(async, Tagify instance + modal confirm — stays in JavaScript.html as documented in NOT_EXTRACTABLE).How
FilterEngine.js.htmlwith standard IIFE pattern(function(App) { ... })(App)this.xxx→App.xxxreferences (activeFilters, ui, modals, tagFilterTagify)Index.htmlafterDataCollection.js(providesApp.getAllTags), beforeApp.init()IIFE_EXTRACTEDset inappWiringContracts.test.js(+8 methods)syncMethodsWiring.test.js: addedfilterEngineSource, updated method existence checks and wiring patterns (this\.xxx→App\.xxx)_filterScheduleDatafromPRIVATE_HELPERStoIIFE_EXTRACTEDScope
FilterEngine.js.html(new)JavaScript.html(removed 8 methods, added moved comments)Index.html(+1 include line)tests/unit/appWiringContracts.test.js(IIFE_EXTRACTED, counts)tests/unit/syncMethodsWiring.test.js(source file, patterns)Verification
npm test: 1147 tests passed (36 files)npx eslint --ext .html .: 0 errors (8 pre-existing warnings)bash scripts/check-structure.sh: all presentESLint Baseline (unchanged)
8 warnings (all pre-existing: unused vars in Config, Elements, module factories)
refs #129