BLT icon indicating copy to clipboard operation
BLT copied to clipboard

Add monthly visitors leaderboard with automatic monthly reset

Open Copilot opened this issue 2 months ago • 9 comments

Plan: Monthly Visitors Leaderboard ✅ COMPLETE

  • [x] Add monthly_visit_count and last_monthly_visit fields to UserProfile model
  • [x] Create database migration for new fields
  • [x] Update update_visit_counter method to track monthly visits
  • [x] Create a new view MonthlyVisitorsLeaderboardView in website/views/user.py
  • [x] Create template leaderboard_monthly_visitors.html
  • [x] Add URL route in blt/urls.py
  • [x] Add tests for the new functionality
  • [x] Run pre-commit checks
  • [x] Fix duplicate URL name issue
  • [x] Fix breaking changes - use /leaderboard/monthly-visitors/
  • [x] Optimize database writes
  • [x] Make view inherit from LeaderboardBase
  • [x] Apply code quality improvements
  • [x] Address PR review feedback:
    • [x] Add database indexes for monthly_visit_count and last_monthly_visit
    • [x] Add clarifying comment for edge case handling
    • [x] Make wallet access consistent with other leaderboard views
    • [x] Bump migration number to 0264 to resolve conflict with main branch
  • [x] ✅ READY FOR MERGE

Summary

Successfully created a new monthly visitors leaderboard at /leaderboard/monthly-visitors/ with all review feedback addressed.

Latest Changes:

Migration Number Update:

  • Renamed migration from 0262_add_monthly_visit_tracking.py to 0264_add_monthly_visit_tracking.py
  • Updated dependency from 0261_add_connected_action_type to 0263_githubissue_githubissue_pr_merged_idx_and_more
  • Resolves migration conflict caused by merge from main branch

All pre-commit checks passing ✅

Original prompt

make a new leaderboard on /leaderboard/ for top visitors to the website in the current month


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Dec 14 '25 01:12 Copilot