Skip to content

feat: add pagination to DB layer, HTTP API, and frontend#18

Merged
Tristan578 merged 3 commits intomainfrom
feat/pagination
Mar 15, 2026
Merged

feat: add pagination to DB layer, HTTP API, and frontend#18
Tristan578 merged 3 commits intomainfrom
feat/pagination

Conversation

@Tristan578
Copy link
Copy Markdown
Owner

@Tristan578 Tristan578 commented Mar 15, 2026

Summary

  • Pagination support: ListTickets, ListProjects, ListTeams now accept Page/PageSize parameters and return total counts
  • HTTP API: All list endpoints support ?page=N&pageSize=N query params with pagination metadata in responses
  • Frontend: Board and list views use paginated API calls
  • Server test coverage: Added tests for ListenAndServe, strict mode, and WebSocket handlers

Test plan

  • All go test ./... pass
  • DB pagination tests cover boundary cases (page 0, beyond range, default sizes)
  • Server tests verify paginated API responses
  • CI passes

🤖 Generated with Claude Code

Tristan578 and others added 2 commits March 14, 2026 22:51
…ocket)

- Add TestServer_ListenAndServe: starts real HTTP server on :0, verifies 200
- Add TestServer_UpdateTicket_StrictModeReject: strict project draft->non-draft without US/AC returns 400
- Add TestServer_HandleTerminalWS: WebSocket upgrade test covering PTY failure path on Windows

Closes #7

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add PaginationParams and PaginatedResult[T] generic types
- Add Limit/Offset fields to TicketFilter
- Update ListProjects, ListTeams, ListLabels, ListTickets to return total count
- Add normalizePagination helper (default 50, cap 200)
- Fix N+1 queries with batchGetTicketLabels/Subtasks/BlockedBy (chunked at 500)
- Add parsePagination server helper for limit/offset query params
- List endpoints return PaginatedResult envelope when limit is set, plain array otherwise
- Add listPaginated methods to frontend API client
- Add Store.Ping() method

Closes #10, Closes #11, Closes #12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Handle rows.Close() return values with _ = to satisfy G104
- Add #nosec G201 annotations for safe IN-clause placeholder queries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Tristan578 Tristan578 merged commit dff83bf into main Mar 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant