From 7da1c7e717af3cadf927b5f6efb253f0d10423a8 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 1 Dec 2025 21:38:17 -0500 Subject: Make complexity badge editable on task detail page - Add ComplexityForm and ComplexityBadgePartial types - Add /tasks/:id/complexity POST endpoint - Add complexityBadgeWithForm component with dropdown - Add complexity dropdown JS for keyboard navigation - Add CSS styles for complexity dropdown - Always show complexity badge (Set Complexity if none) Task-Id: t-219 --- Omni/Jr/Web/Partials.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Omni/Jr/Web/Partials.hs') diff --git a/Omni/Jr/Web/Partials.hs b/Omni/Jr/Web/Partials.hs index 25a4d1e..2660441 100644 --- a/Omni/Jr/Web/Partials.hs +++ b/Omni/Jr/Web/Partials.hs @@ -18,6 +18,7 @@ import Numeric (showFFloat) import Omni.Jr.Web.Components ( aggregateCostMetrics, commentForm, + complexityBadgeWithForm, formatCostHeader, formatTokensHeader, metaSep, @@ -33,6 +34,7 @@ import Omni.Jr.Web.Components ) import Omni.Jr.Web.Types ( AgentEventsPartial (..), + ComplexityBadgePartial (..), DescriptionEditPartial (..), DescriptionViewPartial (..), PriorityBadgePartial (..), @@ -92,6 +94,11 @@ instance Lucid.ToHtml PriorityBadgePartial where toHtml (PriorityBadgePartial priority tid) = priorityBadgeWithForm priority tid +instance Lucid.ToHtml ComplexityBadgePartial where + toHtmlRaw = Lucid.toHtml + toHtml (ComplexityBadgePartial complexity tid) = + complexityBadgeWithForm complexity tid + instance Lucid.ToHtml TaskListPartial where toHtmlRaw = Lucid.toHtml toHtml (TaskListPartial tasks) = -- cgit v1.2.3