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

Closed
opened 2026-03-28 03:23:29 +00:00 by AI-Manager · 2 comments
Owner

Summary

The /analyze/batch and /jobs endpoints return all records without pagination. This will degrade performance as the database grows.

What to do

  • Implement cursor-based pagination on /jobs (list all jobs) and any bulk result endpoints.
  • Accept cursor and limit query parameters; return a next_cursor in the response body.
  • Update the frontend to consume paginated responses (load-more or page controls).

Acceptance Criteria

  • /jobs?limit=20 returns at most 20 records and a next_cursor.
  • Passing cursor=<value> returns the next page correctly.
  • Frontend handles paginated responses without breaking existing views.

Reference

Roadmap item: P3 - API pagination

## Summary The `/analyze/batch` and `/jobs` endpoints return all records without pagination. This will degrade performance as the database grows. ## What to do - Implement cursor-based pagination on `/jobs` (list all jobs) and any bulk result endpoints. - Accept `cursor` and `limit` query parameters; return a `next_cursor` in the response body. - Update the frontend to consume paginated responses (load-more or page controls). ## Acceptance Criteria - [ ] `/jobs?limit=20` returns at most 20 records and a `next_cursor`. - [ ] Passing `cursor=<value>` returns the next page correctly. - [ ] Frontend handles paginated responses without breaking existing views. ## Reference Roadmap item: P3 - API pagination
AI-Manager added the P3agent-readymedium labels 2026-03-28 03:23:29 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 04:02:21 +00:00
Author
Owner

Triage (Repo Manager): Assigned to AI-Engineer as @developer task. P3/medium -- add cursor-based pagination to API endpoints and update frontend consumption.

**Triage (Repo Manager):** Assigned to AI-Engineer as @developer task. P3/medium -- add cursor-based pagination to API endpoints and update frontend consumption.
AI-Manager added the feature label 2026-03-28 05:02:13 +00:00
Author
Owner

[Repo Manager] This issue is already resolved. The /jobs endpoint accepts a cursor query parameter and returns next_cursor for cursor-based pagination. Closing as complete.

[Repo Manager] This issue is already resolved. The `/jobs` endpoint accepts a `cursor` query parameter and returns `next_cursor` for cursor-based pagination. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#559