fix: standardize pagination UI and fix scrolling layout across table views - #4433
Conversation
|
Warning Review limit reached
More reviews will be available in 5 minutes and 11 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThree workspace pages (custom-pricing overrides, model-limits, routing-rules) receive consistent layout changes: page containers switch to full-viewport flex-column sizing; tables gain sticky headers, pinned right "Actions" columns styled with ChangesTable layout and pagination standardization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
6321ee6 to
4976ecd
Compare
08c9151 to
71fd592
Compare
71fd592 to
fe98418
Compare
4976ecd to
5e8194b
Compare
5e8194b to
aaea614
Compare
1f9a2bc to
3a465f2
Compare
aaea614 to
2f1aba0
Compare
3a465f2 to
a49acb3
Compare
2f1aba0 to
3e70c05
Compare
3e70c05 to
83783a5
Compare
a49acb3 to
634983f
Compare
Confidence Score: 5/5Pure UI refactor — pagination controls, layout shell, and loading state — with no logic or data-flow changes outside of the new isLoading prop; all existing data-testid attributes used by E2E tests are preserved. All three pages use an established pattern already present in Virtual Keys and Model Catalog. The isLoading guard in ModelLimitsTable is correctly wired and handles the edge cases (active filters, subsequent page loads). No E2E test selectors are broken: per-button testids (e.g. routing-rules-pagination-prev-btn) are unchanged, and the new data-testid="pagination" container is additive. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["page.tsx\n(no-padding-parent shell\nh-[calc(100dvh-1rem)] flex-col)"]
A --> B["*View.tsx\n(flex flex-col overflow-y-auto)"]
B --> C["Header + Toolbar divs\n(static, mb-4 spacing)"]
B --> D["Border div\n(overflow-hidden rounded-sm border mb-2)"]
D --> E["Table containerClassName=h-full overflow-auto\n(scroll surface)"]
E --> F["TableHeader sticky top-0 bg-muted z-10\n(sticky within scroll surface)"]
E --> G["TableBody rows\n(scrolls under sticky header)"]
B --> H["Pagination div shrink-0\n(data-testid=pagination)\nIcon-only ghost buttons · Page X of Y · N-M of Z entries"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["page.tsx\n(no-padding-parent shell\nh-[calc(100dvh-1rem)] flex-col)"]
A --> B["*View.tsx\n(flex flex-col overflow-y-auto)"]
B --> C["Header + Toolbar divs\n(static, mb-4 spacing)"]
B --> D["Border div\n(overflow-hidden rounded-sm border mb-2)"]
D --> E["Table containerClassName=h-full overflow-auto\n(scroll surface)"]
E --> F["TableHeader sticky top-0 bg-muted z-10\n(sticky within scroll surface)"]
E --> G["TableBody rows\n(scrolls under sticky header)"]
B --> H["Pagination div shrink-0\n(data-testid=pagination)\nIcon-only ghost buttons · Page X of Y · N-M of Z entries"]
Reviews (6): Last reviewed commit: "fix: workspace/model pages style fixes" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/app/workspace/model-limits/views/modelLimitsTable.tsx`:
- Line 540: The data-testid attribute on the pagination container div (with
className "flex shrink-0 items-center justify-between text-xs") currently uses
the simple value "pagination", which does not follow the repository's required
three-part naming convention of entity-element-qualifier. Update the data-testid
to follow this convention by identifying the appropriate entity (such as the
model limits table context), the element being tested (pagination), and a
qualifier if needed to make it more explicit and consistent with other test
selectors in the codebase.
- Around line 319-320: The TableHead element for the Actions column on line 319
has no accessible label, making it unclear to screen readers. Add a screen
reader only label inside this TableHead to identify it as the Actions column.
Use the sr-only CSS class to visually hide the label while keeping it available
to assistive technology. The label should be descriptive and indicate that this
column contains actions for the table rows.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: add48785-b495-477f-9ff5-1fbfb7e91ed2
📒 Files selected for processing (8)
ui/app/workspace/custom-pricing/overrides/page.tsxui/app/workspace/custom-pricing/overrides/scopedPricingOverridesView.tsxui/app/workspace/model-limits/page.tsxui/app/workspace/model-limits/views/modelLimitsTable.tsxui/app/workspace/model-limits/views/modelLimitsView.tsxui/app/workspace/routing-rules/page.tsxui/app/workspace/routing-rules/views/routingRulesTable.tsxui/app/workspace/routing-rules/views/routingRulesView.tsx
83783a5 to
c44293f
Compare
100ef8c to
46651bd
Compare
c44293f to
2ace9ff
Compare
46651bd to
707a206
Compare
2ace9ff to
06256a8
Compare
707a206 to
b591b18
Compare
06256a8 to
dc397f0
Compare
b591b18 to
41d26da
Compare
dc397f0 to
3aaef6b
Compare
3aaef6b to
41c326c
Compare
41d26da to
18b205d
Compare
Merge activity
|
The base branch was changed.

Summary
Standardizes the pagination UI across the Model Limits, Routing Rules, and Custom Pricing Overrides table views, and fixes a layout issue on the Model Limits page that caused it to overflow rather than fit within the viewport.
Changes
ChevronLeft/ChevronRight) and addedaria-labelattributes for accessibility"Showing X-Y of Z"to"X-Y of Z entries"with locale-formatted numbersdata-testid="pagination"attribute to the pagination container across all three views for consistencyisLoadingprop toModelLimitsTableto suppress the empty state flash before the initial API response arrives, and to show a "Loading model limits..." message in the table body during loadType of change
Affected areas
How to test
Navigate to the Model Limits, Routing Rules, and Custom Pricing Overrides pages with enough records to trigger pagination and verify:
1,000).Screenshots/Recordings
Before/after screenshots of the pagination controls and Model Limits layout recommended.
Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines