Skip to content

[Feature Request]: Add pagination or infinite scroll to list/feed views to handle large data sets gracefully #499

Description

@prince-pokharna

Summary

List or feed views in Riveto currently appear to load all data at once without pagination or infinite scroll. As the data volume grows, this will cause significant performance degradation — slow load times, memory bloat, and poor user experience on mobile or low-bandwidth connections.

Problem

  • All items in list views are fetched and rendered in a single request/render cycle.
  • There is no pagination UI (page numbers, "Load More" button) or infinite scroll behavior.
  • On large datasets, the initial page load time will grow proportionally with the data size.
  • Mobile users on slower connections are particularly impacted as the full payload must download before anything is visible.

Impact

  • Page load performance degrades linearly as content grows — this is a scalability time bomb.
  • Poor first-meaningful-paint times on large lists hurt SEO and user retention.
  • Without pagination, API/database query costs grow unbounded.

Proposed Solution

Option A — Server-side pagination (recommended for SEO and initial load performance):

  1. Update API routes to accept page and limit query parameters.
  2. Implement OFFSET/LIMIT in Prisma queries.
  3. Add page navigation UI with "Previous / Next" buttons and a current page indicator.

Option B — Cursor-based pagination with infinite scroll (better UX for feed-style views):

  1. Use an Intersection Observer to detect when the user scrolls near the bottom of the list.
  2. Fetch the next page using a cursor (after parameter) when the sentinel element becomes visible.
  3. Append new results to the existing list without a full re-render.

I will implement Option A for the initial PR (simpler, more maintainable) with a note on upgrading to cursor-based pagination in the future.

Additional Notes

  • I will update both the API route and the UI component for at least one major list view as a reference implementation.
  • Could you assign this to me?

Labels: enhancement, feature, performance, GSSoC 2026

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions