Skip to content

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Jan 31, 2026

No description provided.

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4083 January 31, 2026 01:57 Destroyed
@railway-app
Copy link

railway-app bot commented Jan 31, 2026

🚅 Deployed to the rivet-pr-4083 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web Jan 31, 2026 at 2:06 am
website ✅ Success (View Logs) Web Jan 31, 2026 at 2:01 am
frontend-inspector ✅ Success (View Logs) Web Jan 31, 2026 at 2:00 am
mcp-hub ✅ Success (View Logs) Web Jan 31, 2026 at 1:58 am

Copy link
Contributor Author

jog1t commented Jan 31, 2026

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.
Learn more


How to use the Graphite Merge Queue

Add 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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 31, 2026

More templates

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4083

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4083

@rivetkit/db

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/db@4083

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4083

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4083

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4083

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4083

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4083

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4083

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4083

commit: b650c8f

@claude
Copy link

claude bot commented Jan 31, 2026

PR Review: fix(dashboard): fix pagination

Summary

This 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 Practices

Good Practices:

  • Clean separation of concerns between Cloud and Engine pagination strategies
  • Proper type safety with TypeScript
  • Consistent use of RECORDS_PER_PAGE constant

Concerns:

  1. Dummy pagination object (cloud-data-provider.tsx:117): Creating a dummy pagination object that does not match the API response could be confusing. Consider removing the pagination field or documenting why needed.

  2. Missing type assertion safety (lines 113, 147): The code assumes pageParam is always a valid numeric string. Consider adding validation.

  3. Code duplication: The getNextPageParam logic is duplicated. Consider extracting into a shared helper function.

Potential Bugs

Critical 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 Coverage

Missing 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.

Recommendations

High Priority:

  • Fix the offset calculation bug in getNextPageParam
  • Add validation for pageParam parsing

Medium Priority:

  • Add test coverage for pagination logic
  • Extract duplicated getNextPageParam logic into a helper
  • Add explanatory comments for the dummy pagination object

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.

@jog1t jog1t marked this pull request as ready for review January 31, 2026 02:06
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 31, 2026

Merge activity

  • Jan 31, 2:06 AM UTC: jog1t added this pull request to the Graphite merge queue.
  • Jan 31, 2:06 AM UTC: CI is running for this pull request on a draft pull request (#4084) due to your merge queue CI optimization settings.
  • Jan 31, 2:07 AM UTC: Merged by the Graphite merge queue via draft PR: #4084.

graphite-app bot pushed a commit that referenced this pull request Jan 31, 2026
@graphite-app graphite-app bot closed this Jan 31, 2026
@graphite-app graphite-app bot deleted the 01-31-fix_dashboard_fix_pagination branch January 31, 2026 02:07
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 31, 2026

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.

jog1t added a commit that referenced this pull request Jan 31, 2026
jog1t added a commit that referenced this pull request Jan 31, 2026
* Revert "fix(dashboard): fix pagination (#4083)"

This reverts commit 337e20b.

* chore: add PR template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant