From 2c7c9af55affc13eacab0ca0bb7681c86dc15432 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Sun, 8 Mar 2026 08:34:26 +0100 Subject: [PATCH] ui: ETA starts at 30s/card and shows 'gleich fertig' under 10s --- public/index.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 186924d..57cdc3e 100644 --- a/public/index.html +++ b/public/index.html @@ -527,15 +527,23 @@ async function pollJob(jobId){ const avgPerCard = elapsedSec / done; aiEtaBaseSec = (total - done) * avgPerCard; aiEtaBaseTs = now; + } else if (done === 0 && total > 0) { + aiEtaBaseSec = total * 30; + aiEtaBaseTs = aiJobClientStartTs || now; } else { aiEtaBaseSec = null; aiEtaBaseTs = null; } } + if ((aiEtaBaseSec == null || aiEtaBaseTs == null) && done === 0 && total > 0) { + aiEtaBaseSec = total * 30; + aiEtaBaseTs = aiJobClientStartTs || now; + } + if (aiEtaBaseSec != null && aiEtaBaseTs != null && total > done) { const countdown = Math.max(0, aiEtaBaseSec - ((now - aiEtaBaseTs) / 1000)); - etaTxt = ` – Restdauer ~${fmtDuration(countdown)}`; + etaTxt = countdown < 10 ? ' – gleich fertig' : ` – Restdauer ~${fmtDuration(countdown)}`; } document.getElementById('aiProgressText').textContent = `${done}/${total} (${j.progress||0}%)${etaTxt}`;