fix: clamp task counter to prevent "task 5/4" display after loop recovery
When auto-mode loop recovery marks tasks as [x] in the plan file and auto is restarted, the done count can equal total. The display always showed done+1 (assuming "currently working on next task"), causing values like "task 5/4". Clamp to total so it never exceeds the max. Closes #662 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2966be30cb
commit
3399852f6d
1 changed files with 2 additions and 1 deletions
|
|
@ -340,7 +340,8 @@ export function updateProgressWidget(
|
|||
let meta = theme.fg("dim", `${done}/${total} slices`);
|
||||
|
||||
if (activeSliceTasks && activeSliceTasks.total > 0) {
|
||||
meta += theme.fg("dim", ` · task ${activeSliceTasks.done + 1}/${activeSliceTasks.total}`);
|
||||
const taskNum = Math.min(activeSliceTasks.done + 1, activeSliceTasks.total);
|
||||
meta += theme.fg("dim", ` · task ${taskNum}/${activeSliceTasks.total}`);
|
||||
}
|
||||
|
||||
lines.push(truncateToWidth(`${pad}${bar} ${meta}`, width));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue