Repository navigation
Studio: keep large model categories paginated - #6793
Conversation
|
Independent AI-assisted Node 24 VM check of One remaining state reset occurs when changing language or editing search to a value that normalizes to the same query. Both category pages reset to page 1, hiding the selected row while its model stays loaded. Base also discarded its expanded list on those actions. The translation handler and search handler are the two entry points. The Studio HTML merged cleanly with #6786 and its parent #6731. After preserving both sides of the scratch-only Node fixture conflict, six focused tests passed, and the merged VM kept pagination and selection across DDS mip/Z changes. Synthetic CPU checks. |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
viewer/studio.html replaces the "show all" button with 100-row paging: a per-category modelPages map, selectedModel, renderPage() and Previous/Next/range controls with previousModelPage/nextModelPage i18n labels; equivalent search text leaves the page in place and a changed filter resets to page one. tests/test_viewer_studio.cjs upgrades the fake DOM and adds three paging/selection tests.
Why merge
A category with 10,001 models previously injected 10,001 rows in one click, freezing the Studio viewer. Keeping one page preserves responsive browsing of model exports while retaining the selected model across pages and language changes.
Verdict: Approve
Summary
Why mergeA category with 10,001 models previously injected 10,001 rows in one click, freezing the Studio viewer. Keeping one page preserves responsive browsing of model exports while retaining the selected model across pages and language changes. Verdict: Approve |
Claimed in coordination #6750.
What changed
Studio originally rendered the first 100 models in each category, then appended every remaining row in one click. On a synthetic category with 10,001 models, the first click increased the live row count from 100 to 10,001 in Chrome.
Keep one page of up to 100 rows per category. Previous and Next show the current range, preserve the selected model when moving between pages, and keep each category's position independent. Filtering starts the filtered results on their first page.
Tested
node --test tests/test_viewer_studio.cjs: 6 passed on Windows (Node 26). The regression reproduced 10,001 rows on main.python -I tests/test_viewer_serve.py: 37 passed, 2 skipped.python -I tests/test_docs_links.py: 7 passed.git diff --checkpassed.tests/test_viewer_streaming.cjs: 56 passed with the sameAbortControllerfixture failure on both clean main and this PR. Tracked in test(viewer): pass AbortController and timers into camera-speed vm context #5692.No game data or GPU used. AI-assisted (Codex).
Review follow-up
Changing language now preserves each category's page and the selected row. Search text that normalizes to the current query leaves the list in place. A changed filter still starts from page one. The new regression reproduces the reset at the first PR commit and passes on the updated head.
DDS inspector integration
Resolved the conflict with #6896 in the shared Studio test fixture.
replaceChildrennow accepts arguments for page rows and an empty call for clearing inspector controls.node --test tests/test_viewer_studio.cjs— 9 passed on Windows and Debian (Node 24), including pagination and all three DDS inspector tests.python -IB tests/test_viewer_serve.py— 37 passed, 2 skipped on Windows.AbortController. The streaming suite and its viewer source exactly match upstreamd215ec8b.