From cb0492fb3e83ffd121e0282b10f8e36ac8fc425a Mon Sep 17 00:00:00 2001 From: avi Date: Thu, 17 Sep 2026 16:16:27 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20stuck=20'Summarizing=E2=80=A6=200%':=20th?= =?UTF-8?q?e=20'already=20running=20=E2=80=94=20attach=20to=20it'=20branch?= =?UTF-8?q?=20in=20reprocessInPlace=20returned=20without=20polling,=20stra?= =?UTF-8?q?nding=20the=20initial=20busy=20label=20on=20screen=20forever=20?= =?UTF-8?q?(comment=20promised=20live=20progress=20the=20code=20never=20di?= =?UTF-8?q?d).=20Now=20it=20falls=20through=20to=20the=20same=20poll=20loo?= =?UTF-8?q?p=20as=20a=20fresh=20job.=20Also=20makes=20every=20early-return?= =?UTF-8?q?=20clear=20the=20busy=20state.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/kotlin/com/shonar/desktop/DesktopState.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt b/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt index 5419b8f..6898eba 100644 --- a/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt +++ b/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt @@ -1527,19 +1527,23 @@ class DesktopState(private val appDir: File = defaultAppDir()) { d0.remoteId = null d0.busy = null d0.error = "That server recording no longer exists — press Transcribe to upload again." + _detail.value = d0.copy() + return@launch } else if (it is ProviderError.Transient && it.message?.contains("already running") == true) { // The engine already works this stage (earlier click, // auto-queue, or a job that survived an app restart): - // that IS the work the user asked for — attach to it - // and show live progress instead of an error. + // that IS the work the user asked for — fall through to + // the poll loop below and show its live progress. + // (Returning here used to strand the initial + // "Summarizing… 0%" label on screen forever.) d0.error = null } else { d0.busy = null d0.error = it.message ?: "Reprocess failed." + _detail.value = d0.copy() + return@launch } - _detail.value = d0.copy() - return@launch } // Poll the target job to a terminal state. while (true) {