viewer: keep the loading bar visible for the current model #1138

Merged
Okachamie merged 1 commit from upstream-pr/1138 into main 2026-11-29 02:15:36 +00:00
Okachamie commented 2026-11-24 19:09:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Okachamie on 2026-11-24T19:09:09Z.


Claimed in the coordination issue as: STUDIO-MODEL-LOAD-PROGRESS

What and why

A model that finishes loading schedules a 250 ms timer to hide the Studio loading bar. If another model starts loading before the timer fires, the old timer can hide the new model's progress. Check the model load ID before hiding the bar.

Tested

  • On CachyOS with Node.js 26.13.1, the synthetic timer regression fails on upstream 6293c1c4 and passes with the fix.
  • node --test tests/test_*.cjs passed all 70 tests.
  • git diff --check and scripts/check_no_game_data.py passed.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract entry: n/a.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5478597561 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1138). Originally posted by [Okachamie](https://github.com/Okachamie) on 2026-11-24T19:09:09Z. --- Claimed in the coordination issue as: [STUDIO-MODEL-LOAD-PROGRESS](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141246903) ### What and why A model that finishes loading schedules a 250 ms timer to hide the Studio loading bar. If another model starts loading before the timer fires, the old timer can hide the new model's progress. Check the model load ID before hiding the bar. ### Tested - On CachyOS with Node.js 26.13.1, the synthetic timer regression fails on upstream `6293c1c4` and passes with the fix. - `node --test tests/test_*.cjs` passed all 70 tests. - `git diff --check` and `scripts/check_no_game_data.py` passed. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract entry: n/a.
abnalstlll-byte commented 2026-11-24 19:25:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:25:30Z.

Review: APPROVED


Reviewed and verified. Fixes timer race condition in viewer studio progress bar by tracking active model load ID, ensuring late timer expirations do not prematurely hide newly started model loads. Verified with node --test tests/test_*.cjs (70/70 PASS). 100% clean-room.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045884521 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1138#pullrequestreview-6045884521). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T19:25:30Z. **Review:** APPROVED --- Reviewed and verified. Fixes timer race condition in viewer studio progress bar by tracking active model load ID, ensuring late timer expirations do not prematurely hide newly started model loads. Verified with `node --test tests/test_*.cjs` (70/70 PASS). 100% clean-room.
Deedlyy commented 2026-11-24 20:14:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:14:11Z.


Recommendation: [MERGE]

Reasoning: Viewer: a stale 250 ms hide timer from a previous model can no longer hide the current model's loading bar (load-ID check). Tiny UI fix with a regression test; all 70 Node tests pass per the author. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7143231595 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1138#issuecomment-7143231595). Originally posted by [Deedlyy](https://github.com/Deedlyy) on 2026-11-24T20:14:11Z. --- **Recommendation:** [MERGE] **Reasoning:** Viewer: a stale 250 ms hide timer from a previous model can no longer hide the current model's loading bar (load-ID check). Tiny UI fix with a regression test; all 70 Node tests pass per the author. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
zmasi commented 2026-11-28 22:00:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:00:47Z.


Native Windows 11 + Node v24.16.0 Verification (442c348843)

Verified 442c34884382636492ed889f64e267db89c8d522 merged cleanly onto origin/main (c7753ed98a56677f10e34078b37eab0540e190ec, git merge-tree --write-tree rc=0) on native Windows 11 (26200) + Node v24.16.0:

  • Red (origin/main c7753ed98a): node tests/test_viewer_studio.cjs failed (rc=1, expected: 'scaleX(0.4)', actual 'scaleX(0)' when an earlier completed model's 250 ms reset timer fired while the next model's loading bar was active).
  • Green (origin/main + 442c348843): node tests/test_viewer_studio.cjs passed 13/13 (fail 0), keeping scaleX(0.4) visible across stale timer callbacks until the active modelLoadId completes (scaleX(1) -> scaleX(0)).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246433004 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1138#issuecomment-7246433004). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T22:00:47Z. --- ### Native Windows 11 + Node `v24.16.0` Verification (`442c348843`) Verified `442c34884382636492ed889f64e267db89c8d522` merged cleanly onto `origin/main` (`c7753ed98a56677f10e34078b37eab0540e190ec`, `git merge-tree --write-tree` `rc=0`) on native **Windows 11 (`26200`) + Node `v24.16.0`**: - **Red (`origin/main` `c7753ed98a`)**: `node tests/test_viewer_studio.cjs` failed (`rc=1`, `expected: 'scaleX(0.4)'`, actual `'scaleX(0)'` when an earlier completed model's 250 ms reset timer fired while the next model's loading bar was active). - **Green (`origin/main + 442c348843`)**: `node tests/test_viewer_studio.cjs` passed **`13/13` (`fail 0`)**, keeping `scaleX(0.4)` visible across stale timer callbacks until the active `modelLoadId` completes (`scaleX(1)` -> `scaleX(0)`). AI-assisted.
OreoFR commented 2026-11-29 01:58:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:58:18Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Node v26.7.0, main 59e65849b, PR head 442c34884 : red 1 failure / green 13 OK

node --test tests/test_viewer_studio.cjs:

  • Red (main + only this PR's test file): 13 tests (incl. subtests), 1 failed:
    • a completed model timer leaves the next model loading bar visible
  • Green (main + merge): 13/13 OK.
  • (MEASURED n=3) each failing test rerun alone 3 times: red 3/3 fail, green 3/3 pass.
  • Skipped: none (skip 0, todo 0). No npm dependencies (CI runs node --test tests/test_*.cjs).
  • Merge: clean (git merge --no-ff onto 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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249129295 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1138#issuecomment-7249129295). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T01:58:18Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Node v26.7.0, main 59e65849b, PR head 442c34884 : red 1 failure / green 13 OK `node --test tests/test_viewer_studio.cjs`: - **Red** (main + only this PR's test file): 13 tests (incl. subtests), 1 failed: - `a completed model timer leaves the next model loading bar visible` - **Green** (main + merge): 13/13 OK. - (MEASURED n=3) each failing test rerun alone 3 times: red 3/3 fail, green 3/3 pass. - Skipped: none (skip 0, todo 0). No npm dependencies (CI runs `node --test tests/test_*.cjs`). - Merge: clean (`git merge --no-ff` onto 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
MoonEyes commented 2026-11-29 02:15:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T02:15:38Z.


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 main ce8afe3c2 without conflict, and its test file(s) (tests/test_viewer_studio.cjs) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249313085 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1138#issuecomment-7249313085). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T02:15:38Z. --- Merged after **OreoFR**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/1138#issuecomment-7249129295)) (macOS 27.2.1, Apple M5) and a local re-check here. Merged after local re-verification: this PR merged onto `main` ce8afe3c2 without conflict, and its test file(s) (`tests/test_viewer_studio.cjs`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1138
No description provided.