From 54e1f90c2256c01e385283f30d48bc0cc98ff365 Mon Sep 17 00:00:00 2001 From: avi Date: Fri, 18 Sep 2026 09:10:45 -0500 Subject: [PATCH] =?UTF-8?q?Detail:=20upload+transcribe=20now=20polls=20the?= =?UTF-8?q?=20WHOLE=20pipeline=20(transcribe=20AND=20summarize)=20before?= =?UTF-8?q?=20leaving=20the=20live-update=20loop=20=E2=80=94=20breaking=20?= =?UTF-8?q?on=20transcribe=20alone=20left=20'Summarizing=E2=80=A6=200%'=20?= =?UTF-8?q?on=20screen=20after=20the=20summary=20actually=20finished=20(se?= =?UTF-8?q?en=20live=20on=20'Ali=20Tall=20buildings':=20engine=20succeeded?= =?UTF-8?q?=20at=2013:38:52,=20screen=20kept=20the=20stale=20job=20snapsho?= =?UTF-8?q?t=20until=20reopen).=20Also=20clears=20the=20busy=20label=20whe?= =?UTF-8?q?n=20no=20job=20is=20active=20instead=20of=20leaving=20the=20las?= =?UTF-8?q?t=20one.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/kotlin/com/shonar/desktop/DesktopState.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt b/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt index f9c75c7..2f73143 100644 --- a/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt +++ b/app/src/main/kotlin/com/shonar/desktop/DesktopState.kt @@ -1542,13 +1542,16 @@ class DesktopState(private val appDir: File = defaultAppDir()) { d.busy = "Transcribing…" d.uploadProgress = null _detail.value = d.copy() - // Poll jobs until the transcribe step reaches a terminal state. + // Poll jobs until the WHOLE pipeline is terminal. Breaking on + // transcribe alone froze the screen: the last d.jobs snapshot + // still showed summarize running at 0%, and nothing refreshed + // it (or the finished summary) until the file was reopened. while (true) { delay(2000) val jobs = runCatching { parseJobs(provider.fetchJobs(ref.key)) }.getOrNull() .orEmpty() d.jobs = jobs - jobLabel(jobs)?.let { d.busy = it } + jobLabel(jobs)?.let { d.busy = it } ?: run { d.busy = null } // Mirror live progress onto the library row (same as the // pump + reprocess paths) so leaving the detail screen // doesn't make the job look dead. @@ -1556,7 +1559,8 @@ class DesktopState(private val appDir: File = defaultAppDir()) { rescanStatuses() _detail.value = d.copy() val t = jobs.firstOrNull { it.jobType == "transcribe" }?.status - if (t == null || t in TERMINAL) break + val s = jobs.firstOrNull { it.jobType == "summarize" }?.status + if ((t == null || t in TERMINAL) && (s == null || s in TERMINAL)) break } setLive(d.file.name, null) rescanStatuses()