fix: progress bar now shows milestone progress instead of overall progress

This commit is contained in:
2026-01-16 23:21:41 +01:00
parent 044b14c1b4
commit f5151706c1

View File

@@ -318,10 +318,9 @@ let lastMilestoneReached = 0;
function updateProgressDisplay() { function updateProgressDisplay() {
const stats = lessonEngine.getProgressStats(); const stats = lessonEngine.getProgressStats();
// Update progress bar - shows overall progress with full gradient // Update progress bar - shows progress towards next milestone
const progressPercent = stats.percentComplete || 1; const progressPercent = stats.progressToNext || 1;
elements.progressFill.style.width = `${progressPercent}%`; elements.progressFill.style.width = `${progressPercent}%`;
elements.progressFill.style.setProperty('--progress-percent', progressPercent);
// Update progress current - show progress towards next milestone // Update progress current - show progress towards next milestone
elements.progressCurrent.textContent = `${stats.totalCompleted}/${stats.nextMilestone}`; elements.progressCurrent.textContent = `${stats.totalCompleted}/${stats.nextMilestone}`;