Repository navigation
feat: add 10-per-page pagination and search filter to Top Sources (#530) - #533
Conversation
- Add optional pageSize parameter to usePagination (default PAGE_SIZE=100) - Add search input to TopSourcesCard for filtering by domain/URL/title - Top Sources tables now page 10 rows at a time (down from 100) - Filter resets pager to page 1 and applies across both tabs - Rank numbers stay continuous across filtered pages
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks — the implementation is exactly what #530 asked for: pageSize defaulting keeps the citations page untouched, the filter drives both tabs with live counts, and the pager resets via resetKey. Typecheck and ESLint both pass on my local run.
One blocker: Prettier fails on prompts/[id]/page.tsx (the new long signature lines exceed the print width). CI couldn't tell you because workflow runs for first-time contributors need maintainer approval — that's being sorted. Fix:
cd web && npx prettier --write "src/app/[locale]/(dashboard)/dashboard/prompts/[id]/page.tsx"commit, push, and this is good to go.
|
Prettier formatting has been applied and pushed (commit 5ee3491). Ready for another look. |
|
Friendly bump on this one — Prettier pass was pushed as commit 5ee3491 yesterday. Re-requesting review in case it dropped off your queue. Let me know if there's anything else I should clean up. |
gkhngyk
left a comment
There was a problem hiding this comment.
Formatting fixed and CI is green — thanks for the quick turnaround and for the clean pagination + filter work, @marceli1404!
|
Is there any chance I could become an admin since I really want to try out reviewing code etc... (: thank you in advance |
Fixes #530
Changes
table-pager.tsx
pageSizeparameter tousePagination(defaultPAGE_SIZE = 100)Prompt detail page
<Input>toTopSourcesCardthat filters rows by case-insensitive substring match on domain, URL, and titlepageSize=10(down from 100)resetKeyAcceptance criteria