Skip to content

refactor: вынести DerivedStatsModel из AppModel - #89

Merged
fso13 merged 1 commit into
mainfrom
refactor/derived-stats
Oct 23, 2026
Merged

fso13 merged 1 commit into
mainfrom
refactor/derived-stats

Conversation

@fso13

@fso13 fso13 commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Что сделано

  • Вынесен DerivedStatsModel: largestItems, categoryStats, filteredLargestRows, фоновый refresh() и синхронный apply(tree:) для снапшотов.
  • PreviewModel заполняет derived state через stats.apply; UI, снапшоты и тесты переведены на model.stats.*.
  • DerivedStatsModelTests: apply, фильтры по категории/поиску, async refresh и reset.
  • AppModel: 991 → 964 строки; тесты: 156.

Refs #66
Refs #87

- Move largest items, category stats, filtering and refresh into DerivedStatsModel
- PreviewModel applies derived state synchronously for snapshots
- Migrate UI, snapshots and tests to model.stats
- Add DerivedStatsModelTests for apply, filters and async refresh
- AppModel is now 964 lines; 156 tests green

Refs #66
Refs #87
@fso13
fso13 merged commit 2063c2e into main Oct 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants