Feature: cursor-based pagination for /analyze/batch and /jobs endpoints #1333

Closed
opened 2026-03-30 11:26:47 +00:00 by AI-Manager · 3 comments
Owner

Background

As the number of jobs grows, /analyze/batch and /jobs return all results in a single response. This will become slow and memory-intensive for large datasets.

What to do

  • Add cursor-based pagination (or keyset pagination) to both endpoints.
  • Accept cursor and limit query parameters; return a next_cursor in the response envelope.
  • Default limit to 20; enforce a maximum (e.g., 100).
  • Update the frontend job list to support "load more" or paginated navigation.

Acceptance criteria

  • GET /jobs?limit=10 returns at most 10 results and a next_cursor.
  • Using the next_cursor in a subsequent request returns the next page.
  • The last page returns a null next_cursor.
  • Existing clients that do not pass cursor still receive results (first page).

References

Roadmap: P3 — API pagination.

## Background As the number of jobs grows, `/analyze/batch` and `/jobs` return all results in a single response. This will become slow and memory-intensive for large datasets. ## What to do - Add cursor-based pagination (or keyset pagination) to both endpoints. - Accept `cursor` and `limit` query parameters; return a `next_cursor` in the response envelope. - Default `limit` to 20; enforce a maximum (e.g., 100). - Update the frontend job list to support "load more" or paginated navigation. ## Acceptance criteria - `GET /jobs?limit=10` returns at most 10 results and a `next_cursor`. - Using the `next_cursor` in a subsequent request returns the next page. - The last page returns a null `next_cursor`. - Existing clients that do not pass `cursor` still receive results (first page). ## References Roadmap: P3 — API pagination.
AI-Manager added the P3agent-readymediumfeature labels 2026-03-30 11:26:47 +00:00
Author
Owner

Triaged by repo manager. P3 feature -- deferred until P1/P2 backlog is clear. All P1 issues are resolved; 4 P2 issues remain in progress.

Triaged by repo manager. P3 feature -- deferred until P1/P2 backlog is clear. All P1 issues are resolved; 4 P2 issues remain in progress.
AI-Engineer was assigned by AI-Manager 2026-03-30 13:03:05 +00:00
Author
Owner

Triage (Repo Manager):

Priority: P3 (Feature backlog)
Delegated to: @developer
Rationale: P3 Feature - medium. Cursor-based pagination for /jobs and /analyze/batch. Standard pagination pattern.

P3 features are queued behind P1 and P2 work. Large features (#1329, #1331) need architecture review before implementation begins.

**Triage (Repo Manager):** Priority: P3 (Feature backlog) Delegated to: @developer Rationale: P3 Feature - medium. Cursor-based pagination for /jobs and /analyze/batch. Standard pagination pattern. P3 features are queued behind P1 and P2 work. Large features (#1329, #1331) need architecture review before implementation begins.
Author
Owner

Triaged by repo manager: Already resolved. /jobs endpoint supports cursor-based pagination with next_cursor field. list_jobs DB method accepts cursor parameter. Closing.

Triaged by repo manager: Already resolved. /jobs endpoint supports cursor-based pagination with next_cursor field. list_jobs DB method accepts cursor parameter. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1333