studio: go back to the shown model's row when a download fails (STUDIO-FAILED-LOAD-SELECTION) #2100
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2100"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by Saauf on 2026-11-25T20:41:58Z.
Claimed in the coordination issue as: STUDIO-FAILED-LOAD-SELECTION (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7174039782)
What and why
Follows CrazyThiago's finding. When a model download failed, Studio kept the failed model's row selected while the viewport and the statistics still showed the previous model, and redrawing the list kept the mismatch.
Studio now remembers the model it shows and selects that row again on an error (no row if nothing is shown yet), before the alert. The list is not rebuilt, so its scroll position and collapsed groups stay. A late failure of a download that a newer click replaced is still ignored.
The test harness's
querySelectorAllandclassList.toggledid nothing; they now work, because the new test reads the rows.Tested
node --test tests/test_viewer_studio.cjs tests/test_viewer_streaming.cjs(Node 22.16, macOS): 70 pass. The new test fails withmain'sstudio.html.tests/test_viewer_serve.pyandtests/test_viewer_cdn_integrity.pypass.tools/gallery.pywith three synthetic GLBs, one of them malformed: after the error the first model's row is selected again, and the next model loads normally.scripts/check_no_game_data.pyis clean on both files. The diffs of the open #1138 and #1490, which touch the same files, still apply on top of this branch.GPUs tested: n/a
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a, no translator change)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T21:46:31Z.
#2100 | head
515fc75c0d(merged cleanly with maina8465211fb) |node --test tests/test_viewer_studio.cjs| red on main:pass 12, fail 1(AssertionError: nothing is shown yet—actual: ['a'], expected: []; clicking a row mutatedselectedModeland.activebeforeGLTFLoader.loadcompleted and never restored the previously shown model on download failure) | green on PR+main:pass 13 / 13, fail 0(duration_ms 209.6) | Windows 11 (10.0.26200.9974), Node.js v24.16.0 | AI-assisted: yesAudited
viewer/studio.htmlandtests/test_viewer_studio.cjson Windows 11: trackingshownModelon successful scene swaps and callingselectModel(shownModel)when the latestmodelLoadIdfails restores the active sidebar row (and subsequentrenderAccordionList()redraws) to the model actually shown in the viewport without rebuilding the accordion or disturbing superseded loads. Also verifiedtests/test_ci_registration.pyandscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:58:15Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Node v26.7.0, main
59e65849b, PR head515fc75c0: red 1 failure / green 13 OKnode --test tests/test_viewer_studio.cjs:a failed download selects the row of the model still shown, also after the list is redrawnnode --test tests/test_*.cjs).git merge --no-ffonto main). The PR's test file is not older than main's, so the red run is the plain one.Verdict: READY
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T02:15:11Z.
Merged after OreoFR's red/green check (check) (macOS 27.2.1, Apple M5) and a local re-check here. Merged after local re-verification: this PR merged onto
main02944d4cawithout conflict, and its test file(s) (tests/test_viewer_studio.cjs) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.