You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugs list --vulns --page 5 on a repo with no vulns prints Page: 5 of 1.
The issue suggests clamping in both early-return branches. I dropped the returns instead: they only printed the empty-result hint, and the code just below already handles an empty set and clamps the page. Now reads Page: 1 of 1.
Clamps page number for empty client-side filter results in bugs list, fixing incorrect "Page: N of 1" output. Before: early returns printed the hint and returned "Page: 5 of 1"; now: print the hint (table only) and fall through to normal pagination, yielding "Page: 1 of 1".
Removes two early returns in empty-result branches; retains the empty-results hint for table output.
Delegates empty sets to output_list, which clamps the page.
No changes to non-table formats or non-empty results.
Written for commit 4b3aa46. Summary will update on new commits.
Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).
This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.
See the real-time status of this PR on the
Aviator webapp.
Tested this PR end-to-end by running the locally built binary against a locally running Detail backend (dev DB) with a minted API key. All scenarios pass; the page clamp now applies on empty client-side filter results.
Baseline (main) vs fix (this PR) — repo bkRoad (bugs but zero vulns):
$ detail bugs list bkRoad --vulns --page 5 # main (broken)
No security vulnerabilities found with the current filters.
Page: 5 of 1
$ detail bugs list bkRoad --vulns --page 5 # this PR (fixed)
No security vulnerabilities found with the current filters.
Page: 1 of 1
Other scenarios (all passed)
--introduced-by with a nonexistent author, --page 7:
No bugs matched --introduced-by. None of the current bugs have author information.
Page: 1 of 1
JSON format on empty results (no hint, valid JSON, clamped page):
Aviator has accepted the merge request. It will enter the queue when all of the required status checks have passed. Aviator will update the sticky status comment as the pull request moves through the queue.
This pull request failed to merge: blocked by Github, possibly missing approvals or merge cannot be cleanly created. After you have resolved the problem, you should remove the blocked pull request label from this PR and then try to re-queue the PR.
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
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.
bugs list --vulns --page 5on a repo with no vulns printsPage: 5 of 1.The issue suggests clamping in both early-return branches. I dropped the returns instead: they only printed the empty-result hint, and the code just below already handles an empty set and clamps the page. Now reads
Page: 1 of 1.Closes#334.
Summary by cubic
Clamps page number for empty client-side filter results in
bugs list, fixing incorrect "Page: N of 1" output. Before: early returns printed the hint and returned "Page: 5 of 1"; now: print the hint (table only) and fall through to normal pagination, yielding "Page: 1 of 1".output_list, which clamps the page.Written for commit 4b3aa46. Summary will update on new commits.