From 9c1fb2e5e9ece4e75bc96c5604d41d98720e2da8 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 1 May 2026 10:20:43 -0500 Subject: [PATCH] recording timestamp fix when startTime is exactly on an hour boundary, findIndex returns the first matching chunk, which is the previous hour's chunk (where before == startTime), instead of the correct chunk (where after == startTime) the bug shows up when using the share timestamp feature and sharing a specific timestamp on the exact hour mark. when accessing the shared link, the timeline would jump to the incorrect hour --- web/src/views/recording/RecordingView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/views/recording/RecordingView.tsx b/web/src/views/recording/RecordingView.tsx index d36ace40e..0445a477b 100644 --- a/web/src/views/recording/RecordingView.tsx +++ b/web/src/views/recording/RecordingView.tsx @@ -170,7 +170,7 @@ export function RecordingView({ ); const [selectedRangeIdx, setSelectedRangeIdx] = useState( chunkedTimeRange.findIndex((chunk) => { - return chunk.after <= startTime && chunk.before >= startTime; + return chunk.after <= startTime && chunk.before > startTime; }), ); const currentTimeRange = useMemo( @@ -275,7 +275,7 @@ export function RecordingView({ const updateSelectedSegment = useCallback( (currentTime: number, updateStartTime: boolean) => { const index = chunkedTimeRange.findIndex( - (seg) => seg.after <= currentTime && seg.before >= currentTime, + (seg) => seg.after <= currentTime && seg.before > currentTime, ); if (index != -1) {