Skip to content

fix: forward pagination params in API key picker and list command#220

Merged
felipefreitag merged 4 commits intomainfrom
fix/api-key-picker-pagination-1bca
Apr 14, 2026
Merged

fix: forward pagination params in API key picker and list command#220
felipefreitag merged 4 commits intomainfrom
fix/api-key-picker-pagination-1bca

Conversation

@bukinoshita
Copy link
Copy Markdown
Member

@bukinoshita bukinoshita commented Apr 9, 2026

Summary by cubic

Fixes pagination in the API key picker so you can revoke keys beyond the first page, and adds pagination flags to api-keys list for consistency and better navigation. Addresses BU-615.

  • Bug Fixes

    • Picker now forwards limit and after to resend.apiKeys.list() and preserves has_more, enabling interactive deletion of older keys.
    • Added tests to confirm pagination forwarding and behavior.
  • New Features

    • api-keys list now supports --limit, --after, and --before, forwards options to the SDK, and prints a pagination hint; default limit is 10.
    • Validates cursors and returns invalid_pagination if both --after and --before are provided.

Written for commit dfd9471. Summary will update on new commits.

cursoragent and others added 3 commits April 9, 2026 17:28
The API key picker config was ignoring the limit/after pagination
parameters passed by pickId() and hard-coding has_more to false. This
prevented the interactive picker from showing keys beyond the first
page, blocking revocation of older API keys.

Changes:
- apiKeyPickerConfig now forwards limit and after to resend.apiKeys.list()
  and preserves the SDK's has_more value
- api-keys list command now accepts --limit, --after, --before flags
  with pagination hints, matching other paginated list commands
- Added tests for picker config pagination forwarding
- Updated list tests to cover pagination flag handling

Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
@bukinoshita
Copy link
Copy Markdown
Member Author

@cubic-dev-ai can you review?

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented Apr 13, 2026

@cubic-dev-ai can you review?

@bukinoshita I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@bukinoshita bukinoshita marked this pull request as ready for review April 13, 2026 22:14
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@felipefreitag felipefreitag merged commit 5eb0ea6 into main Apr 14, 2026
7 checks passed
@felipefreitag felipefreitag deleted the fix/api-key-picker-pagination-1bca branch April 14, 2026 16:57
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.

3 participants