Skip to content

[FEATURE] Add Cursor-Based Pagination #170

Description

@JoshuaAFerguson

Objective

Replace offset pagination with cursor-based pagination for better performance.

Implementation

type PaginatedResponse struct {
    Data   []Session `json:"data"`
    Cursor string    `json:"next_cursor,omitempty"`
    Total  int       `json:"total"`
}

// GET /sessions?cursor=eyJ...&limit=50

Benefits

  • Consistent results (no duplicates/missing items)
  • Better performance for large datasets
  • Works with real-time data

Acceptance Criteria

  • All list endpoints support cursor pagination
  • Backward compatible with offset pagination
  • Documentation updated
  • UI updated

Files

  • api/internal/pagination/cursor.go (NEW)
  • All list handler files

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions