fix: display pagination cursors in all list commands#218
Merged
Conversation
Previously, pagination cursors (next/prev) were not displayed to users in CLI output, even though they were available in the API responses. This made it impossible to paginate through large result sets. Changes: - Created pkg/cmd/pagination_output.go with helper functions: - printPaginationInfo() for text output - marshalListResponseWithPagination() for JSON output - Updated all 8 list commands to display pagination info: - event list - request list - attempt list - transformation list - transformation executions - connection list - source list - destination list - Fixed JSON output to always include pagination metadata (previously returned [] for empty results) - Updated test helper functions to handle new JSON response format - Added comprehensive pagination acceptance tests for: - event list (TestEventListPaginationWorkflow) - request list (TestRequestListPaginationWorkflow) - attempt list (TestAttemptListPaginationWorkflow) - Updated TestEventListJSON to verify pagination metadata Fixes #216
…de/worktrees/ - Update TestRootConnectionAliasWorks to use ConnectionListResponse struct - Add .gitignore entry for .claude/worktrees/ temporary directories 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With 203 acceptance tests, the suite needs more than 10 minutes to complete. Increasing timeout to 20m to prevent premature failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Test was expecting old array format [] but transformation list now returns the new pagination response format with models and pagination. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
Fixes #216
Previously, pagination cursors (next/prev) were not displayed to users in CLI output, even though they were available in the API responses. This made it impossible to paginate through large result sets (limit of 255 items).
This PR adds pagination cursor display to all list commands in both text and JSON output formats.
Changes
New Helper Functions (
pkg/cmd/pagination_output.go)printPaginationInfo()- displays pagination cursors in text outputmarshalListResponseWithPagination()- includes pagination metadata in JSON outputUpdated Commands
Applied pagination display to all 8 list commands:
event listrequest listattempt listtransformation listtransformation executionsconnection listsource listdestination listJSON Output Changes
[]{"models": [...], "pagination": {...}}Text Output Changes
When pagination cursors exist, displays:
Test Updates
TestEventListPaginationWorkflowTestRequestListPaginationWorkflowTestAttemptListPaginationWorkflowTestEventListJSONto verify pagination metadataTest Plan