Skip to content

feat(leaderboard): add advanced filters, sorting, and server-side pagination#3010

Open
Aryanshravan wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
Aryanshravan:feat/leaderboard-filters-pagination
Open

feat(leaderboard): add advanced filters, sorting, and server-side pagination#3010
Aryanshravan wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
Aryanshravan:feat/leaderboard-filters-pagination

Conversation

@Aryanshravan

Copy link
Copy Markdown
Contributor

PR Description
This PR implements Issue #2981 end to end for the leaderboard with URL-driven filtering and scalable server responses.

What was done:

Added a reusable leaderboard query engine for parsing and validating page, limit, sort, range, and scope inputs.
Implemented server-side sorting and pagination so the API now returns paginated items with pagination metadata.
Added time-range aware leaderboard generation using 7d, 30d, 90d, and all-time query ranges.
Updated cache strategy to use range andscope specific cache keys, including memory and shared cache behavior.
Kept leaderboard metric views available while introducing query-based response shaping.
Updated the leaderboard page UI to support:
Sort controls (score, streak, commits, PRs)
Range controls (7d, 30d, 90d, all time)
Row limit controls (10, 25, 50)
URL-synced state persistence
Server-driven previous and next pagination controls
Result summary showing current slice and total count
Added focused tests for:
Query parsing defaults and validation
Sorting and pagination behavior
Range date calculation logic

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) type:bug GSSoC type bonus: bug fix type:performance GSSoC type bonus: performance (+15 pts) and removed gssoc26 GSSoC 2026 contribution labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

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

@github-actions github-actions Bot added the gssoc26 GSSoC 2026 contribution label Jul 2, 2026
@Priyanshu-byte-coder

Copy link
Copy Markdown
Owner

New feature/UI PRs are on hold during the code-quality sprint — see discussion #2651. We'll revisit this after the sprint; meanwhile tests, refactors, and bug-fix PRs are very welcome. Also note CI is currently red (5 failing checks).

@Priyanshu-byte-coder

Copy link
Copy Markdown
Owner

The leaderboard filters/sorting/server-side pagination is a useful direction, but CI is red: Type check and Build both fail (which also fails the smoke + visual runs). Please fix the type/build errors, get pnpm type-check && pnpm build green locally, and push — then I'll review the pagination logic.

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 type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants