Repository navigation
Paginate leaderboard; cache rows instead of rendered page - #43
Merged
Merged
Conversation
Ymax27
approved these changes
Oct 19, 2026
Owner
|
Merged 🎉 Thanks a lot @Hitesh-XS, this is a really solid first PR: stable ordering, rank offset, country filter kept in the links, safe page parsing and a thorough test. And thanks for switching the leaderboard to row-level caching, that fixes the leaderboard half of #38 👏 — Max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22
What i did here:
Paginates the leaderboard so contributors ranked #51+ are reachable.
Changes
LEADERBOARD_PAGE_SIZE = 50(explore'sPAGE_SIZEis untouched).("-total", "pk")so ranking is stable across pages._issue_list.html(without the HTMX attributes, since this is a full-page view).?country=is preserved in every page link.test_leaderboard_paginationcovering page 1 (hero, order), page 2 (no hero, rank offset), bad page numbers, and country filter persistence in page links.Testing
pytest core/tests.py: 28 passed.