fix(bugs): clamp page on empty client-side filter results - #335
Conversation
Current Aviator status
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.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
|
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 Other scenarios (all passed)
JSON format on empty results (no hint, valid JSON, clamped page): Regression — non-empty results unchanged (
Also verified locally: |
|
/aviator merge |
|
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. |
|
thanks for the contribution @ayush-that ! |
|
Skipping bot pull request creation because the queue is empty and this pull request is up to date with |
|
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 Failed checks: Security Audit, Vendored Artifacts, Tests, Check, Clippy, plan, Formatting Additional debug info: Merge commits are not allowed on this repository. |
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.