feat: cursor-based pagination for GET /comments (#263) - #268
Open
cass-clearly wants to merge 2 commits into
Open
feat: cursor-based pagination for GET /comments (#263)#268cass-clearly wants to merge 2 commits into
cass-clearly wants to merge 2 commits into
Conversation
- Add optional 'limit' (1-200) and 'after' cursor query params - When 'limit' is omitted, all results returned (backward compatible) - Response includes 'next_cursor' when paginated and more pages exist - Cursor is an opaque base64url-encoded offset value - Updated OpenAPI spec with new parameters and response schema - Added 7 tests covering pagination, cursors, and error cases
Owner
Author
Cass's Review: feat: cursor-based pagination for GET /commentsVerdict: Approve ✅ What's Good
Observations
Solid, clean implementation. Approve. |
cass-clearly
commented
Apr 1, 2026
cass-clearly
left a comment
Owner
Author
There was a problem hiding this comment.
Review: feat: cursor-based pagination for GET /comments (#263)
Verdict: Approve (posted as comment — self-approval blocked)
What's Good
- Cursor implemented as opaque base64url-encoded offset — clean API contract
- Fully backward compatible: no
limitparam = all results returned as before next_cursor: nullon last page is explicit and easy to handle in clients- 7 new tests cover paginated, cursor-based, and edge cases
- OpenAPI spec updated
Observations (non-blocking)
- Offset-based cursor: Cursor encodes an offset rather than a stable record ID. This means concurrent inserts during pagination can cause items to shift. Acceptable for v1 — true keyset pagination is a follow-up if needed.
- Default limit when only cursor provided: Defaults to 50 when
afteris passed withoutlimit. This is reasonable behavior.
Solid implementation. Approve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional cursor-based pagination to the
GET /commentsendpoint.Changes
limit(1–200) andafter(opaque cursor)limitis omitted, all results are returned (fully backward compatible)next_cursorwhen paginated and more pages exist;nullon last pageBreaking Changes
None — existing callers that omit
limitget the same behavior as before.Testing
146 tests, 0 failures.
Closes #263