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
{{ message }}
Repository navigation
Partial Results in Paginated Search Invokes Repetitive Search #1403
For a given search over a windowed time range (ex. over several days) and if there are only a few results in a given window (ex. 3 rows), we dispatch an extra extraneous SELECT .. LIMIT 200 OFFSET 3 query, even though we know if the last result length is less than limit, we can move onto the next window.
Found the issue in packages/app/src/hooks/useOffsetPaginatedQuery.tsx:104. The current code checks:
if(lastPage.data.length>0)
But this doesn't account for partial results. If we request 200 rows and only get 3, we know there are no more results in this window, yet the code will still dispatch another query with OFFSET 3.
Now the pagination will only continue if we received a full page of results, indicating there might be more data. If we get fewer results than requested, we skip the extraneous query and move to the next time window.
This should reduce pagination latency by eliminating unnecessary queries when we already know there are no more results in the current window.
Next Steps
Important: Please run the linting commands before merging:
cd packages/app && yarn run lint:fix
yarn run lint
The fix has been pushed to branch claude/issue-1403-20251121-2332.
Activity
MikeShi42 commentedon Nov 21, 2025
@claude please help fix this conditional error
claude commentedon Nov 21, 2025
Claude finished @MikeShi42's task —— View job •
claude/issue-1403-20251121-2332• Create PR ➔Fixed pagination conditional error ✅
Tasks
Analysis
Found the issue in
packages/app/src/hooks/useOffsetPaginatedQuery.tsx:104. The current code checks:But this doesn't account for partial results. If we request 200 rows and only get 3, we know there are no more results in this window, yet the code will still dispatch another query with
OFFSET 3.Fix Applied
Updated the condition to:
Now the pagination will only continue if we received a full page of results, indicating there might be more data. If we get fewer results than requested, we skip the extraneous query and move to the next time window.
This should reduce pagination latency by eliminating unnecessary queries when we already know there are no more results in the current window.
Next Steps
Important: Please run the linting commands before merging:
The fix has been pushed to branch
claude/issue-1403-20251121-2332.Branch |
fix: prevent extraneous pagination query when result count < limit
fix(app): stop refetching next page while search query is in an error…
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search
feat(api): add cursor pagination to external API v2 search