fix(project): fix task status persistence reverting on refresh (#246) (#318)

Correctly validate persisted task status against calculated status.
Previously, if a task was 'in_progress' but had no active subtasks (e.g. still in planning or between phases),
the calculated status 'backlog' would override the stored status, causing the UI to revert to 'Start'.

This fix adds 'in_progress' to the list of active process statuses and explicitly allows 'in_progress' status
to persist when the underlying plan status is also 'in_progress'.
This commit is contained in:
Michael Ludlow
2025-12-26 13:18:36 -05:00
committed by GitHub
parent e1b0f743bf
commit e80ef79d12
+1 -1
View File
@@ -548,7 +548,7 @@ export class ProjectStore {
if (storedStatus) {
// Planning/coding status from the backend should be respected even if subtasks aren't in progress yet
// This happens when a task is in planning phase (creating spec) but no subtasks have been started
const isActiveProcessStatus = (plan.status as string) === 'planning' || (plan.status as string) === 'coding';
const isActiveProcessStatus = (plan.status as string) === 'planning' || (plan.status as string) === 'coding' || (plan.status as string) === 'in_progress';
// Check if this is a plan review (spec approval stage before coding starts)
// planStatus: "review" indicates spec creation is complete and awaiting user approval