H-3665: Paginate search bar#8902
Conversation
PR SummaryMedium Risk Overview Search bar: Inline Apollo queries and result UI move to Pagination hook: Drops generation-prefixed Entity links: Reviewed by Cursor Bugbot for commit f7a101d. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
| No results found for <b>{submittedQuery}</b>. | ||
| </ResultItem> | ||
| </ResultListContainer> | ||
| ); |
There was a problem hiding this comment.
Empty search skips entity types
Medium Severity
When the first entity page returns no rows but more results remain, hasMore stays true while SearchResults treats an empty combined list as final and shows “No results found.” Entity-type fetching only starts after loadMore, which Virtuoso never mounts in that state, so matching entity types are never requested or shown.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 9f27ed4. Configure here.
9f27ed4 to
f7a101d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f7a101d. Configure here.
| cursorKeyOf(folded.getNextPage().cursor) === | ||
| cursorKeyOf(requestRef.current?.cursor) | ||
| ) { | ||
| return previous; |
There was a problem hiding this comment.
First page completion discarded
High Severity
When the first entity search page finishes and the next step is entity types, appendPage compares only cursor keys. Both the in-flight first request and { kind: "entityType", cursor: undefined } map to the same sentinel, so the fold is treated as a stale re-completion and discarded. Accumulation stays empty for most searches (single entity page).
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f7a101d. Configure here.
caed7ba to
356160f
Compare
|
Closing, as the search api is not able to be paginated. Instead we are applying a simple limit to the search query for now in #8886 |


🌟 What is the purpose of this PR?
Implements pagination on the search bar + refactors accumulate-pagination to be much simpler to use and reason about
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR: