feat(HAI-003): clear status and worktree in moveTask when moving to done

This commit is contained in:
Dustin Byrne
2026-03-25 20:01:24 -04:00
parent 158c0ceb59
commit 51099fc52a

View File

@@ -155,6 +155,12 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
task.column = toColumn;
task.updatedAt = new Date().toISOString();
// Clear transient fields when moving to done (matches moveToDone behavior)
if (toColumn === "done") {
task.status = undefined;
task.worktree = undefined;
}
const taskJsonPath = join(dir, "task.json");
this.suppressWatcher(taskJsonPath);
await writeFile(taskJsonPath, JSON.stringify(task, null, 2));