diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-01 13:51:21 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-01 13:51:21 -0500 |
| commit | 7e03d8f323d44b972aeceb009928c977ee64fed2 (patch) | |
| tree | 49ee87005e6ff5bd0716304ea66bbd497f06b0f6 /Omni/Jr/Web.hs | |
| parent | 0873611b69284384ee441d6f236b6455e0d41e2b (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/Jr/Web.hs')
| -rw-r--r-- | Omni/Jr/Web.hs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs index 2e4ee66..8508560 100644 --- a/Omni/Jr/Web.hs +++ b/Omni/Jr/Web.hs @@ -680,6 +680,7 @@ statusBadge status = TaskCore.Review -> ("badge badge-review", "Review") TaskCore.Approved -> ("badge badge-approved", "Approved") TaskCore.Done -> ("badge badge-done", "Done") + TaskCore.NeedsHelp -> ("badge badge-needshelp", "Needs Help") in Lucid.span_ [Lucid.class_ cls] label complexityBadge :: (Monad m) => Int -> Lucid.HtmlT m () @@ -770,6 +771,7 @@ clickableBadge status _tid = TaskCore.Review -> ("badge badge-review status-badge-clickable", "Review") TaskCore.Approved -> ("badge badge-approved status-badge-clickable", "Approved") TaskCore.Done -> ("badge badge-done status-badge-clickable", "Done") + TaskCore.NeedsHelp -> ("badge badge-needshelp status-badge-clickable", "Needs Help") in Lucid.span_ [ Lucid.class_ cls, Lucid.tabindex_ "0", @@ -797,6 +799,7 @@ statusDropdownOptions currentStatus tid = statusOption TaskCore.Review currentStatus tid statusOption TaskCore.Approved currentStatus tid statusOption TaskCore.Done currentStatus tid + statusOption TaskCore.NeedsHelp currentStatus tid statusOption :: (Monad m) => TaskCore.Status -> TaskCore.Status -> Text -> Lucid.HtmlT m () statusOption opt currentStatus tid = @@ -807,6 +810,7 @@ statusOption opt currentStatus tid = TaskCore.Review -> ("badge badge-review", "Review") TaskCore.Approved -> ("badge badge-approved", "Approved") TaskCore.Done -> ("badge badge-done", "Done") + TaskCore.NeedsHelp -> ("badge badge-needshelp", "Needs Help") isSelected = opt == currentStatus optClass = cls <> " status-dropdown-option" <> if isSelected then " selected" else "" in Lucid.form_ @@ -1083,8 +1087,8 @@ instance Lucid.ToHtml InterventionPage where let crumbs = [Breadcrumb "Jr" (Just "/"), Breadcrumb "Needs Human Action" Nothing] failed = TaskCore.failedTasks actionItems epicsReady = TaskCore.epicsInReview actionItems - human = TaskCore.humanTasks actionItems - totalCount = length failed + length epicsReady + length human + needsHelp = TaskCore.tasksNeedingHelp actionItems + totalCount = length failed + length epicsReady + length needsHelp in Lucid.doctypehtml_ <| do pageHead "Needs Human Action - Jr" pageBodyWithCrumbs crumbs <| do @@ -1103,10 +1107,10 @@ instance Lucid.ToHtml InterventionPage where Lucid.h2_ [Lucid.class_ "section-header"] <| Lucid.toHtml ("Epics Ready for Review (" <> tshow (length epicsReady) <> ")") Lucid.p_ [Lucid.class_ "info-msg"] "Epics with all children completed. Verify before closing." Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderEpicReviewCard epicsReady - unless (null human) <| do - Lucid.h2_ [Lucid.class_ "section-header"] <| Lucid.toHtml ("Human Tasks (" <> tshow (length human) <> ")") - Lucid.p_ [Lucid.class_ "info-msg"] "Tasks explicitly marked as needing human work." - Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderTaskCard (sortTasks currentSort human) + unless (null needsHelp) <| do + Lucid.h2_ [Lucid.class_ "section-header"] <| Lucid.toHtml ("Needs Help (" <> tshow (length needsHelp) <> ")") + Lucid.p_ [Lucid.class_ "info-msg"] "Tasks where Jr needs human guidance or decisions." + Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderTaskCard (sortTasks currentSort needsHelp) renderEpicReviewCard :: (Monad m) => TaskCore.EpicForReview -> Lucid.HtmlT m () renderEpicReviewCard epicReview = do |
