Skip to content

fix(showcase): allow 192 page size - #1239

Closed
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/showcase-page-size-validation
Closed

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/showcase-page-size-validation

Conversation

@sentry

@sentry sentry Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The showcase page (/showcase/) offered 192 as a selectable page size option, but the server-side validation for getApprovedShowcases was using a generic pageSizeSchema capped at 100. This led to a valibot validation error when 192 was selected.

This fix introduces a specific showcasePageSizeSchema in src/utils/showcase.functions.ts with v.maxValue(192) and updates the getApprovedShowcases loader to use this new schema, resolving the validation issue.

Fixes TANSTACK-COM-2S3

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry
sentry Bot requested a review from a team September 9, 2026 11:03
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 6b51252 Commit Preview URL

Branch Preview URL
Sep 09 2026, 11:05 AM

@tannerlinsley

Copy link
Copy Markdown
Member

This fixes the server limit, but the showcase URL validation still rejects 192. Both paths need to accept the options shown in the page-size menu.

AI review notes:
The agent checked the current showcase route and ran a local validation fixture using the schema expressions from current code and this PR. Values 24, 48 and 96 pass both schemas. Value 192 passes the proposed server schema but fails the route's shared pageSizeSchema, which still caps values at 100. Both reject 193, zero and fractional values.
The complete fix should share a showcase-specific pagination schema between the route's validateSearch and getApprovedShowcases, while preserving the generic 100-item cap elsewhere. Add coverage for all four menu options and invalid values at both boundaries. This was schema-level verification, not a browser reproduction or a completed implementation.

@tannerlinsley

Copy link
Copy Markdown
Member

Closing this because Hosuu’s fix in #1413 now removes the unsupported 192 option from both project lists. Thanks for identifying the validation mismatch.

AI review notes:
#1413 merged as bccb7b7 and its Workers deployment passed. The agent checked the production showcase and community-projects pages: both selectors now offer only 24, 48 and 96. This resolves the selectable-option mismatch without increasing the server limit. Supporting 192 items would still require matching route and server validation, as noted above.

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.

1 participant