← Back to task

Commit 20665b02

commit 20665b023c5dcf13c01b692711568393cb1cdb61
Author: Ben Sima <ben@bensima.com>
Date:   Mon Dec 1 18:09:09 2025

    Fix Recent Activity duplicating tasks on refresh
    
    Changed taskToUnixTs from round to ceiling to prevent sub-second
    timing issues where a task updated at e.g. 10:00:00.3 would round
    down to 10:00:00, causing the next poll with since=10:00:00 to
    include it again.
    
    Task-Id: t-221

diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index 6a2d826a..2a10cb58 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -3093,7 +3093,7 @@ server =
         Just sid -> liftIO (streamAgentEvents tid sid)
 
 taskToUnixTs :: TaskCore.Task -> Int
-taskToUnixTs t = round (utcTimeToPOSIXSeconds (TaskCore.taskUpdatedAt t))
+taskToUnixTs t = ceiling (utcTimeToPOSIXSeconds (TaskCore.taskUpdatedAt t))
 
 getReviewInfo :: Text -> IO ReviewInfo
 getReviewInfo tid = do