From: review-reports/architect.md finding #1, SUMMARY.md Theme A (all 4 reviewers)
Where: ui/home/HomeViewModel.kt:1-50 (constructor), :85-155 (init block)
Issue: HomeViewModel injects 14 dependencies spanning bootstrap, sync, dedup, two enrichment services, a progress tracker, and 7 DAOs. Its init block runs the full startup pipeline: bootstrap, conditional sync, dedup, enrichment, three timed rail-rebuild passes. It is untestable without mocking 14 collaborators and every new Home feature routes through it.
Fix (multi-file refactor):
- Extract
StartupOrchestrator that owns bootstrap → sync → dedup → enrichment pipeline and exposes a completion signal.
- Extract
HomeRailBuilder utility that reacts to the enrichment tracker's state flow instead of the 5s/30s/90s delay schedule.
- Leave
HomeViewModel as pure UI state observation — 3-4 deps, no init block side effects.
User impact: unblocks testability + makes future Home features safe to add. Directly supports the reactive-rail-building fix (separate issue).
From:
review-reports/architect.mdfinding #1,SUMMARY.mdTheme A (all 4 reviewers)Where:
ui/home/HomeViewModel.kt:1-50(constructor),:85-155(init block)Issue:
HomeViewModelinjects 14 dependencies spanning bootstrap, sync, dedup, two enrichment services, a progress tracker, and 7 DAOs. Itsinitblock runs the full startup pipeline: bootstrap, conditional sync, dedup, enrichment, three timed rail-rebuild passes. It is untestable without mocking 14 collaborators and every new Home feature routes through it.Fix (multi-file refactor):
StartupOrchestratorthat owns bootstrap → sync → dedup → enrichment pipeline and exposes a completion signal.HomeRailBuilderutility that reacts to the enrichment tracker's state flow instead of the 5s/30s/90s delay schedule.HomeViewModelas pure UI state observation — 3-4 deps, no init block side effects.User impact: unblocks testability + makes future Home features safe to add. Directly supports the reactive-rail-building fix (separate issue).