Skip to content

Conversation

@mircealungu
Copy link
Member

Summary

  • Add daily_streak column to user table (INT, default 0)
  • Maintain streak in update_last_seen_if_needed(): consecutive days increment, gaps reset to 1
  • New GET /daily_streak endpoint returns the stored streak value
  • Migration: 26-01-27--add_daily_streak.sql

Test plan

  • Run migration on local DB
  • Verify GET /daily_streak returns 0 for existing users
  • Verify streak increments to 1 on first visit
  • Verify streak increments on consecutive daily visits
  • Verify streak resets to 1 after a gap

🤖 Generated with Claude Code

Add daily_streak column to user table and maintain it in
update_last_seen_if_needed(). Consecutive days increment the
streak; gaps reset it to 1. New GET /daily_streak endpoint
returns the stored value.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Jan 28, 2026

ArchLens detected architectural changes in the following views:
diff
diff

Add method and endpoint to count total exercises completed this week,
replacing the previous distinct-words-practiced metric.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mircealungu mircealungu merged commit b116968 into master Jan 28, 2026
3 checks passed
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.

2 participants