feat(HAI-007): set specifying status during triage

- Set task status to 'specifying' when triage specification begins
- Clear status back to null before moving task to todo on success
- Clear status on specification error with safe catch
- Add 'specifying' to active statuses in dashboard TaskCard
This commit is contained in:
Dustin Byrne
2026-03-25 20:54:11 -04:00
2 changed files with 4 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ const COLUMN_TEXT_COLOR_MAP: Record<Column, string> = {
done: "var(--done)",
};
const ACTIVE_STATUSES = new Set(["planning", "researching", "executing", "finalizing", "merging"]);
const ACTIVE_STATUSES = new Set(["planning", "researching", "executing", "finalizing", "merging", "specifying"]);
interface TaskCardProps {
task: Task;

View File

@@ -192,6 +192,7 @@ export class TriageProcessor {
console.log(`[triage] Specifying ${task.id}: ${task.title || task.description.slice(0, 60)}`);
this.options.onSpecifyStart?.(task);
await this.store.updateTask(task.id, { status: "specifying" });
try {
const detail = await this.store.getTask(task.id);
@@ -211,6 +212,7 @@ export class TriageProcessor {
await session.prompt(agentPrompt);
// Move to todo
await this.store.updateTask(task.id, { status: null });
await this.store.moveTask(task.id, "todo");
console.log(`[triage] ✓ ${task.id} specified and moved to todo`);
this.options.onSpecifyComplete?.(task);
@@ -218,6 +220,7 @@ export class TriageProcessor {
session.dispose();
}
} catch (err: any) {
await this.store.updateTask(task.id, { status: null }).catch(() => {});
console.error(`[triage] ✗ ${task.id} specification failed:`, err.message);
this.options.onSpecifyError?.(task, err);
} finally {