Skip to content

refactor(#51): extract mastery threshold constants to shared file - #63

Open
atbrace wants to merge 1 commit into
mainfrom
51-threshold-constants
Open

refactor(#51): extract mastery threshold constants to shared file#63
atbrace wants to merge 1 commit into
mainfrom
51-threshold-constants

Conversation

@atbrace

@atbrace atbrace commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Created src/lib/constants.ts with MASTERY_THRESHOLD (85), APPROACHING_THRESHOLD (60), READINESS_APPROACHING_THRESHOLD (65), EXAM_PREP_THRESHOLD (75), and MASTERY_THRESHOLD_DECIMAL (0.85)
  • Updated 10 callsite files to import from constants instead of using magic numbers
  • Zero magic threshold numbers remain in source files (only in test description strings)

Closes #51

Test plan

  • pnpm test:run — 437 tests pass
  • grep -rn ">= 85" src/ --include="*.ts" --include="*.tsx" returns only test descriptions
  • No behavioral changes — pure mechanical refactor

🤖 Generated with Claude Code

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.

Extract mastery threshold constants to shared file

1 participant