René's URL Explorer Experiment


Title: improvement(tables): harden pagination for short pages and surface name-validation errors by TheodoreSpeaks · Pull Request #5351 · simstudioai/sim · GitHub

Open Graph Title: improvement(tables): harden pagination for short pages and surface name-validation errors by TheodoreSpeaks · Pull Request #5351 · simstudioai/sim

X Title: improvement(tables): harden pagination for short pages and surface name-validation errors by TheodoreSpeaks · Pull Request #5351 · simstudioai/sim

Description: Summary grid pagination now terminates on an empty page or a covered totalCount instead of rows.length < pageSize, so a short server page can never be misread as end-of-table (prep for byte-bounded pages / larger rows). Termination logic lives in a new pure module hooks/queries/utils/table-rows-pagination.ts shared by getNextPageParam and the use-table drain loops offset fallback resumes at the actual loaded-row count (not pages × pageSize); drain loops get a fail-fast no-progress guard validateRowSize measures UTF-8 bytes (Buffer.byteLength) instead of UTF-16 code units — a "400KB" CJK row was actually ~1.2MB on disk/wire dev-preview TABLE_MAX_PAGE_BYTES env (off by default): server cuts row pages at a byte budget, always keeping ≥1 row. Used to exercise the client termination end-to-end; the production SQL-side cut is a follow-up lifted the 10K-char per-string-cell limit — string cells are now bounded by the row byte cap alone, same as json cells (it was an inception-era constant with no hard constraint behind it; sorts/filters/unique checks all handle large values, and large text previously just moved to json columns as a workaround) renaming/creating a table with an invalid name now shows the validation message as a toast instead of silently reverting the field Type of Change Improvement Testing New pure-fn test suites (pagination termination, byte trim) + rewritten use-table tests incl. first coverage of ensureRowsLoadedUpTo and the short-page-continues regression case. tsc, lint:check, check:api-validation:strict, check:react-query, check:client-boundary all pass. Manually exercised locally against a seeded 60×400KB-row table with the byte cut enabled. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary grid pagination now terminates on an empty page or a covered totalCount instead of rows.length < pageSize, so a short server page can never be misread as end-of-table (prep for byte-bou...

X Description: Summary grid pagination now terminates on an empty page or a covered totalCount instead of rows.length &lt; pageSize, so a short server page can never be misread as end-of-table (prep for byte...

Opengraph URL: https://github.com/simstudioai/sim/pull/5351

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ed967d1e-0b52-5463-436a-5f11718ee638
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA07A:63A32:26FAB5:37005F:6AFB529A
html-safe-nonce62512b379a3a92626b0bbeb1b5c6c7636dbe664a831659d03144f0be2ce57785
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDdBOjYzQTMyOjI2RkFCNTozNzAwNUY6NkFGQjUyOUEiLCJ2aXNpdG9yX2lkIjoiMzczOTEzNTY1OTk2MTE3NjczMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac71c1b39dfb5fafa93051f4e67ac36a22e3729723167b1b9e71c54a0457e4b264
hovercard-subject-tagpull_request:3975093523
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5351/files
twitter:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
og:image:altSummary grid pagination now terminates on an empty page or a covered totalCount instead of rows.length < pageSize, so a short server page can never be misread as end-of-table (prep for byte-bou...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5351/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5351%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5351%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/5351/files
Reloadhttps://github.com/simstudioai/sim/pull/5351/files
Reloadhttps://github.com/simstudioai/sim/pull/5351/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
TheodoreSpeakshttps://github.com/TheodoreSpeaks
staginghttps://github.com/simstudioai/sim/tree/staging
debug/table-rowhttps://github.com/simstudioai/sim/tree/debug/table-row
Conversation 6 https://github.com/simstudioai/sim/pull/5351
Commits 3 https://github.com/simstudioai/sim/pull/5351/commits
Checks 17 https://github.com/simstudioai/sim/pull/5351/checks
Files changed https://github.com/simstudioai/sim/pull/5351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5351/files
improvement(tables): harden pagination for short pages and surface name-validation errors https://github.com/simstudioai/sim/pull/5351/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/5351/files
1669b2f improvement(tables): harden pagination for short pages and surface na… TheodoreSpeaks Jul 2, 2026 https://github.com/simstudioai/sim/pull/5351/commits/1669b2fdd8772aced4d8d8661266582920d042a7
431e177 fix(tables): align getNextPageParam tests with count-based termination TheodoreSpeaks Jul 2, 2026 https://github.com/simstudioai/sim/pull/5351/commits/431e1770515ccfa78813e21aed53d5ddc68037aa
3b412a9 improvement(tables): lift the 10K-char per-string-cell limit TheodoreSpeaks Jul 3, 2026 https://github.com/simstudioai/sim/pull/5351/commits/3b412a9d09ceb844d5cd7993dd61e04b1fd86f4e
Clear filters https://github.com/simstudioai/sim/pull/5351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5351/files
use-table.test.ts https://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
use-table.ts https://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
tables.test.ts https://github.com/simstudioai/sim/pull/5351/files#diff-e8f0c479945a05fcd2f89070b6e2fca86b6227403b80903c5e4f8e9b5bafe28d
tables.ts https://github.com/simstudioai/sim/pull/5351/files#diff-1d761ed5a7a2ed9ba4435d0f39c5f1f7ac13c177b301c401b38f5a6d731ac8cb
table-rows-pagination.test.ts https://github.com/simstudioai/sim/pull/5351/files#diff-f3f6c62f16cdd68caee31dd52bb52c763035ca3d781888b1d44ffdb7c8dd9c3a
table-rows-pagination.ts https://github.com/simstudioai/sim/pull/5351/files#diff-9ca302c8ce2fd62d1f9146b52a2570a2f4acb7e0a023131448a7dad40b0b6d7d
env.ts https://github.com/simstudioai/sim/pull/5351/files#diff-7db3fc610ff89cf819c4eb69b43ec37ae18530e1861f6c322faeb62f8f48f298
paging.test.ts https://github.com/simstudioai/sim/pull/5351/files#diff-3e5ddd142377a435c90721e66935ab5b028a6e59d13eca65137c6889ef79f115
validation.test.ts https://github.com/simstudioai/sim/pull/5351/files#diff-a948c00236b89c600a7821b581ea46177a8468a1e824ef31bc5411e161cd74a9
constants.ts https://github.com/simstudioai/sim/pull/5351/files#diff-3789ef10f28c4ed64a7728377279f3fb4f153bc42fb87c1db3405e79ee97fcf5
paging.ts https://github.com/simstudioai/sim/pull/5351/files#diff-9187a82b12e02540c340e50bce3b3080ae312eec98abfda77d86f3e70cc5b280
service.ts https://github.com/simstudioai/sim/pull/5351/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
validation.ts https://github.com/simstudioai/sim/pull/5351/files#diff-4afe0c5257b85a0e6c183bc2a7cd3db262dc445d8f341964364c751f6aa34f04
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table.test.tshttps://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
View file https://github.com/simstudioai/sim/blob/3b412a9d09ceb844d5cd7993dd61e04b1fd86f4e/apps/sim/app/workspace/%5BworkspaceId%5D/tables/%5BtableId%5D/hooks/use-table.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5351/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
https://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
https://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
https://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
https://github.com/simstudioai/sim/pull/5351/files#diff-c0cc2407929c2bae3ef64d805bc24875ae3dff712af7422a35ef32be2d563c5e
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table.tshttps://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
View file https://github.com/simstudioai/sim/blob/3b412a9d09ceb844d5cd7993dd61e04b1fd86f4e/apps/sim/app/workspace/%5BworkspaceId%5D/tables/%5BtableId%5D/hooks/use-table.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5351/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
https://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
https://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
https://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
https://github.com/simstudioai/sim/pull/5351/files#diff-4da461fad88a5b2b18ee19a7eaaf565ce24d6589efa6f3b538fb3e70f69ba0df
Please reload this pagehttps://github.com/simstudioai/sim/pull/5351/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5351/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.