Skip to content

fix(web): enable client pagination in admin user detail tables - #18238

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/web-admin-user-detail-pagination
Aug 14, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/web-admin-user-detail-pagination

Conversation

@dcc123456

Copy link
Copy Markdown
Collaborator

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.

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]>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Aug 13, 2026
@dcc123456
dcc123456 requested a review from wangq8 August 13, 2026 11:57
@dcc123456 dcc123456 added the ci Continue Integration label Aug 13, 2026
@dcc123456
dcc123456 marked this pull request as draft August 13, 2026 11:57
@dcc123456
dcc123456 marked this pull request as ready for review August 13, 2026 11:57
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d7dc02fe-e4c1-4351-ae90-bc4b7b858ee1

📥 Commits

Reviewing files that changed from the base of the PR and between a4e8195 and ff6a54a.

📒 Files selected for processing (1)
  • web/src/pages/admin/user-detail.tsx

📝 Walkthrough

Walkthrough

Changes

User detail table pagination

Layer / File(s) Summary
Register pagination row models
web/src/pages/admin/user-detail.tsx
Imports getPaginationRowModel and registers it for the user dataset and user agent tables.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Mergeability Score: ⚪ Minimal · up to ff6a5

This is a localized pagination enablement change with no actionable merge-blocking risk remaining beyond normal checks and review.

Poem

I’m a rabbit with rows in a neat little line,
Pagination hops where the table can shine.
Dataset and agents now turn page by page,
TanStack keeps order inside every cage.
Three small changes, and the view feels just right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the pagination fix in the admin user detail tables.
Description check ✅ Passed The description includes the required Summary section and explains the problem and intended fix.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Consider setting initialState: { pagination: { pageSize: 10 } } explicitly. The current default relies on the implicit coupling between tanstack's default (10) and RAGFlowPagination's hardcoded initial currentPageSize ("10"); making it explicit would guard against silent drift.
  2. total={props.data?.length} can be undefined before data loads; ?? 0 would keep the prop type clean (it already defaults to 0 internally, so this is purely cosmetic).

No regressions spotted; LGTM.

@wangq8
wangq8 merged commit 1127ce0 into infiniflow:main Aug 14, 2026
12 checks passed
nikminer pushed a commit to nikminer/ragflow-mws that referenced this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants