From 9931cc2ed3bf8600aa398aad6e8acf0674bb5ff0 Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Fri, 13 Mar 2026 23:16:38 +0100 Subject: [PATCH] Revert "Fortschrittsbalken: globaler Creep statt Phasen-Deckel" This reverts commit 6ce24e80bb1a6ba1fe2cc3eb36db62701b728e4d. --- src/static/js/components.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/static/js/components.js b/src/static/js/components.js index f304523..f2d9263 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -281,19 +281,23 @@ const UI = { else if (i + 1 === step.active) el.classList.add('active'); }); - // Phasen-Mindestprozent (Floors) — kein Deckel, Balken kriecht global weiter - const floors = { - queued: 2, researching: 12, deep_researching: 12, - analyzing: 35, factchecking: 65, cancelling: 0, + // 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 }, }; - const floor = floors[status] ?? 2; + const range = ranges[status] || ranges.queued; const fill = document.getElementById('progress-fill'); if (fill) { - // Mindestens auf Phasen-Floor springen, nie rückwärts - this._progressCurrentPercent = Math.max(this._progressCurrentPercent, floor); + // Nicht rückwärts gehen, mindestens auf Phasen-Start springen + this._progressCurrentPercent = Math.max(this._progressCurrentPercent, range.from); fill.style.width = this._progressCurrentPercent + '%'; - this._startProgressCreep(); + this._startProgressCreep(range.to); } const percent = Math.round(this._progressCurrentPercent); @@ -327,15 +331,15 @@ const UI = { }, /** - * Creep-Animation: Balken kriecht global asymptotisch Richtung 95%. - * Kein Phasen-Deckel — Phasenwechsel geben nur Boosts über die Floors. + * Creep-Animation starten: Balken kriecht asymptotisch zum Ziel. */ - _startProgressCreep() { - if (this._progressCreepTimer) return; + _startProgressCreep(target) { + this._stopProgressCreep(); this._progressCreepTimer = setInterval(() => { - const remaining = 95 - this._progressCurrentPercent; + const remaining = target - this._progressCurrentPercent; if (remaining <= 0.1) return; - this._progressCurrentPercent += remaining * 0.005; + // 3% des Restwegs pro Tick → asymptotisch, nie überschießend + this._progressCurrentPercent += remaining * 0.03; const fill = document.getElementById('progress-fill'); if (fill) fill.style.width = this._progressCurrentPercent + '%'; const bar = document.getElementById('progress-bar');