Skip to content

fix: always show pagination token when more results exist#76

Merged
designcode merged 6 commits intomainfrom
fix/always-show-pagination-hint
Apr 8, 2026
Merged

fix: always show pagination token when more results exist#76
designcode merged 6 commits intomainfrom
fix/always-show-pagination-hint

Conversation

@designcode
Copy link
Copy Markdown
Collaborator

@designcode designcode commented Apr 8, 2026

Summary

  • Remove the isPaginated gate from pagination output — the token and stderr hint now appear whenever the server returns more results, even without --limit/--page-token
  • This means if a bucket has >1000 objects and you run tigris objects list, you'll see the pagination token instead of silently truncating

Test plan

  • npm run build and npm test pass (542 tests)
  • tigris objects list 1760458746418 --prefix test/ — shows token hint without --limit
  • tigris objects list 1760458746418 --prefix test/ --limit 5 — still works as before

🤖 Generated with Claude Code


Note

Medium Risk
Behavior changes across multiple listing commands and upgrades @tigrisdata/storage to a new major version, which could subtly affect pagination and fork/snapshot response shapes.

Overview
This PR makes list-style commands always use formatPaginatedOutput and always print the printPaginationHint when the backend returns a paginationToken, even if the user did not pass --limit/--page-token (e.g., ls, objects list, access-keys list, iam policies list, buckets list, snapshots list).

It updates bucket fork detection to match the new storage API shape (using forkInfo.hasChildren/forkInfo.parents instead of hasForks/sourceBucketName) and updates snapshots list to the new paginated response structure. CLI specs are extended to document --limit/--page-token for ls and snapshots list, and @tigrisdata/storage is bumped to ^3.0.0.

Reviewed by Cursor Bugbot for commit 32ee29a. Bugbot is set up for automated code reviews on this repo. Configure here.

designcode and others added 2 commits April 8, 2026 18:39
Remove the isPaginated gate from output decisions. The pagination token
and hint are now shown whenever the response indicates more items exist,
regardless of whether --limit or --page-token were explicitly passed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The ls command also uses list() and listBuckets() from the SDK but was
missing pagination flags and token display.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
designcode and others added 4 commits April 8, 2026 18:50
Always use formatPaginatedOutput so JSON output is consistently
{ "items": [...] } with optional paginationToken, rather than switching
between a bare array and wrapped object based on server response.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The storage SDK now supports pagination in listBucketSnapshots. Update
the snapshots list command to accept --limit and --page-token flags and
display the pagination token when more results exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The updated @tigrisdata/storage SDK replaced hasForks and
sourceBucketName with forkInfo.hasChildren and forkInfo.parents[].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 32ee29a. Configure here.

@designcode designcode merged commit c080ce0 into main Apr 8, 2026
3 checks passed
@designcode designcode deleted the fix/always-show-pagination-hint branch April 8, 2026 18:39
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

🎉 This PR is included in version 2.16.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants