summaryrefslogtreecommitdiff
path: root/Omni/Task
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-01 13:51:21 -0500
committerBen Sima <ben@bensima.com>2025-12-01 13:51:21 -0500
commit7e03d8f323d44b972aeceb009928c977ee64fed2 (patch)
tree49ee87005e6ff5bd0716304ea66bbd497f06b0f6 /Omni/Task
parent0873611b69284384ee441d6f236b6455e0d41e2b (diff)
Replace HumanTask type with NeedsHelp status
- Remove HumanTask from TaskType enum (now Epic | WorkTask only) - Add NeedsHelp to Status enum for tasks requiring human guidance - Update getReadyTasks to filter NeedsHelp instead of HumanTask - Rename humanTasks to tasksNeedingHelp in HumanActionItems - Add CLI parsing for needs-help status in list/update commands - Add badge styling for NeedsHelp (amber/yellow theme) - Update all status pattern matches in tree view and print functions - Update tests to verify NeedsHelp exclusion from ready queue Task-Id: t-210
Diffstat (limited to 'Omni/Task')
-rw-r--r--Omni/Task/Core.hs17
1 files changed, 10 insertions, 7 deletions
diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs
index 35f3ea7..8badf6b 100644
--- a/Omni/Task/Core.hs
+++ b/Omni/Task/Core.hs
@@ -45,10 +45,10 @@ data Task = Task
}
deriving (Show, Eq, Generic)
-data TaskType = Epic | WorkTask | HumanTask
+data TaskType = Epic | WorkTask
deriving (Show, Eq, Read, Generic)
-data Status = Draft | Open | InProgress | Review | Approved | Done
+data Status = Draft | Open | InProgress | Review | Approved | Done | NeedsHelp
deriving (Show, Eq, Read, Generic)
-- Priority levels (matching beads convention)
@@ -86,7 +86,7 @@ data EpicForReview = EpicForReview
data HumanActionItems = HumanActionItems
{ failedTasks :: [Task],
epicsInReview :: [EpicForReview],
- humanTasks :: [Task]
+ tasksNeedingHelp :: [Task]
}
deriving (Show, Eq, Generic)
@@ -806,8 +806,8 @@ getReadyTasks = do
/= Epic
&& not (isParent (taskId task))
&& all (`elem` doneIds) (blockingDepIds task)
- && taskType task
- /= HumanTask
+ && taskStatus task
+ /= NeedsHelp
&& taskId task
`notElem` needsInterventionIds
pure <| filter isReady openTasks
@@ -920,6 +920,7 @@ showTaskTree maybeId = do
Review -> "[?]"
Approved -> "[+]"
Done -> "[✓]"
+ NeedsHelp -> "[!]"
coloredStatusStr = case taskType task of
Epic -> magenta statusStr
@@ -930,6 +931,7 @@ showTaskTree maybeId = do
Review -> magenta statusStr
Approved -> green statusStr
Done -> green statusStr
+ NeedsHelp -> yellow statusStr
nsStr = case taskNamespace task of
Nothing -> ""
@@ -988,6 +990,7 @@ printTask t = do
Review -> magenta s
Approved -> green s
Done -> green s
+ NeedsHelp -> yellow s
coloredTitle = if taskType t == Epic then bold (taskTitle t) else taskTitle t
coloredProgress = if taskType t == Epic then magenta progressInfo else progressInfo
@@ -1556,12 +1559,12 @@ getHumanActionItems = do
let completed = length [c | c <- children, taskStatus c == Done],
completed == total
]
- human = [t | t <- allTasks, taskType t == HumanTask, taskStatus t == Open]
+ needingHelp = [t | t <- allTasks, taskStatus t == NeedsHelp]
pure
HumanActionItems
{ failedTasks = failed,
epicsInReview = epicsReady,
- humanTasks = human
+ tasksNeedingHelp = needingHelp
}
-- | Get all retry contexts from the database