Repository navigation
fix: align page size options with validation limit - #1413
Conversation
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Update route page size options src/routes/community-projects.tsx, src/routes/showcase/index.tsx |
Both routes remove 192 from PAGE_SIZE_OPTIONS. The remaining options are 24, 48, and 96. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Suggested reviewers: tannerlinsley, an1ndra
Merge Risk: 
Minimal · up to 950c9
-
The page-size options align with the validation limit, with no remaining merge-blocking risk identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
|
@Hosuu, good catch. Thanks for the PR! |
Problem
The page size selector on
/showcaseand/community-projectsoffers24, 48, 96, 192, butpageSizeSchemainsrc/utils/schemas.tsonly allows values up to100(v.maxValue(100)).Picking
192sets?pageSize=192in the URL, the search validation fails, and the page shows an error:Reproduction
/community-projects)192Fix
Removed
192fromPAGE_SIZE_OPTIONSin both routes, so every option the UI offers passes validation:src/routes/showcase/index.tsxsrc/routes/community-projects.tsxI kept the existing limit of 100 instead of raising it, since it probably protects the backend query size. Also, showing more than ~100 cards on one page already feels crowded, so
192seems like more than users would need.Summary by CodeRabbit