feat: show table row count in the data grid footer - #1554
Conversation
Display the total row count of the current result set as a muted, thousands-separated label (e.g. "4,725 rows") on the right side of the data grid pagination footer. The label uses the same filtered count that already drives pagination, so it respects active filters and row search, stays exact for counts beyond Number.MAX_SAFE_INTEGER, and hides when the adapter cannot count rows (Infinity). Closes #1359 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe table view now passes its filtered row count through 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
Compute preview deployed. Branch: |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. You're currently rate limited under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. Your next review will be available in 34 minutes. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/studio/grid/DataGridPagination.tsx`:
- Around line 485-506: Update getRowCountLabel to return null when totalRowCount
is a number that is not a safe integer before converting it with BigInt;
continue accepting exact string and bigint values and preserve existing null,
Infinity, negative, and formatting behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d427c904-fd11-436a-9929-05fbbb7698c3
📒 Files selected for processing (8)
.changeset/table-row-count-display.mdArchitecture/table-query-controls.mdFEATURES.mdui/studio/grid/DataGrid.tsxui/studio/grid/DataGridPagination.test.tsxui/studio/grid/DataGridPagination.tsxui/studio/views/table/ActiveTableView.filtering.test.tsxui/studio/views/table/ActiveTableView.tsx
A `number` totalRowCount above Number.MAX_SAFE_INTEGER has already lost precision before BigInt() can see it, so the footer would display a rounded total. Hide the label for non-safe-integer numbers instead; exact large counts arrive as bigint or string, which stay supported. Addresses CodeRabbit review feedback on #1554. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes #1359
The grid footer now shows the total row count of the current result set (e.g. "4,725 rows") as a muted, right-aligned label opposite the pagination controls. It reuses
filteredRowCount— the exact count that already drives pagination — so it respects active filters and row search with zero extra queries.Details: formatting goes through
BigInt(exact beyondNumber.MAX_SAFE_INTEGER), singular "1 row", and the label hides when the adapter can't count rows (Infinity). Plain span with standard theme tokens inside the existing footer — no non-standard UI.Verification
Infinity/absent) + a wiring test that the filtered count reaches the grid.organizations, updating to "5 rows" after atier = profilter.🤖 Generated with Claude Code