Improve leaderboard pagination to preserve loaded users during real-time updates (Issue #227)#271
Conversation
…ime updates (Issue indresh404#227) Prevent real-time listener from resetting paginated data. When initial leaderboard updates fire, update only the first batch of users while preserving any data loaded via pagination. This ensures that users retain their pagination state while still seeing real-time rank updates for the top 50. Changes: - Modify real-time listener to merge initial batch with existing paginated data - Preserve all users loaded beyond the first 50 when updating from real-time listener - Prevent O(N) list resets during routine real-time updates Fixes indresh404#227
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Suggested LabelsFor maintainer review and categorization:
Improves leaderboard pagination to preserve loaded users during real-time updates. |
|
Solve Merge Conflict |
Merge conflict in src/pages/GitRank.jsx resolved by maintaining the improved pagination logic that: - Properly ranks initial batch of users - Preserves paginated data beyond first 50 items - Sets up pagination cursors correctly This ensures loaded users are preserved during real-time updates while maintaining correct pagination behavior. Related: indresh404#227
|
Hi @indresh404, I've resolved the merge conflict in this PR. The conflict in Changes Preserved:
Why This Matters: Branch Status:
The branch is ready for review and merging. Closes #227 |
|
If your PR still shows the old failed Vercel check, please rebase (or merge the latest main branch into your branch) and push again to trigger a fresh deployment/check run. |
Summary
Prevent real-time listener from resetting paginated data. When initial leaderboard updates fire, update only the first batch of users while preserving any data loaded via pagination. This ensures that users retain their pagination state while still seeing real-time rank updates for the top 50.
Changes
Testing
Type of Change
Contributor Declaration
This contribution is original work and I have the right to contribute this code to the project. I understand that the project is licensed under its respective license and my contributions will be available under the same license terms.
Closes #227