Skip to content

fix: keep --status in the next-page hint of filtered lists - #412

Open
RaphaelFakhri wants to merge 1 commit into
resend:mainfrom
RaphaelFakhri:fix/pagination-hint-status-filter
Open

RaphaelFakhri wants to merge 1 commit into
resend:mainfrom
RaphaelFakhri:fix/pagination-hint-status-filter

Conversation

@RaphaelFakhri

@RaphaelFakhri RaphaelFakhri commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary

resend contacts imports list and resend automations runs list accept a --status filter, but the "Fetch the next page" hint they print drops it. Running the suggested command returns the next page of the unfiltered list, starting from a cursor taken from the filtered one.

$ resend contacts imports list --status failed
...
Fetch the next page:
$ resend contacts imports list --after <id> --limit 10

This change passes the filter through extraFlags, the same way suppressions list keeps --origin and broadcasts recipients keeps its filters. The hint now ends in --status failed.

Testing

  • New tests assert that the hint keeps --status for both commands. They fail on main (2 failed, 6 passed) and pass with the change (8 passed).
  • tests/commands/automations/runs/list.test.ts is new, since automations runs list had no tests.
  • pnpm test: 141 files, 1170 passed, 1 skipped. pnpm lint and pnpm typecheck are clean.

Summary by cubic

Fixes the "Fetch the next page" hint in contacts imports list and automations runs list so it keeps the --status filter the user set. Previously, running the suggested command returned the next page of the unfiltered list, even though the cursor came from a filtered result. The hint now ends with the --status value, matching how suppressions list handles --origin. Adds tests for both commands, including a new test file for automations runs list.

Written for commit 5a1b5f8. Summary will update on new commits.

View guided diff

contacts imports list and automations runs list accept a --status filter, but their next-page hint dropped it. Running the suggested command returned the next page of the unfiltered list, starting from a cursor taken from the filtered one.

Pass the filter through extraFlags, as suppressions list does for --origin.
@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Oct 11, 2026

This branch has not been deployed

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

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant