studio: go back to the shown model's row when a download fails (STUDIO-FAILED-LOAD-SELECTION) #2100

Open
github-bot wants to merge 1 commit from github-bot/gh-2100 into main AGit
Owner

@⁠Saauf on GitHub · 2026-11-25 20:41 UTC · original
Saauf:studio-failed-load-selection → main · +61 −5 · 2 files · 1 commits · open

Claimed in the coordination issue as: STUDIO-FAILED-LOAD-SELECTION (#1608)

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 querySelectorAll and classList.toggle did 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 with main's studio.html.
  • tests/test_viewer_serve.py and tests/test_viewer_cdn_integrity.py pass.
  • In the desktop app's built-in browser, against tools/gallery.py with 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.py is 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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a, no translator change)

🤖 Generated with Claude Code

**@⁠Saauf** on GitHub · 2026-11-25 20:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2100) `Saauf:studio-failed-load-selection` → `main` · +61 −5 · 2 files · 1 commits · open Claimed in the coordination issue as: STUDIO-FAILED-LOAD-SELECTION (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why Follows [CrazyThiago's finding](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). 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 `querySelectorAll` and `classList.toggle` did 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 with `main`'s `studio.html`. - `tests/test_viewer_serve.py` and `tests/test_viewer_cdn_integrity.py` pass. - In the desktop app's built-in browser, against `tools/gallery.py` with 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.py` is 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 - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a, no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
After a failed download the list kept the failed model selected, while the
viewport and the statistics still showed the previous one. Remember the model
that is shown and select its row again, without rebuilding the list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:17:54 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2100/head:github-bot/gh-2100'
git switch 'github-bot/gh-2100'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2100'
git switch 'github-bot/gh-2100'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2100'
git switch 'github-bot/gh-2100'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2100'
git switch 'main'
git merge --squash 'github-bot/gh-2100'
git switch 'main'
git merge --ff-only 'github-bot/gh-2100'
git switch 'main'
git merge 'github-bot/gh-2100'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.