fix: prevent filtered skills pagination flicker#372
Open
abdulbb wants to merge 2 commits intoopenclaw:mainfrom
Open
fix: prevent filtered skills pagination flicker#372abdulbb wants to merge 2 commits intoopenclaw:mainfrom
abdulbb wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Skip fully filtered-out pages in public skills pagination so highlighted/non-suspicious filtering doesn't return empty pages with more cursor state, which caused repeated loading-more flicker. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
@abdulbb is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a pagination UX issue in skills.listPublicPageV2 by skipping pages that become empty after applying highlightedOnly / nonSuspiciousOnly post-pagination filters, preventing clients from receiving empty pages with isDone: false (which caused “Loading more…” flicker).
Changes:
- Add a loop in
listPublicPageV2to advance pagination until a non-empty filtered page is found or pagination is exhausted. - Extract post-pagination filtering into a dedicated
filterPublicSkillPagehelper. - Add/adjust regression tests to cover skipping fully filtered pages and correctly returning
isDone: truewhen no matches exist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
convex/skills.ts |
Skips fully filtered-out pages during pagination and factors filtering into a helper. |
convex/skills.listPublicPageV2.test.ts |
Adds tests verifying page-skipping behavior and proper exhaustion semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove the custom runPaginate annotation so TypeScript infers the exact Convex paginate result shape and preserves stronger type-safety. Co-authored-by: Cursor <cursoragent@cursor.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
skills.listPublicPageV2to skip fully filtered-out pages whenhighlightedOnlyand/ornonSuspiciousOnlyare enabledisDone: false, which caused the UI to repeatedly showLoading more…without visible new rowsTest plan
bun run lintbun run testbun run buildMade with Cursor
Greptile Summary
This PR fixes a pagination bug where the UI repeatedly showed "Loading more..." without displaying new rows when
highlightedOnlyornonSuspiciousOnlyfilters were active. The fix implements a while loop that skips empty filtered pages by fetching the next page until either matching skills are found or pagination is exhausted.Changes:
listPublicPageV2to loop through pages when filters remove all results (convex/skills.ts:1596-1599)filterPublicSkillPagefunctionisDone: trueConfidence Score: 5/5
Last reviewed commit: 45c477c
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!