summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Omni/Jr/Web.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index 2fc2064..ecc851d 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -1577,12 +1577,12 @@ instance Lucid.ToHtml TaskDetailPage where
Lucid.makeAttribute "hx-trigger" "every 5s",
Lucid.makeAttribute "hx-swap" "innerHTML"
]
- sectionAttrs =
- [Lucid.class_ "execution-section", Lucid.id_ "execution-details"]
+ innerAttrs =
+ [Lucid.id_ "execution-details-inner"]
<> [attr | isInProgress, attr <- htmxAttrs]
- Lucid.div_ sectionAttrs <| do
+ Lucid.div_ [Lucid.class_ "execution-section"] <| do
Lucid.h3_ "Execution Details"
- renderExecutionDetails (TaskCore.taskId task) activities maybeRetry
+ Lucid.div_ innerAttrs <| renderExecutionDetails (TaskCore.taskId task) activities maybeRetry
when (TaskCore.taskStatus task == TaskCore.Review) <| do
Lucid.div_ [Lucid.class_ "review-link-section"] <| do
@@ -3057,14 +3057,9 @@ server =
pure (TaskMetricsPartial tid activities maybeRetry now)
agentEventsPartialHandler :: Text -> Maybe Int -> Servant.Handler AgentEventsPartial
- agentEventsPartialHandler tid maybeSince = do
+ agentEventsPartialHandler tid _maybeSince = do
now <- liftIO getCurrentTime
- maybeSession <- liftIO (TaskCore.getLatestSessionForTask tid)
- events <- case maybeSession of
- Nothing -> pure []
- Just sid -> case maybeSince of
- Nothing -> liftIO (TaskCore.getEventsForSession sid)
- Just lastId -> liftIO (TaskCore.getEventsSince sid lastId)
+ events <- liftIO (TaskCore.getAllEventsForTask tid)
tasks <- liftIO TaskCore.loadTasks
let isInProgress = case TaskCore.findTask tid tasks of
Nothing -> False