Show complexity in task detail view

t-196·WorkTask·
·
·
·Omni/Task.hs
Created3 months ago·Updated3 months ago

Description

Edit

The showTaskDetailed function in Core.hs doesn't display taskComplexity. Add a line after Priority like:

case taskComplexity t of Nothing -> pure () Just c -> putText ("Complexity: " <> T.pack (show c) <> "/5")

Timeline (31)·51.1K tokens

💭Thought[engineer]3 months ago

"I'll help you implement this task. Let me start by analyzing the codebase to understand the structure and locate the relevant files."

"search_codebase
{\"pattern\": \"showTaskDetailed\", \"glob\": \"*.hs\"}"
"search_codebase
{\"pattern\": \"taskComplexity\", \"glob\": \"*.hs\"}"
💭Thought[engineer]3 months ago

"Let me look at the showTaskDetailed function in Core.hs to understand its current implementation:"

"read_file
{\"path\": \"./Omni/Task/Core.hs\", \"start_line\": 1014, \"end_line\": 1040}"
💭Thought[engineer]3 months ago

"Now I need to see what's imported and check if T.pack is already available, and understand where to add the complexity line. Let me check the imports:"

"read_file
{\"path\": \"./Omni/Task/Core.hs\", \"start_line\": 1, \"end_line\": 30}"
💭Thought[engineer]3 months ago

"Good, T is already imported as Data.Text. Now let me check the Task data type to understand the taskComplexity field:"

"read_file
{\"path\": \"./Omni/Task/Core.hs\", \"start_line\": 30, \"end_line\": 50}"
💭Thought[engineer]3 months ago

"Perfect! Now I understand the structure. I need to add the complexity display after the Priority line (line 1021) in the showTaskDetailed function. Let me make the edit:"

"edit_file
{\"path\": \"./Omni/Task/Core.hs\", \"old_str\": \"  putText <| \\\"Priority:   \\\" <> T.pack (show (taskPriority t)) <> priorityDesc\\n\\n  when (taskType t == Epic) <| do\", \"new_str\": \"  putText <| \\\"Priority:   \\\" <> T.pack (show (taskPriority t)) <> priorityDesc\\n  case taskComplexity t of\\n    Nothing -> pure ()\\n    Just c -> putText (\\\"Complexity: \\\" <> T.pack (show c) <> \\\"/5\\\")\\n\\n  when (taskType t == Epic) <| do\"}"
💭Thought[engineer]3 months ago

"Good! Now let me verify the change by looking at the modified section:"

"read_file
{\"path\": \"./Omni/Task/Core.hs\", \"start_line\": 1014, \"end_line\": 1035}"
💭Thought[engineer]3 months ago

"Perfect! The change looks good. Now I need to run the build and test command as required:"

"run_bash
{\"command\": \"bild --test Omni/Task.hs\", \"timeout\": 300}"
💭Thought[engineer]3 months ago

"Excellent! The build and test passed successfully. Let me verify that the implementation is correct by checking if there are any hlint warnings or errors:"

"run_bash
{\"command\": \"lint Omni/Task/Core.hs\", \"timeout\": 60}"
💭Thought[engineer]3 months ago

"Perfect! The linting passes without any issues. Let me run one final test to make sure everything still works:"

"run_bash
{\"command\": \"bild --test Omni/Task.hs\", \"timeout\": 300}"
💭Thought[engineer]3 months ago

"Excellent! The implementation is complete and all tests pass. Let me provide a summary of what was done:\n\n## Summary\n\nI successfully implemented the task to show complexity in the task detail view. Here's what was done:\n\n### Changes Made:\n1. File Modified: Omni/Task/Core.hs\n2. Function: showTaskDetailed\n3. Change: Added complexity display after the Priority line (lines 1022-1024)\n\n### Implementation:\nhaskell\ncase taskComplexity t of\n Nothing -> pure ()\n Just c -> putText (\"Complexity: \" <> T.pack (show c) <> \"/5\")\n\n\nThis code:\n- Checks if the task has a complexity value set\n- If Nothing, does nothing (no complexity line is shown)\n- If Just c, displays \"Complexity: X/5\" where X is the complexity value (1-5)\n\n### Verification:\n- ✅ bild --test Omni/Task.hs passed successfully\n- ✅ lint Omni/Task/Core.hs passed with no hlint warnings or errors\n- ✅ All existing tests continue to pass\n\nThe implementation matches the exact specification provided in the task description and is now ready for use."

📝Complete[engineer]3 months ago
null