diff --git a/ui/src/routes/Main.svelte b/ui/src/routes/Main.svelte index c8b6f30..4ef5a24 100644 --- a/ui/src/routes/Main.svelte +++ b/ui/src/routes/Main.svelte @@ -112,8 +112,12 @@ try { const next = await getCall(id) if (request === detailRequest && id === selectedId) { - // A refresh of the same call keeps what the user picked. - if (next.call.id !== detail?.call.id) language = next.language + // A refresh of the same call keeps what the user picked, unless the + // backend's suggestion changed (e.g. it was transcribed from the + // prompt in another language and failed). + if (next.call.id !== detail?.call.id || next.language !== detail?.language) { + language = next.language + } detail = next detailError = '' } diff --git a/ui/src/routes/Prompt.svelte b/ui/src/routes/Prompt.svelte index 35fdc7d..199b566 100644 --- a/ui/src/routes/Prompt.svelte +++ b/ui/src/routes/Prompt.svelte @@ -19,10 +19,12 @@ let language = $state('de') function show(next: PendingPrompt | null) { - // A refresh of the same call keeps what the user picked. - if (next?.id !== brief?.id) { - error = '' - if (next) language = next.language + if (next?.id !== brief?.id) error = '' + // A refresh of the same call keeps what the user picked, unless the + // backend's suggestion changed (e.g. a transcription started from the + // main window in another language). + if (next && (next.id !== brief?.id || next.language !== brief?.language)) { + language = next.language } brief = next }