fix(my-space): hide page size selector when table has 20 rows or fewer#3165
Merged
fix(my-space): hide page size selector when table has 20 rows or fewer#3165
Conversation
revu-bot
reviewed
Apr 8, 2026
Collaborator
revu-bot
left a comment
There was a problem hiding this comment.
Review Summary
The PR correctly implements the feature described in issue #3156: hiding the page-size selector when the table has ≤ 20 rows. The logic is straightforward and the tests cover both branches. A few issues worth addressing:
| File | Lines | Severity | Issue |
|---|---|---|---|
DeclarationsSection.tsx |
~146 | IMPORTANT | Threshold is off-by-one: > 20 hides selector at exactly 20 rows but the spec says "≤ 20 rows should hide it" — these are equivalent, but the constant name implies the boundary is inclusive, making > vs >= confusing |
DeclarationsSection.tsx |
~65–68 | IMPORTANT | totalRows double-counts: it sums lengths of two already-filtered arrays instead of using declarations.length directly |
DeclarationsSection.test.tsx |
~155–165 | IMPORTANT | Missing boundary test at exactly 20 rows — the "does not render" test uses only 3 rows (the default fixture), leaving the boundary value untested |
DeclarationsSection.tsx |
~146 | MINOR | Selector is hidden but pageSize state still defaults to 10; if the table later grows past the threshold the first visible page size will be 10 regardless of what was previously selected — this is acceptable but worth noting |
Overall the change is clean and well-scoped. The main actionable items are the boundary test gap and the totalRows calculation.
|
🎉 Deployment for commit b2d4c24 : IngressesDocker images
|
maxgfr
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PAGE_SIZE_SELECTOR_THRESHOLDconstant for the threshold.Closes #3156
Test plan
pnpm test— 1062/1062 passedpnpm typecheck— 0 errorspnpm lint:check/pnpm format:check— clean