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');
});
// 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');