Skip to content

feat: show table row count in the data grid footer - #1554

Merged
sorenbs merged 2 commits into
mainfrom
feat/1359-row-count
Jul 18, 2026
Merged

feat: show table row count in the data grid footer#1554
sorenbs merged 2 commits into
mainfrom
feat/1359-row-count

Conversation

@sorenbs

@sorenbs sorenbs commented Jul 18, 2026

Copy link
Copy Markdown
Member

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 beyond Number.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

  • 4 acceptance tests (formatting, singular, bigint exactness, hidden on Infinity/absent) + a wiring test that the filtered count reaches the grid.
  • Verified live in the demo: "12 rows" on organizations, updating to "5 rows" after a tier = pro filter.
  • Grid suite 121 tests passing; typecheck/lint clean; FEATURES.md + pagination-contract doc updated; changeset included (minor).

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1327f2c1-71b7-41a7-a568-01c3d7f935c8

📥 Commits

Reviewing files that changed from the base of the PR and between 4dbc26e and 9549a96.

📒 Files selected for processing (2)
  • ui/studio/grid/DataGridPagination.test.tsx
  • ui/studio/grid/DataGridPagination.tsx

Walkthrough

The table view now passes its filtered row count through DataGrid to DataGridPagination. The pagination footer displays formatted counts with thousands separators, singular/plural row labels, and exact handling for large numeric strings. The label is omitted when the count is unavailable or invalid. Tests cover propagation, formatting, singular labeling, large values, and hidden states. Documentation and release metadata describe the new behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: showing the table row count in the data grid footer.
Description check ✅ Passed The description matches the implemented row-count footer update and related formatting/testing details.
Linked Issues check ✅ Passed The PR fulfills #1359 by displaying the table row count and reusing the existing filtered count for pagination.
Out of Scope Changes check ✅ Passed The added docs, tests, and changeset are directly related to the row-count footer change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/1359-row-count
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/1359-row-count

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

@github-actions

Copy link
Copy Markdown
Contributor

Compute preview deployed.

Branch: feat/1359-row-count
Service: feat-1359-row-count
Preview: https://gocec7dcx3p5bobluih0bin8.cdg.prisma.build

@sorenbs

sorenbs commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@sorenbs

sorenbs commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
✅ Action performed

Full 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.

@sorenbs

sorenbs commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

👉 Steps to fix this

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

📥 Commits

Reviewing files that changed from the base of the PR and between 81354ff and 4dbc26e.

📒 Files selected for processing (8)
  • .changeset/table-row-count-display.md
  • Architecture/table-query-controls.md
  • FEATURES.md
  • ui/studio/grid/DataGrid.tsx
  • ui/studio/grid/DataGridPagination.test.tsx
  • ui/studio/grid/DataGridPagination.tsx
  • ui/studio/views/table/ActiveTableView.filtering.test.tsx
  • ui/studio/views/table/ActiveTableView.tsx

Comment thread ui/studio/grid/DataGridPagination.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>
@sorenbs
sorenbs merged commit 1fbd26b into main Jul 18, 2026
3 checks passed
@sorenbs
sorenbs deleted the feat/1359-row-count branch July 18, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display table row count.

1 participant