summaryrefslogtreecommitdiff
path: root/Omni/Jr
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-30 00:45:06 -0500
committerBen Sima <ben@bensima.com>2025-11-30 00:45:06 -0500
commitd851af127ecb59e0ce4a116333b25249814d8cf8 (patch)
tree4ae1a9bd40a8b4da1a9a82d9f515e7ff816e7e62 /Omni/Jr
parent5fbcd92ff85bc9cc0b752888f6d3498aafea0b2a (diff)
Remove retry notes field, use comments instead
All done. Changes made: 1. **Web.hs**: Removed the retry-notes-section (form for saving notes) a 2. **Web.hs**: Added hint text "Use comments below to provide guidance f 3. **Style.hs**: Added `.retry-hint` style for the new hint text 4. **Kept**: RetryContext.retryNotes field in Core.hs (backward compat), Task-Id: t-194
Diffstat (limited to 'Omni/Jr')
-rw-r--r--Omni/Jr/Web.hs22
-rw-r--r--Omni/Jr/Web/Style.hs5
2 files changed, 6 insertions, 21 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index 4e55c61..fe1711b 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -1849,33 +1849,13 @@ renderRetryContextBanner tid (Just ctx) =
[Lucid.class_ "retry-warning-message"]
"This task has exceeded the maximum number of retries. A human must review the failure and either fix the issue manually or reset the retry count."
- Lucid.div_ [Lucid.class_ "retry-notes-section"] <| do
- Lucid.h4_ "Human Notes/Guidance"
- Lucid.p_ [Lucid.class_ "notes-help"] "Add notes to guide the worker on the next retry attempt:"
- Lucid.form_ [Lucid.method_ "POST", Lucid.action_ ("/tasks/" <> tid <> "/notes")] <| do
- Lucid.textarea_
- [ Lucid.name_ "notes",
- Lucid.class_ "notes-textarea",
- Lucid.rows_ "6",
- Lucid.placeholder_ "Provide guidance for the worker: what to fix, which approach to use, or what to avoid..."
- ]
- (Lucid.toHtml (fromMaybe "" (TaskCore.retryNotes ctx)))
- Lucid.div_ [Lucid.class_ "form-actions"] <| do
- Lucid.button_ [Lucid.type_ "submit", Lucid.class_ "submit-btn"] "Save Notes"
+ Lucid.p_ [Lucid.class_ "retry-hint"] "Use comments below to provide guidance for retry."
Lucid.div_ [Lucid.class_ "retry-reset-section"] <| do
Lucid.h4_ "Reset Retries"
Lucid.p_ [Lucid.class_ "notes-help"] "Clear retry context and give task a fresh start:"
Lucid.form_ [Lucid.method_ "POST", Lucid.action_ ("/tasks/" <> tid <> "/reset-retries")] <| do
Lucid.button_ [Lucid.type_ "submit", Lucid.class_ "reset-btn"] "Reset Retries"
-
- case TaskCore.retryNotes ctx of
- Nothing -> pure ()
- Just notes ->
- unless maxRetriesExceeded <| do
- Lucid.div_ [Lucid.class_ "retry-notes-display"] <| do
- Lucid.h4_ "Human Notes"
- Lucid.div_ [Lucid.class_ "notes-content"] (Lucid.toHtml notes)
where
attempt = TaskCore.retryAttempt ctx
maxRetriesExceeded = attempt >= 3
diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs
index ed7f05e..8c423bb 100644
--- a/Omni/Jr/Web/Style.hs
+++ b/Omni/Jr/Web/Style.hs
@@ -1254,6 +1254,11 @@ retryBannerStyles = do
fontSize (px 12)
color "#991b1b"
fontWeight (weight 500)
+ ".retry-hint" ? do
+ marginTop (px 8)
+ fontSize (px 12)
+ color "#6b7280"
+ fontStyle italic
commentStyles :: Css
commentStyles = do