Skip to content

Conversation

@bigjoefilms
Copy link

Closes #161
Implement streak tracking with persistence and frontend context
Body
add daily streak entity + service with timezone-safe updates and duplicate-day guard
expose /streaks and /streaks/update endpoints with optional timezone input
introduce StreakProvider/useStreak on frontend and wire streak page to live data
Test Plan
BE: call POST /streaks/update twice same day → no double increment
BE: call POST /streaks/update on consecutive days (or simulate via date headers) → streak increments; skip a day → resets to 1
FE: load /streak with valid token → weekly calendar matches backend streakDates; streak count shows current
FE: trigger updateStreak() after completing daily quest → streak count updates without page reload

Copy link
Member

@phertyameen phertyameen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your local endpoint is active yet frontend is having a CORS error. Look into it please.

Image

@phertyameen
Copy link
Member

@bigjoefilms Please resolve conflict.

And also, checkout CONTRIBUTING.md for build test to run so as to have a green cicd check

@bigjoefilms
Copy link
Author

@phertyameen

@phertyameen
Copy link
Member

@bigjoefilms all those tests have to pass locally before your cicd pass

@phertyameen
Copy link
Member

@bigjoefilms I have inspected your failed tests. It seems you have a frontend type unsafe issue and your issue has nothing to do with frontend. To ba absolutely safe, please, close this pr (and your branch if you cant control the changes in it), resync your main to the actual mindblocks main, create a fresh branch and redo the issue. I assure you, this might be easier. I will be glad to assist where you are stuck.

@A6dulmalik
Copy link
Member

@bigjoefilms I'm afraid this PR can't be merged without resolving the fixes and reverting the changes made to the frontend files.
Kindly respond with the corrections or we'll be forced to unassign.

Thank you.

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.

Implement Daily Streak Tracking System (Logic + Persistence)

3 participants