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) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Dev
2026-03-13 23:14:22 +01:00
Ursprung ff7322e143
Commit 6ce24e80bb

Datei anzeigen

@@ -281,23 +281,19 @@ const UI = {
else if (i + 1 === step.active) el.classList.add('active'); else if (i + 1 === step.active) el.classList.add('active');
}); });
// Phasen-Bereiche für stetigen Fortschritt // Phasen-Mindestprozent (Floors) — kein Deckel, Balken kriecht global weiter
const ranges = { const floors = {
queued: { from: 2, to: 10 }, queued: 2, researching: 12, deep_researching: 12,
researching: { from: 12, to: 30 }, analyzing: 35, factchecking: 65, cancelling: 0,
deep_researching: { from: 12, to: 30 },
analyzing: { from: 33, to: 60 },
factchecking: { from: 65, to: 92 },
cancelling: { from: 0, to: 5 },
}; };
const range = ranges[status] || ranges.queued; const floor = floors[status] ?? 2;
const fill = document.getElementById('progress-fill'); const fill = document.getElementById('progress-fill');
if (fill) { if (fill) {
// Nicht rückwärts gehen, mindestens auf Phasen-Start springen // Mindestens auf Phasen-Floor springen, nie rückwärts
this._progressCurrentPercent = Math.max(this._progressCurrentPercent, range.from); this._progressCurrentPercent = Math.max(this._progressCurrentPercent, floor);
fill.style.width = this._progressCurrentPercent + '%'; fill.style.width = this._progressCurrentPercent + '%';
this._startProgressCreep(range.to); this._startProgressCreep();
} }
const percent = Math.round(this._progressCurrentPercent); 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) { _startProgressCreep() {
this._stopProgressCreep(); if (this._progressCreepTimer) return;
this._progressCreepTimer = setInterval(() => { this._progressCreepTimer = setInterval(() => {
const remaining = target - this._progressCurrentPercent; const remaining = 95 - this._progressCurrentPercent;
if (remaining <= 0.1) return; if (remaining <= 0.1) return;
// 3% des Restwegs pro Tick → asymptotisch, nie überschießend this._progressCurrentPercent += remaining * 0.005;
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');