feat(tasks): adopt canonical task statuses

This commit is contained in:
2026-05-26 01:32:50 +02:00
parent da5aee6e38
commit 38835e9e79
61 changed files with 692 additions and 342 deletions

View File

@@ -51,7 +51,7 @@ const _ts = interventionState.ts;
```
```js
const OPEN_STATUSES = new Set(["todo", "in_progress", "blocked"]);
const OPEN_STATUSES = new Set(["wait", "todo", "progress"]);
// open = currently flagged for human action
// closed = previously flagged (intervention_note records the resolution comment)
const open = tasks.filter(t => t.needs_human === true);
@@ -125,7 +125,7 @@ Tasks flagged `needs_human=true` — actions only a human can take.
import {openActionConfirm} from "./components/action-confirm.js";
const PRIORITY_ORDER = {critical: 0, high: 1, medium: 2, low: 3};
const STATUS_ORDER = {blocked: 0, in_progress: 1, todo: 2};
const STATUS_ORDER = {wait: 0, progress: 1, todo: 2};
function sortTasks(arr) {
return [...arr].sort((a, b) => {
@@ -217,11 +217,11 @@ if (closed.length === 0) {
.task-priority-medium { background: #dbeafe; color: #1e40af; }
.task-priority-low { background: #f1f5f9; color: #475569; }
.task-status-chip { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 10px; font-size: 0.7rem; font-weight: 500; }
.status-chip-blocked { background: #fee2e2; color: #991b1b; }
.status-chip-in_progress { background: #dbeafe; color: #1e40af; }
.status-chip-wait { background: #fef3c7; color: #92400e; }
.status-chip-progress { background: #ede9fe; color: #5b21b6; }
.status-chip-todo { background: #f1f5f9; color: #475569; }
.status-chip-done { background: #dcfce7; color: #166534; }
.status-chip-cancelled { background: #f1f5f9; color: #64748b; }
.status-chip-cancel { background: #f1f5f9; color: #64748b; }
.task-context { color: var(--theme-foreground-muted, #666); }
.task-ws-name { font-style: italic; }
.dim { color: gray; font-style: italic; }