Skip to content

Fix/streak milestone toast property - #2289

Merged
KaranUnique merged 1 commit into
Canopus-Labs:O-Authfrom
Suprita736:fix/streak-milestone-toast-property
Aug 31, 2026
Merged

Fix/streak milestone toast property#2289
KaranUnique merged 1 commit into
Canopus-Labs:O-Authfrom
Suprita736:fix/streak-milestone-toast-property

Conversation

@Suprita736

Copy link
Copy Markdown
Contributor

📝 Pull Request Description

Related Issue

Closes #2288

Summary

Fix streak milestone notifications that were not being propagated after flashcard reviews and sheet-progress saves.

recordActivity() returns newlyUnlockedMilestones, but the affected controllers were still reading the old newlyUnlocked property. This caused newlyUnlockedAchievements to be empty or undefined even when a milestone was unlocked.

This PR:

  • Updates the flashcard review flow to use newlyUnlockedMilestones.
  • Updates the sheet-progress flow and retry path to use newlyUnlockedMilestones.
  • Adds regression test coverage for the corrected milestone propagation.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature
  • ♻️ Refactoring
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • 🔥 Other(please describe) ______

How Has This Been Tested?

  • Added/updated regression tests for streak milestone propagation.
  • Verified that newly unlocked milestones are correctly passed as newlyUnlockedAchievements.
  • Verified the sheet-progress retry path uses the updated property.
  • Ran the relevant backend unit tests successfully.

Screenshots (if applicable)

Not applicable — this is a backend data-flow fix.


Checklist

  • My code follows the project's guidelines
  • I have tested my changes
  • I have updated documentation where necessary
  • I have linked the related issue
  • My changes do not introduce new warnings or errors

@github-actions

Copy link
Copy Markdown

Thank you for submitting your pull request, @Suprita736! 🙌
We'll review it as soon as possible.
If there are any specific instructions or feedback regarding your PR, we'll provide them here.
Thanks again for your contribution to our project! 😊

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 39 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 469c2c5a-f3f7-45f0-80c7-3b890c6d4757

📥 Commits

Reviewing files that changed from the base of the PR and between 420348a and 76ef7fb.

📒 Files selected for processing (9)
  • backend/controllers/flashcardController.js
  • backend/controllers/googleCalendarController.js
  • backend/controllers/userSheetProgressController.js
  • backend/models/User.js
  • backend/routes/googleCalendarRoutes.js
  • backend/server.js
  • backend/tests/googleCalendarController.unit.test.js
  • backend/tests/interviewExperienceController.unit.test.js
  • backend/tests/userSheetProgressController.unit.test.js

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the merge ready PR is mergeable and has no conflicts label Aug 30, 2026
@KaranUnique
KaranUnique changed the base branch from main to O-Auth August 31, 2026 15:11
@KaranUnique
KaranUnique merged commit 557eb03 into Canopus-Labs:O-Auth Aug 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Streak milestone toasts never fire due to property mismatch

2 participants