Repository navigation
fix(web): enable client pagination in admin user detail tables - #18238
Conversation
The dataset and agent tables render pagination controls but never registered the pagination row model, so every row was shown at once. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesUser detail table pagination
Estimated code review effort: 1 (Trivial) | ~3 minutes Mergeability Score: ⚪ Minimal · up to This is a localized pagination enablement change with no actionable merge-blocking risk remaining beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
wangq8
left a comment
There was a problem hiding this comment.
Thanks for this fix — it's minimal and correct.
Verified against web/src/pages/admin/user-detail.tsx: the RAGFlowPagination controls were already wired up (total, current, pageSize, and onChange → table.setPagination), but without getPaginationRowModel the table returned every row regardless of pagination state, so the controls rendered while all rows were shown at once. Registering the pagination row model makes table.getRowModel().rows respect the pagination state and actually paginate. The default pageSize (tanstack's 10) lines up with RAGFlowPagination's initial select value ("10"), so first paint is consistent.
Two minor, non-blocking suggestions:
- Consider setting
initialState: { pagination: { pageSize: 10 } }explicitly. The current default relies on the implicit coupling between tanstack's default (10) andRAGFlowPagination's hardcoded initialcurrentPageSize("10"); making it explicit would guard against silent drift. total={props.data?.length}can beundefinedbefore data loads;?? 0would keep the prop type clean (it already defaults to 0 internally, so this is purely cosmetic).
No regressions spotted; LGTM.
Summary
fix(web): enable client pagination in admin user detail tables
The dataset and agent tables render pagination controls but never registered the pagination row model, so every row was shown at once.