From 720fd20245d5c832dc92ddca0fb837858f48bb16 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 1 Dec 2025 13:13:15 -0500 Subject: Show task complexity on /tasks/ page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Perfect! The implementation is complete. Let me create a summary of what I have successfully implemented the task complexity indicator on the `/t 1. **Added `complexityBadge` function** in `Omni/Jr/Web.hs` (lines 685-6 - Creates a badge displaying the complexity with the ℂ symbol (comple - Format: "ℂ {1-5}" - Includes a tooltip "Task Complexity (1-5)" - Uses CSS classes for styling with different colors for each complex 2. **Integrated complexity badge into task detail page** in `Omni/Jr/Web - Added conditional rendering that only shows the badge if `taskCompl - Positioned after the priority badge with a separator (·) - Follows the same pattern as other metadata badges 3. **Added CSS styles** in `Omni/Jr/Web/Style.hs` (lines 696-713): - Base `.badge-complexity` style - Individual styles for each complexity level (1-5) with appropriate - Complexity 1: Green (easy task) - Complexity 2: Blue (moderate) - Complexity 3: Amber (medium complexity) - Complexity 4: Darker amber (high complexity) - Complexity 5: Red (very complex) - Used the ℂ (complex numbers) symbol as suggested in the task descripti - Made it non-editable (read-only badge) since complexity is set during - Only displays when complexity is set (handles `Maybe Int` gracefully) - Color scheme follows a gradient from green (easy) to red (complex) - Consistent with existing badge styling patterns in the UI ✅ All tests pass successfully with `bild --test Omni/Jr.hs` The feature is now complete and ready for use. Tasks with a complexity r Task-Id: t-207 --- Omni/Jr/Web/Style.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Omni/Jr/Web/Style.hs') diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs index 81d7e58..08fda5d 100644 --- a/Omni/Jr/Web/Style.hs +++ b/Omni/Jr/Web/Style.hs @@ -693,6 +693,24 @@ statusBadges = do ".priority-badge-clickable" # focus ? do Stylesheet.key "outline" ("2px solid #0066cc" :: Text) Stylesheet.key "outline-offset" ("2px" :: Text) + ".badge-complexity" ? do + backgroundColor "#f0f9ff" + color "#0c4a6e" + ".badge-complexity-1" ? do + backgroundColor "#f0fdf4" + color "#166534" + ".badge-complexity-2" ? do + backgroundColor "#f0f9ff" + color "#075985" + ".badge-complexity-3" ? do + backgroundColor "#fef3c7" + color "#92400e" + ".badge-complexity-4" ? do + backgroundColor "#fef3c7" + color "#b45309" + ".badge-complexity-5" ? do + backgroundColor "#fee2e2" + color "#991b1b" buttonStyles :: Css buttonStyles = do -- cgit v1.2.3