fix: improve subtask & parent task management (#1251)

This commit is contained in:
Ralph Khreish
2025-09-26 11:04:38 +02:00
committed by GitHub
parent c0682ac795
commit 0b2c6967c4
2 changed files with 8 additions and 0 deletions

View File

@@ -409,8 +409,11 @@ export class FileStorage implements IStorage {
const allDone = subs.every(isDoneLike);
const anyInProgress = subs.some((s) => norm(s) === 'in-progress');
const anyDone = subs.some(isDoneLike);
const allPending = subs.every((s) => norm(s) === 'pending');
if (allDone) parentNewStatus = 'done';
else if (anyInProgress || anyDone) parentNewStatus = 'in-progress';
else if (allPending) parentNewStatus = 'pending';
}
// Always bump updatedAt; update status only if changed