fix: show copy-pasteable command in pagination hint#76
Open
devinscodebase wants to merge 7 commits intoresend:mainfrom
Open
fix: show copy-pasteable command in pagination hint#76devinscodebase wants to merge 7 commits intoresend:mainfrom
devinscodebase wants to merge 7 commits intoresend:mainfrom
Conversation
There was a problem hiding this comment.
2 issues found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/emails/receiving/attachments.ts">
<violation number="1" location="src/commands/emails/receiving/attachments.ts:63">
P2: Pagination hint command drops the user-selected `--limit`, so the advertised copy-paste next-page command can change result pagination.</violation>
</file>
<file name="src/commands/emails/receiving/list.ts">
<violation number="1" location="src/commands/emails/receiving/list.ts:54">
P2: Pagination hint advertises a copy-paste command but drops invocation flags (e.g., `--limit` and global options), so the next-page command may not continue the same request context.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
3 issues found across 10 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/emails/list.ts">
<violation number="1" location="src/commands/emails/list.ts:79">
P2: Pagination hint always uses `--after` even when the list was paged with `--before`, so the copy‑pasteable command can switch direction and return the wrong page.</violation>
</file>
<file name="src/commands/emails/receiving/list.ts">
<violation number="1" location="src/commands/emails/receiving/list.ts:54">
P2: Pagination hint always emits `--after` with the last item, so when a user paginates using `--before`, the copy‑paste command is incorrect because the helper is not told the current direction.</violation>
</file>
<file name="src/commands/broadcasts/list.ts">
<violation number="1" location="src/commands/broadcasts/list.ts:55">
P3: Pagination hint always prints a forward `--after <last-id>` command. When the user paged backward with `--before`, the helper has no cursor-direction context and will suggest the wrong command; backward pagination should use `before` with the first item ID.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
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.
Closes #19
Before:
After:
printPaginationHintnow takes acommandstring so it can print acopy-pasteable command. Updated all 9 paginated list commands.
Summary by cubic
Show a copy-pasteable next-page command in pagination hints, preserving
--limitand choosing--beforeor--afterbased on direction; applied to all nine list commands.printPaginationHint(list, command, { limit, before })now prints “Fetch the next page:” with$resend<command> --before|--after <id>using the correct cursor.Written for commit b205ffe. Summary will update on new commits.