Skip to content

feat: add leaderboard filtering by language and time range#1734

Open
ni2-vsv11 wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
ni2-vsv11:feat/leaderboard-filters
Open

feat: add leaderboard filtering by language and time range#1734
ni2-vsv11 wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
ni2-vsv11:feat/leaderboard-filters

Conversation

@ni2-vsv11
Copy link
Copy Markdown
Contributor

Summary

Implements leaderboard filtering by language and time range for the DevTrack leaderboard.

Features Added

  • Language dropdown filtering

  • Time range filtering:

    • This Week
    • This Month
    • All Time
  • URL query parameter synchronization

  • localStorage persistence for filters

  • Clear filters functionality

  • Mobile responsive filter UI

  • Filter-aware leaderboard API query handling

  • Defensive filtering for missing language data

API Updates

Supports leaderboard queries like:

/api/leaderboard?lang=python&period=month

Screenshots

image

Verification

Tested:

  • /leaderboard
  • /leaderboard?lang=python
  • /leaderboard?tab=commits&period=month
  • /leaderboard?tab=streak&lang=typescript

Verified:

  • rankings render correctly
  • filters update without page reload
  • URL reflects active filters
  • leaderboard remains stable
  • mobile responsiveness works
  • npm run lint passes

Notes

Local development database currently contains only one public leaderboard user, so local filtered leaderboard views may show limited results. The filtering system itself works correctly against the available dataset.

Closes #1045

Copilot AI review requested due to automatic review settings May 31, 2026 08:58
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@ni2-vsv11 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:feature GSSoC type bonus: new feature labels May 31, 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

@ni2-vsv11 ni2-vsv11 force-pushed the feat/leaderboard-filters branch from 2ced2aa to 6762d30 Compare May 31, 2026 09:31
@github-actions github-actions Bot added the type:testing GSSoC type bonus: tests (+10 pts) label May 31, 2026
@ni2-vsv11
Copy link
Copy Markdown
Contributor Author

@Priyanshu-byte-coder

Implemented the requested leaderboard filtering feature for #1045 and completed all requested functionality:

✅ Language dropdown filtering
✅ Time range filtering (Week / Month / All Time)
✅ URL query parameter synchronization
✅ localStorage persistence
✅ Clear filters support
✅ Mobile responsive filter UI
✅ Filter-aware leaderboard API handling
✅ Defensive handling for missing language data

Also resolved upstream merge/rebase conflicts and fixed the related Playwright strict-mode test issue to ensure CI passes cleanly.

Verification completed successfully:

  • Build ✅
  • Lint ✅
  • Typecheck ✅
  • Playwright E2E ✅

Would appreciate a review and merge when convenient.

@Priyanshu-byte-coder Priyanshu-byte-coder added level2 GSSoC Level 2 - Medium complexity (25 points) gssoc:approved GSSoC: PR approved for scoring labels May 31, 2026
@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR has developed merge conflicts after recent merges to main. Please rebase onto the latest main branch, resolve all conflicts, and force-push. Once the PR is conflict-free it will be reviewed for merging.

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

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level2 GSSoC Level 2 - Medium complexity (25 points) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: leaderboard filtering by language and time range

2 participants