fix: add missing 14-day streak milestone - #2293
Conversation
|
Thank you for submitting your pull request, @Suprita736! 🙌 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe streak tracker now includes the 14-day achievement milestone. A new Vitest suite tests milestone unlocking, duplicate prevention, UTC day differences, and streak resets after missed practice. ChangesStreak milestone coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change enables the existing 14-day streak achievement while preserving the other streak milestones and adds targeted test coverage. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Biome (2.5.7)backend/tests/streakTracker.unit.test.jsFile contains syntax errors that prevent linting: Line 1: Illegal use of an import declaration outside of a module Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📝 Pull Request Description
Related Issue
Closes #2290
Summary
Added the missing 14-day streak milestone so the existing
"14-Day Streak"achievement can be unlocked when a user reaches a 14-day consecutive streak.Also added unit test coverage for the 14-day streak milestone while preserving the existing 3-day, 7-day, and 30-day streak behavior.
Type of Change
How Has This Been Tested?
"14-Day Streak"achievement.Screenshots (if applicable)
Not applicable — this is a backend logic and test coverage fix.
Checklist
Adds the missing 14-day streak milestone.
Updates include:
"14-Day Streak"milestone inbackend/utils/streakTracker.js.