|
|
step 4, 5/n)
Fifth slice of the DomainViewModel decomposition.
- Moves the history query/compare surface into DomainViewModel+History.swift:
per-domain snapshot reads (historyEntries/historyEntry/previousHistoryEntry),
timeline grouping (timelineEntries/timelineSections), the two-snapshot
selection model (toggle/clear/selectedSnapshots), diff generation and
navigation (generateDiff*/moveTo*DiffChange/currentDiffTargetSectionID), and
the resolver-mismatch notes. Pure move.
- The inspection *pipeline* that produces history — performLookup,
applySnapshot, saveHistoryEntry, persistHistory, snapshot-metadata bookkeeping
— stays on the main type with the inspection code.
This slice needs zero visibility changes: every dependency (the history array,
diff state, latestSnapshot) was already internal. The main-file diff is pure
deletion.
DomainViewModel.swift: 4306 -> 4171 lines (4864 at the start of step 4; -693
total). App builds clean; unit suite 58/58. No project.pbxproj change.
|