Revert "Fortschrittsbalken: globaler Creep statt Phasen-Deckel"

This reverts commit 6ce24e80bb.
Dieser Commit ist enthalten in:
Claude Dev
2026-03-13 23:16:38 +01:00
Ursprung 6ce24e80bb
Commit 9931cc2ed3

Datei anzeigen

@@ -281,19 +281,23 @@ const UI = {
else if (i + 1 === step.active) el.classList.add('active'); else if (i + 1 === step.active) el.classList.add('active');
}); });
// Phasen-Mindestprozent (Floors) — kein Deckel, Balken kriecht global weiter // Phasen-Bereiche für stetigen Fortschritt
const floors = { const ranges = {
queued: 2, researching: 12, deep_researching: 12, queued: { from: 2, to: 10 },
analyzing: 35, factchecking: 65, cancelling: 0, 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'); const fill = document.getElementById('progress-fill');
if (fill) { if (fill) {
// Mindestens auf Phasen-Floor springen, nie rückwärts // Nicht rückwärts gehen, mindestens auf Phasen-Start springen
this._progressCurrentPercent = Math.max(this._progressCurrentPercent, floor); this._progressCurrentPercent = Math.max(this._progressCurrentPercent, range.from);
fill.style.width = this._progressCurrentPercent + '%'; fill.style.width = this._progressCurrentPercent + '%';
this._startProgressCreep(); this._startProgressCreep(range.to);
} }
const percent = Math.round(this._progressCurrentPercent); const percent = Math.round(this._progressCurrentPercent);
@@ -327,15 +331,15 @@ const UI = {
}, },
/** /**
* Creep-Animation: Balken kriecht global asymptotisch Richtung 95%. * Creep-Animation starten: Balken kriecht asymptotisch zum Ziel.
* Kein Phasen-Deckel — Phasenwechsel geben nur Boosts über die Floors.
*/ */
_startProgressCreep() { _startProgressCreep(target) {
if (this._progressCreepTimer) return; this._stopProgressCreep();
this._progressCreepTimer = setInterval(() => { this._progressCreepTimer = setInterval(() => {
const remaining = 95 - this._progressCurrentPercent; const remaining = target - this._progressCurrentPercent;
if (remaining <= 0.1) return; 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'); const fill = document.getElementById('progress-fill');
if (fill) fill.style.width = this._progressCurrentPercent + '%'; if (fill) fill.style.width = this._progressCurrentPercent + '%';
const bar = document.getElementById('progress-bar'); const bar = document.getElementById('progress-bar');