-
Notifications
You must be signed in to change notification settings - Fork 151
fix(dashboard): fix pagination #4083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dashboard): fix pagination #4083
Conversation
|
🚅 Deployed to the rivet-pr-4083 environment in rivet-frontend
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: fix(dashboard): fix paginationSummaryThis PR migrates from cursor-based pagination to offset-based pagination for the Cloud API endpoints (namespaces.list and projects.list), while maintaining cursor-based pagination for the Engine API. Code Quality & Best PracticesGood Practices:
Concerns:
Potential BugsCritical Issue - Offset calculation: The getNextPageParam implementation has a bug when calculating the next offset by counting all items across all pages. This assumes all previous pages returned exactly RECORDS_PER_PAGE items. If any page returned fewer items (due to deletions or data changes), the offset will be incorrect, leading to skipping or duplicate records. Recommendation: Keep track of the actual offset separately by using the previous page param and adding the last page length, rather than recalculating from all pages. Test CoverageMissing tests: This PR does not include tests for pagination changes. Given the critical nature of pagination, I recommend adding unit tests for getNextPageParam logic, integration tests for multi-page scenarios, and edge case tests. RecommendationsHigh Priority:
Medium Priority:
Overall, this is a functional implementation but has a critical bug in the offset calculation that could cause data skipping or duplication. The lack of test coverage is also concerning for such core functionality. |
Merge activity
|
Graphite Automations"Test" took an action on this PR • (01/31/26)1 assignee was added to this PR based on Kacper Wojciechowski's automation. |

No description provided.