feat(dashboard): TaskUiStatus type + StatusPill component #981
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!981
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/963"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unified status vocabulary (Planning · Executing · Waiting · Reviewing · Done · Error · Abandoned) replacing raw
task_history.statusstrings across dashboard surfaces.Test plan
just qaclean — all 3316 server tests + 13 newStatusPillsnapshot tests passui_status/ui_status_reasonkeysStatusPill; fallback client-side derivation for old server responsesprefers-reduced-motion: pulsing dot animation zeroed by global rule instyles/index.cssCloses #963
CI green. Core implementation (
TaskUiStatus,deriveTaskUiStatus,StatusPill) looks correct. Two issues:apps/web/src/components/task-detail.tsx,task-list.tsx: AC lists 6 mount points — planner board card, agent timeline header, and agent kanban are absent from the diff. If those components don't exist yet, note that explicitly and don't close #963 until they're covered. If they do exist, addStatusPillthere too.packages/shared/src/task-ui-status.tsderiveTaskUiStatusReason+apps/web/src/components/task-detail.tsx+task-list.tsx:fallbackUiStatusis copy-pasted identically in both consumer files. Move it toapps/web/src/lib/api.ts(or a shared util) and import from one place.Both points addressed:
fallbackUiStatusmoved toapps/web/src/lib/api.tsand imported in both consumers — no more duplication.StatusPillnow mounted onboard-card.tsx(planner board card). Addedui_status?/ui_status_reason?toBoardCardshared type; client-side derivation mapsrunning→executing,queued→planning,in_review→reviewing, reviewer instance→reviewing; server-supplied value takes priority.idle_assigned/unassignedkeepStatusBadge(no active task). 8 new tests cover the mount and server-override path.Agent timeline header and agent kanban do not exist in the codebase — #963 stays open until those surfaces are built.
CI green.
TaskUiStatustype,deriveTaskUiStatus/deriveTaskUiStatusReason,StatusPill, and all call-sites correct. Fallback derivation handles all knownTaskStatusvalues; server-suppliedui_statusoverrides cleanly. 13 snapshot tests + board-card integration tests cover the matrix.Addressed both review items in commit
3c63215e:behavior —
fallbackUiStatusdeduplicationMoved the function to
apps/web/src/lib/api.tsas an exported named export. Bothtask-detail.tsxandtask-list.tsxnow import from@/lib/apiand have had their local copies removed.ac-gap — missing StatusPill mount points
Investigated all three surfaces the AC listed:
board-side-panel.tsx)STATUS_BADGE/STATUS_LABELmaps with<StatusPill>driven byderiveTaskUiStatusfrom@claude-hooks/shared. Shown for any task state once the detail record loads (not just finished tasks).board-card.tsx)deriveBoardUiStatushelper that mapsBoardCardStatus→TaskUiStatus(falling back to server-suppliedcard.ui_statuswhen present).<StatusPill>renders in the bottom row forrunning/queued/in_reviewcards; absent foridle_assigned/unassignedwhere no task-level status exists. ExtendedBoardCardschema inpackages/sharedwith optionalui_status/ui_status_reasonfields so the server can supply the value directly.8 new tests added to
board-card.test.tsxcovering StatusPill presence for each status and the server-override path.