From 6ce24e80bb1a6ba1fe2cc3eb36db62701b728e4d Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Fri, 13 Mar 2026 23:14:22 +0100 Subject: [PATCH] Fortschrittsbalken: globaler Creep statt Phasen-Deckel Phasen haben nur noch Mindest-Floors (queued 2%, recherche 12%, analyse 35%, faktencheck 65%), keinen Deckel mehr. Der Balken kriecht global asymptotisch Richtung 95% (0.5% des Restwegs pro 500ms), sodass er nie stehenbleibt. Phasenwechsel geben sichtbare Boosts nach oben, complete snappt auf 100%. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/static/js/components.js | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/static/js/components.js b/src/static/js/components.js index f2d9263..f304523 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -281,23 +281,19 @@ const UI = { else if (i + 1 === step.active) el.classList.add('active'); }); - // Phasen-Bereiche für stetigen Fortschritt - const ranges = { - queued: { from: 2, to: 10 }, - researching: { from: 12, to: 30 }, - deep_researching: { from: 12, to: 30 }, - analyzing: { from: 33, to: 60 }, - factchecking: { from: 65, to: 92 }, - cancelling: { from: 0, to: 5 }, + // Phasen-Mindestprozent (Floors) — kein Deckel, Balken kriecht global weiter + const floors = { + queued: 2, researching: 12, deep_researching: 12, + analyzing: 35, factchecking: 65, cancelling: 0, }; - const range = ranges[status] || ranges.queued; + const floor = floors[status] ?? 2; const fill = document.getElementById('progress-fill'); if (fill) { - // Nicht rückwärts gehen, mindestens auf Phasen-Start springen - this._progressCurrentPercent = Math.max(this._progressCurrentPercent, range.from); + // Mindestens auf Phasen-Floor springen, nie rückwärts + this._progressCurrentPercent = Math.max(this._progressCurrentPercent, floor); fill.style.width = this._progressCurrentPercent + '%'; - this._startProgressCreep(range.to); + this._startProgressCreep(); } const percent = Math.round(this._progressCurrentPercent); @@ -331,15 +327,15 @@ const UI = { }, /** - * Creep-Animation starten: Balken kriecht asymptotisch zum Ziel. + * Creep-Animation: Balken kriecht global asymptotisch Richtung 95%. + * Kein Phasen-Deckel — Phasenwechsel geben nur Boosts über die Floors. */ - _startProgressCreep(target) { - this._stopProgressCreep(); + _startProgressCreep() { + if (this._progressCreepTimer) return; this._progressCreepTimer = setInterval(() => { - const remaining = target - this._progressCurrentPercent; + const remaining = 95 - this._progressCurrentPercent; if (remaining <= 0.1) return; - // 3% des Restwegs pro Tick → asymptotisch, nie überschießend - this._progressCurrentPercent += remaining * 0.03; + this._progressCurrentPercent += remaining * 0.005; const fill = document.getElementById('progress-fill'); if (fill) fill.style.width = this._progressCurrentPercent + '%'; const bar = document.getElementById('progress-bar');