Skip to content

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

Merged
dielduarte merged 3 commits into
resend:mainfrom
RaphaelFakhri:fix/pagination-hint-status-filter
Oct 27, 2026
Merged

dielduarte merged 3 commits into
resend:mainfrom
RaphaelFakhri:fix/pagination-hint-status-filter

Conversation

@RaphaelFakhri

@RaphaelFakhri RaphaelFakhri commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Oct 11, 2026
RaphaelFakhri and others added 2 commits October 27, 2026 11:07
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.
A comma-separated value like "running, failed" was sent as-is and printed
unquoted in the next-page hint, so the suggested command split into two
shell arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dielduarte
dielduarte force-pushed the fix/pagination-hint-status-filter branch from 5a1b5f8 to cc97b7f Compare October 27, 2026 15:08
@dielduarte
dielduarte self-requested a review October 27, 2026 15:30
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dielduarte dielduarte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thank you!

@dielduarte
dielduarte merged commit c7837f0 into resend:main Oct 27, 2026
6 checks passed
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.

2 participants