Skip to content

fix(desktop): Studio asks Core again after a failed engine check and shows the catalog without waiting - #1191

Closed
sosidudku1 wants to merge 2 commits into
feat/ato-1395-studio-downloadfrom
fix/ato-1420-studio-engine-status
Closed

sosidudku1 wants to merge 2 commits into
feat/ato-1395-studio-downloadfrom
fix/ato-1420-studio-engine-status

Conversation

@sosidudku1

@sosidudku1 sosidudku1 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Linear: ATO-1420 (item 3). Stacked on #1161.

Problem. If Studio's first engine status request to Core failed, the engine was kept as missing and never asked again. On a computer that can't generate images locally, Download then no longer refused. The first catalog paint also waited up to 30 s for Core, where before it showed right away when Core was down.

Change (desktop/main/studio-local-models.ts, studio-media.ts):

  • Only definite answers are kept (ready, unsupported, and missing when Core names a build for this computer). A failed ask keeps nothing, so the next call (including Download's own check) asks again and can refuse with ENGINE_UNSUPPORTED.
  • A new definite answer, or a changed one, is sent as an engine event. Images and Video already reload the catalog on it.
  • The catalog asks for the engine for at most 1.5 s (ENGINE_ASK_ON_PAINT_MS). If Core is slower, the page paints without it and reloads when the answer arrives. Overlapping paints share one ask.

Tests (desktop/test/studio-local.test.mjs, 4 new): a failed first ask isn't kept and Download asks again; a definite answer is kept; a slow Core gives null quickly with one call, then the event; the local section returns in under 1.5 s when the engine never answers. Worth running studio-images.test.mjs and studio-video.test.mjs in the same pass.

Checked on the second Mac on 12.11.2026 in the combined run with the other open PRs: build, lint, test types, vitest, desktop unit tests, desktop smoke and live smoke all green.

…he catalog without waiting for Core

A failed ask for the image engine was kept as 'missing' and never asked
again, so Download stopped refusing on a computer that cannot run local
generation. Only a definite answer is kept now; Download asks again on
click. The catalog waits at most 1.5 s for the engine, overlapping paints
share one ask, and a late answer repaints the page as an engine event.
@sosidudku1

Copy link
Copy Markdown
Collaborator Author

Closing: this code is already merged into rel/xp-build via #1257 (and into main via #1256 where it applies). GitHub did not mark it merged because the PR targets another feature branch.

@sosidudku1 sosidudku1 closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant