mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
fix(workflow): Add user choice for session completion and sync task status on archive
- Replace auto-complete with AskUserQuestion in execute.md Phase 5 - User can choose "Enter Review" or "Complete Session" - Fix archived tasks showing incomplete on dashboard - executeArchive now updates all .task/*.json status to completed
This commit is contained in:
@@ -696,6 +696,23 @@ function executeArchive(params: Params): any {
|
||||
} catch { /* continue */ }
|
||||
}
|
||||
}
|
||||
|
||||
// Update all task JSONs to completed status
|
||||
const taskDir = join(session.path, '.task');
|
||||
if (existsSync(taskDir)) {
|
||||
const taskFiles = readdirSync(taskDir).filter(f => f.endsWith('.json'));
|
||||
for (const taskFile of taskFiles) {
|
||||
try {
|
||||
const taskPath = join(taskDir, taskFile);
|
||||
const taskData = readJsonFile(taskPath);
|
||||
if (taskData.status && taskData.status !== 'completed') {
|
||||
taskData.status = 'completed';
|
||||
taskData.completed_at = new Date().toISOString();
|
||||
writeJsonFile(taskPath, taskData);
|
||||
}
|
||||
} catch { /* skip invalid task files */ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure archive directory exists
|
||||
|
||||
Reference in New Issue
Block a user