Repository navigation
fix: unify Prompts page pagination with shared TablePager (closes #544) - #546
Conversation
- Main prompt list: add usePagination + TablePager (PAGE_SIZE=100); resetKey encodes search + workFilter + sort so filter/sort changes automatically reset to page 1 - Fan-out tab: replace bespoke getPagerItems numbered pager with TablePager; HighFrequencyView now uses usePagination (pageSize=10) - Deletes getPagerItems entirely; no remaining custom pager markup format:check, lint, typecheck, and test all pass (47/47). Closes #544
|
Thanks — this is a solid implementation and CI is green. #545 was opened first for the same issue, so we've asked its author to address review findings and given them a ~3-day window, per first-come courtesy. If #545 isn't updated in that window, we'll merge this one. We'll keep you posted either way. |
Thanks for the context and the fair process — I appreciate it. Just to note: I was assigned to #544, and #545 didn't reference the issue anywhere (no Happy to wait out the 3-day window. If there's any review feedback on #546 in the meantime I'm glad to address it. |
|
@gkhngyk Any Update? |
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks for the clean implementation — using the shared TablePager in both views and deleting the bespoke pager entirely is exactly the right shape for #544. Verified it merges cleanly with current main and all checks pass on the combined tree. 🙌
Summary
Fixes the pagination inconsistency on the Prompts page described in #544.
Both affected views now use the same
TablePager+usePaginationthatthe Citations page and prompt-detail Top Sources card already use.
Changes
_fanout-tab.tsx— Fan-out tab (High frequency view)getPagerItemsnumbered pager (1 2 … 9buttons)with the shared
<TablePager>componentusePagination(pageSize = 10) is now called inQueryFanoutTabandpassed down to
HighFrequencyViewvia a singlepagerpropgetPagerItemsentirely — no remaining usages anywhereByPromptViewis unchangedpage.tsx— Main prompt list (All Prompts tab)usePagination(filtered.length, resetKey)+<TablePager>belowthe table (PAGE_SIZE = 100, matching the shared default)
resetKeyencodes search text + work status filter + sort column + sortdirection, so changing any filter or sort automatically returns to page 1
filtered.map(...)→filtered.slice(pager.start, pager.end).map(...)Acceptance criteria (from issue)
pager below the table; filter/sort changes reset to page 1
TablePagerUI asCitations
getPagerItemsformat:check,lint,typecheck, andtestall pass (47/47)Testing
Manually verified on
npm run dev:resets to 1 when search or sort changes
buttons, styling matches Citations page exactly