Skip to content

fix(leaderboard): evict deleted users from cached leaderboard results#1613

Closed
mallya-m wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
mallya-m:fix/leaderboard-cache-eviction-934
Closed

fix(leaderboard): evict deleted users from cached leaderboard results#1613
mallya-m wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
mallya-m:fix/leaderboard-cache-eviction-934

Conversation

@mallya-m

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes deleted users appearing in the leaderboard indefinitely. Cached results are now filtered against current public users in Supabase before serving.

Related issue

Closes #934

Changes made

  • Added filterDeletedUsers() that cross-references cached usernames against current public users in DB
  • Applied to both memory cache and distributed cache hits
  • Re-ranks remaining entries after filtering
  • Also fixes pre-existing build error: missing bio field in public-profile-data.ts

How to test

  1. Have a user on the leaderboard
  2. Set their is_public = false in Supabase
  3. Leaderboard no longer shows them without server restart

@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

@mallya-m is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix labels May 30, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@mallya-m mallya-m force-pushed the fix/leaderboard-cache-eviction-934 branch from 228f5dd to 40e34a8 Compare May 30, 2026 08:55
@Priyanshu-byte-coder

Copy link
Copy Markdown
Owner

Closing — superseded by PR #1616 which includes the same leaderboard changes plus additional improvements to GoalTracker and other components. Please follow the discussion on #1616.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Leaderboard cache never evicts entries for users who delete their account

2 participants