From 01a6ed7b7bc217c5774f5665a946c1bd3898b52e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 20 Nov 2025 16:43:14 -0500 Subject: chore: task breakdown and cleanup - Updated Omni/Task/Core.hs to filter parent tasks from 'task ready' - Broke down 'PodcastItLater: Path to Paid Product' into 5 subtasks - Broke down 'General Code Quality Refactor' into 3 subtasks - Broke down 'Complete comprehensive test suite' into 2 subtasks - Fixed namespace naming in tasks.jsonl --- Omni/Task/Core.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Omni/Task/Core.hs') diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs index af105de..f7b7915 100644 --- a/Omni/Task/Core.hs +++ b/Omni/Task/Core.hs @@ -246,15 +246,22 @@ listTasks maybeType maybeParent maybeStatus maybeNamespace = do filterByNamespace Nothing ts = ts filterByNamespace (Just ns) ts = filter (\t -> taskNamespace t == Just ns) ts --- Get ready tasks (not blocked by dependencies) +-- Get ready tasks (not blocked by dependencies and not a parent) getReadyTasks :: IO [Task] getReadyTasks = do allTasks <- loadTasks let openTasks = filter (\t -> taskStatus t /= Done) allTasks doneIds = map taskId <| filter (\t -> taskStatus t == Done) allTasks + + -- Find all tasks that act as parents + parentIds = mapMaybe taskParent allTasks + isParent tid = tid `elem` parentIds + -- Only Blocks and ParentChild dependencies block ready work blockingDepIds task = [depId dep | dep <- taskDependencies task, depType dep `elem` [Blocks, ParentChild]] - isReady task = all (`elem` doneIds) (blockingDepIds task) + isReady task = + not (isParent (taskId task)) + && all (`elem` doneIds) (blockingDepIds task) pure <| filter isReady openTasks -- Get dependency tree for a task (returns tasks) -- cgit v1.2.3