refactor(shared): single TaskStatus enum replaces dual db-status / ui_status split #1163
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
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
charles/agent-hooks#1163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
As a developer, I want a single exhaustive TaskStatus type shared between the DB layer and the UI, so that adding a new status state doesn't require updating two enums and two mapping functions in separate packages.
Acceptance criteria
Package
packages/shared/src/task-status.tsexportsTaskStatus(canonical union covering all DB values) andDisplayStatus(UI display states)toDisplayStatus(s: TaskStatus): DisplayStatusmapping function in the same file — replaces the dual-enum mapping currently scattered across componentspackages/shared/src/index.tsre-exports both types + the mapping functionDB layer
task_history.statuscolumn type aligned toTaskStatusstring unionWeb
task.ui_statuscomputed field removed from the API wire formattask.ui_statusreplaced withtoDisplayStatus(task.status)StatusPillprops unchanged (still consumesDisplayStatusvalues)Quality
just qapasses (typecheck + lint clean)Out of scope
StatusPillvisual appearanceReferences