Skip to content

fix(studio): show queued downloads consistently across media routes - #13219

Merged
Etherll merged 7 commits into
unslothai:mainfrom
Imagineer99:fix/download-route-parity
Oct 12, 2026
Merged

Etherll merged 7 commits into
unslothai:mainfrom
Imagineer99:fix/download-route-parity

Conversation

@Imagineer99

Copy link
Copy Markdown
Member

Selecting a cached image/video model can still require several asset downloads. The Hub shows upcoming stages, but media-page staging previously exposed only the active job, hiding the remaining encoder/decoder stages.

Reviewing #13112 highlighted a real visibility gap. This change brings the affected routes into parity with the existing Hub UI, keeping separate download stages rather than introducing a combined progress visualization.

The shared staging hook now publishes pending rows for Images, Video, and Audio. Active transfers are matched by scope, repository, and file set (or GGUF variant) to avoid duplicate rows. Pending rows clear on queue replacement, cancellation, completion, and unmount. Transfer order, byte counters, and page-owned loading remain unchanged; the Hub keeps its existing queue.

Before / after

Cached model, two missing asset repositories, identical encoder progress: 1 visible row → 2 visible rows, with the decoder shown as queued.

Playwright before and after: pending decoder stage becomes visible

Captured from the real Studio UI using deterministic API responses in separate installations. No model bytes were downloaded and no GPU inference was run. Base 09ce38697f; head 226c3968ba.

Validation

  • 310 download-related frontend tests pass.
  • Production build and application/test TypeScript checks pass.
  • Playwright Images flow passes in Chromium, Firefox, and WebKit: the cached checkpoint is not downloaded again; cancellation removes pending rows; retry restores them; stages advance once; the model loads once; dismissing completed rows hides the panel.
  • Video/Audio share the changed staging hook and have queue-scope unit coverage; their full UI flows were not separately captured.
  • ESLint reports four existing errors, reproduced unchanged on the base: restricted imports, the existing useMemo callback, and an existing ref assignment.

Scope is queued-stage visibility. Same-repository component splitting and ordinary Chat's loader fallback are unchanged.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-12T14:12:42.637605Z a6294e4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-10T09:52:08.246515Z 226c396 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member

Two reds here come from this PR:

  • tests/studio/test_playwright_suites_run_in_ci.py::test_every_playwright_driver_is_invoked_by_ci fails because the new tests/studio/playwright_staged_download_rows.py is not named by any workflow or CI script, so it would never run. Wire it into the Playwright job that runs the other tests/studio/playwright_*.py drivers.
  • workflow-trigger lint fails in test_backend_ci_parallel_isolation.py::test_every_tight_elapsed_bound_is_isolated and test_security_suite_stays_import_light.py. Both pass on current main, so rebase first and check whether they still fail.

The other reds (test_tauri_branding_contract and test_chunked_mask_block_sequence_ids::test_static_cache_generate_matches_dynamic) come from the old base 554eb6b. Both pass on current main (04e9b26), so a rebase should clear them.

The new driver was not named by any workflow, so the Playwright CI
coverage guard failed and the regression never ran. Run it in the
extra shard next to the other image download drivers.
Keep its screenshots and facts.json with the other image driver logs so a
failure in that step can be debugged.
Signing out in another tab clears this tab's download jobs, but the Images,
Video and Audio pages stay mounted and kept their staged queues published,
so the panel listed queued downloads that no longer existed. Clear the
staged queues in the same reset.
@Etherll

Etherll commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Images, Video and Audio now list every pending asset stage in the download panel, not only the one that is downloading. With a cached model that still needs two asset repos, the panel goes from one row to two: the active text encoder and the decoder marked Queued.

What changed

  • No workflow ran the new Playwright check, so the CI coverage guard test_every_playwright_driver_is_invoked_by_ci failed. It now runs as a new step in the extra shard of studio-ui-smoke.yml, and its screenshots are uploaded with the other image driver logs.
  • Signing out in another tab cleared this tab's download jobs, but the Images, Video and Audio pages stay mounted and kept their queues published, so the panel listed queued downloads that no longer existed. The session reset now clears those queued stages too, and the session-boundary test covers all four sign-in and sign-out paths.

Two Unsloth Studio builds were compared with the same mocked download plan: 09ce386 shows one row and a6294e4 shows two. Cancel, retry, stage advance and a single model load pass in Chromium, Firefox and WebKit. Frontend unit tests (11,229 tests) and typecheck pass, and the workflow guard suite passes when merged with current main. The test_tauri_branding_contract and test_chunked_mask_block_sequence_ids failures came from the older main the earlier CI run merged with, and both pass on current main. One gap predates this PR: on Images, a download-only plan queued behind another plan is not listed until it starts. Fork CI is running at Etherll#228.

Unsloth Studio download panel before and after

Unsloth Studio download panel, merge base 09ce386 (left) vs PR head a6294e4 (right).

@Etherll

Etherll commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Etherll
Etherll merged commit 9b8338c into unslothai:main Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants