mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 08:59:40 +02:00
fix: only show Complete status when all todos are done
Previously the Ralph tracker showed "Complete" whenever a completion phrase was detected, even if tasks were still pending. Now it only shows "Complete" when all todos are actually marked completed (100%). Shows "Tracking" when: - Tracker is enabled with pending tasks - Completion phrase detected but tasks remain Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2093,8 +2093,8 @@ class ClaudemanApp {
|
|||||||
// Update progress rings
|
// Update progress rings
|
||||||
this.updateRalphRing(percent);
|
this.updateRalphRing(percent);
|
||||||
|
|
||||||
// Update status badge
|
// Update status badge (pass completion info)
|
||||||
this.updateRalphStatus(state?.loop);
|
this.updateRalphStatus(state?.loop, completed, total);
|
||||||
|
|
||||||
// Update stats
|
// Update stats
|
||||||
this.updateRalphStats(state?.loop, completed, total);
|
this.updateRalphStats(state?.loop, completed, total);
|
||||||
@@ -2146,7 +2146,7 @@ class ClaudemanApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateRalphStatus(loop) {
|
updateRalphStatus(loop, completed = 0, total = 0) {
|
||||||
const badge = this.$('ralphStatusBadge');
|
const badge = this.$('ralphStatusBadge');
|
||||||
const statusText = badge?.querySelector('.ralph-status-text');
|
const statusText = badge?.querySelector('.ralph-status-text');
|
||||||
if (!badge || !statusText) return;
|
if (!badge || !statusText) return;
|
||||||
@@ -2156,10 +2156,11 @@ class ClaudemanApp {
|
|||||||
if (loop?.active) {
|
if (loop?.active) {
|
||||||
badge.classList.add('active');
|
badge.classList.add('active');
|
||||||
statusText.textContent = 'Running';
|
statusText.textContent = 'Running';
|
||||||
} else if (loop?.completionPhrase && !loop?.active) {
|
} else if (total > 0 && completed === total) {
|
||||||
|
// Only show "Complete" when all todos are actually done
|
||||||
badge.classList.add('completed');
|
badge.classList.add('completed');
|
||||||
statusText.textContent = 'Complete';
|
statusText.textContent = 'Complete';
|
||||||
} else if (loop?.enabled) {
|
} else if (loop?.enabled || total > 0) {
|
||||||
badge.classList.add('tracking');
|
badge.classList.add('tracking');
|
||||||
statusText.textContent = 'Tracking';
|
statusText.textContent = 'Tracking';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user