fluffychat/lib/pangea/analytics_misc/practice_tier_enum.dart
wcjord 8a3979c61b
feat: unified use-type-aware practice scoring (#5703)
* feat: unified use-type-aware practice scoring on ConstructUses

- Add practiceScore() and practiceTier to ConstructUses for shared
  scoring across message practice and standalone practice
- Add isChatUse, isAssistedChatUse, isIncorrectPractice getters to
  ConstructUseTypeEnum with exhaustive switches
- Add PracticeTier enum (suppressed/active/maintenance)
- Wire into PracticeSelectionRepo and AnalyticsPracticeSessionRepo
- 28 unit tests covering tier classification, scoring, and ordering

Closes #5700

* formatting, fix linting issue

* move some stuff around

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
2026-02-16 12:13:46 -05:00

14 lines
488 B
Dart

/// Priority tier for spaced repetition scoring.
///
/// Tier is determined by how the user most recently encountered the word
/// in chat (wa/ga/ta) and whether they've struggled with it in practice.
enum PracticeTier {
/// User demonstrated mastery (wa) with no subsequent errors — skip entirely.
suppressed,
/// User needed help (ta/ga) or recently got it wrong — prioritize.
active,
/// Standard aging-based priority (correctly practiced, but aging).
maintenance,
}