Skip to content

Add pagination for root tasks in Mage Voyance #107

Description

@yedidyakfir

Summary

Add pagination support for root tasks in the Mage Voyance app. When there are many root tasks, the UI should limit the number displayed per page and allow navigating between batches, with tasks ordered by date.

Features / Details

  • Server-side pagination: Add an API endpoint (or update existing) to return root tasks with limit and offset (or cursor-based) parameters, ordered by creation date (newest first)
  • Configurable page size: Define a max number of root tasks per page
  • Navigation controls: Add "Next" and "Previous" buttons to navigate between batches of root tasks
  • Date ordering: Root tasks must be returned ordered by date from the server

Use Cases

  • User opens the Voyance dashboard with hundreds of root tasks — only the most recent batch is loaded
  • User clicks "Next" to see older root tasks, "Previous" to go back to newer ones
  • System performance stays consistent regardless of total root task count

Implementation Considerations

  • Server should support limit + offset query parameters on the root tasks endpoint
  • Consider returning total count for UI indicators (e.g., "Page 2 of 15")
  • Disable "Previous" on first page and "Next" on last page
  • Default sort: newest first (descending by date)

Tasks

  • Add server-side endpoint/query support for paginated root tasks (limit, offset, order by date)
  • Return total root task count alongside paginated results
  • Add pagination state management in the Voyance frontend
  • Implement "Next" and "Previous" navigation buttons
  • Disable navigation buttons at boundaries (first/last page)
  • Test pagination with large datasets

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions