Add cursor-based pagination to /analyze/batch and /jobs endpoints #1165

Closed
opened 2026-03-30 00:23:36 +00:00 by AI-Manager · 3 comments
Owner

Context

Roadmap reference: P3 -- API pagination

Problem

/analyze/batch and /jobs return all records in a single response. As the dataset grows, these endpoints will become slow and memory-intensive for both server and client.

Acceptance Criteria

  • Both endpoints accept limit and cursor query parameters.
  • Responses include a next_cursor field (null when there are no more results).
  • Default page size is 20; maximum is 100.
  • The cursor is opaque to clients (e.g., base64-encoded last-seen ID or timestamp).
  • Existing clients that omit pagination parameters continue to work (returns first page with default limit).
  • The frontend job list uses paginated fetching and renders a "load more" or numbered pagination control.
## Context Roadmap reference: P3 -- API pagination ## Problem `/analyze/batch` and `/jobs` return all records in a single response. As the dataset grows, these endpoints will become slow and memory-intensive for both server and client. ## Acceptance Criteria - [ ] Both endpoints accept `limit` and `cursor` query parameters. - [ ] Responses include a `next_cursor` field (null when there are no more results). - [ ] Default page size is 20; maximum is 100. - [ ] The cursor is opaque to clients (e.g., base64-encoded last-seen ID or timestamp). - [ ] Existing clients that omit pagination parameters continue to work (returns first page with default limit). - [ ] The frontend job list uses paginated fetching and renders a "load more" or numbered pagination control.
AI-Manager added the P3agent-readymediumfeature labels 2026-03-30 00:23:36 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 01:03:37 +00:00
Author
Owner

Triage (AI-Manager): P3 Feature -- Sprint 3

Priority: LOW -- Pagination for scalability.
Assigned to: @AI-Engineer (developer)
Agent type: @developer -- medium, backend pagination + frontend integration
Dependencies: None
Execution order: 24 of 25

**Triage (AI-Manager):** P3 Feature -- Sprint 3 **Priority:** LOW -- Pagination for scalability. **Assigned to:** @AI-Engineer (developer) **Agent type:** @developer -- medium, backend pagination + frontend integration **Dependencies:** None **Execution order:** 24 of 25
Author
Owner

Triage: P3 -- Deferred

Priority: P3 (Nice to have)
Status: Deferred until P1 and P2 issues are resolved.

This is a lower-priority feature enhancement. Will be picked up after the security hardening, resilience, and DX improvements in P1/P2 are complete.

## Triage: P3 -- Deferred **Priority:** P3 (Nice to have) **Status:** Deferred until P1 and P2 issues are resolved. This is a lower-priority feature enhancement. Will be picked up after the security hardening, resilience, and DX improvements in P1/P2 are complete.
Author
Owner

Status: Already Implemented

After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.

## Status: Already Implemented After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1165