Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: keep the audio Eject during a running task so it can say to stop first (#17564)

Nilayee1e9ecc314d
diff --git a/studio/frontend/src/features/audio/audio-page-policy.ts b/studio/frontend/src/features/audio/audio-page-policy.ts
index 064f911d017..82b31116871 100644
--- a/studio/frontend/src/features/audio/audio-page-policy.ts
+++ b/studio/frontend/src/features/audio/audio-page-policy.ts
@@ -657,7 +657,7 @@ export function audioEjectAvailable({
showLastPageModel: boolean;
sttReady: boolean;
}): boolean {
- if (!hasValue || busy !== null || showLastPageModel) return false;
+ if (!hasValue || busy === "loading" || busy === "unloading" || showLastPageModel) return false;
return mode !== "transcribe" || sttReady;
}
diff --git a/studio/frontend/tests/audio-page-policy.test.ts b/studio/frontend/tests/audio-page-policy.test.ts
index 8a744469199..59c8a0458b1 100644
--- a/studio/frontend/tests/audio-page-policy.test.ts
+++ b/studio/frontend/tests/audio-page-policy.test.ts
@@ -1063,7 +1063,7 @@ test("deleting the audio.cpp package forgets the folders remembered from it", ()
});
-test("Eject is offered only for a resident Transcribe model, and never while busy", () => {
+test("Eject is offered only for a resident Transcribe model, and never while loading or unloading", () => {
const idle = { busy: null, hasValue: true, showLastPageModel: false } as const;
assert.equal(audioEjectAvailable({ ...idle, mode: "transcribe", sttReady: true }), true);
// After an unload the selector still shows the last model; Eject there released nothing.
@@ -1077,6 +1077,14 @@ test("Eject is offered only for a resident Transcribe model, and never while bus
audioEjectAvailable({ ...idle, mode: "transcribe", sttReady: true, busy: "unloading" }),
false,
);
+ assert.equal(
+ audioEjectAvailable({ ...idle, mode: "speak", sttReady: false, busy: "generating" }),
+ true,
+ );
+ assert.equal(
+ audioEjectAvailable({ ...idle, mode: "transcribe", sttReady: true, busy: "transcribing" }),
+ true,
+ );
assert.equal(
audioEjectAvailable({ ...idle, mode: "speak", sttReady: false, hasValue: false }),
false,