Summary
Comprehensive code inspection of the mmk-ui-api codebase using indexed symbol search, flow tracing, and reference analysis. Full findings document: docs/code-reduction-findings.md
Child Issues
| # |
Issue |
Status |
| #138 |
Remove dead code: deprecated AlertService and duplicate AlertDispatcher |
Open |
| #139 |
Consolidate duplicate template render helpers (core/ vs events/ funcs.go) |
Open |
| #140 |
Consolidate buildSourceOptions/buildAlertSinkOptions/buildSecretOptions |
Open |
| #141 |
Refactor EventFilterService from global mutable singleton |
Open |
| #142 |
Consolidate UI list handler filter parsing |
Open |
| #143 |
Split PuppeteerRunner.runScript() into composable methods |
Open |
| #144 |
Relocate misplaced files (examples.ts, TEMPLATE.go) |
Open |
Estimated Impact
| Category |
Count |
Lines Affected |
Risk |
| Dead Code (safe to remove) |
5 items |
~260 lines |
Low |
| Duplicate Code Patterns |
6 patterns |
~200 lines |
Low-Medium |
| Deep Call Chains (4+ levels) |
3 chains |
Refactor only |
Medium |
| Over-Engineering |
2 areas |
~30 lines |
Low |
Implementation Order
Phase 1: Zero-Risk Cleanup (Day 1)
- #138 — Delete 2 dead files
- #144 — Relocate 2 files
Phase 2: Duplication Reduction (Day 2-3)
- #139 — Shared template render helper
- #140 — Generic buildSelectOptions
- #142 — Generic filter parsing
Phase 3: Complexity Reduction (Day 4-5)
- #141 — Immutable EventFilterService
- #143 — Split PuppeteerRunner.runScript()
Summary
Comprehensive code inspection of the
mmk-ui-apicodebase using indexed symbol search, flow tracing, and reference analysis. Full findings document:docs/code-reduction-findings.mdChild Issues
Estimated Impact
Implementation Order
Phase 1: Zero-Risk Cleanup (Day 1)
Phase 2: Duplication Reduction (Day 2-3)
Phase 3: Complexity Reduction (Day 4-5)