Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(replay): skip too-fresh recordings in kiosk mode (#58931)

Tue Haulundf7242c0f7a3b
diff --git a/frontend/src/scenes/session-recordings/kiosk/sessionRecordingsKioskLogic.ts b/frontend/src/scenes/session-recordings/kiosk/sessionRecordingsKioskLogic.ts
index 36cf00ae5877..1b746ceaaf61 100644
--- a/frontend/src/scenes/session-recordings/kiosk/sessionRecordingsKioskLogic.ts
+++ b/frontend/src/scenes/session-recordings/kiosk/sessionRecordingsKioskLogic.ts
@@ -15,6 +15,10 @@ const SOFT_REFRESH_AFTER_RECORDINGS = 10
const HARD_REFRESH_AFTER_RECORDINGS = 50
const MAX_RECORDING_PLAY_TIME_MS = 5 * 60 * 1000 // 5 minutes
const RETRY_DELAY_MS = 5000
+// Skip recordings still inside the player's "still working on it" window
+// (sessionRecordingDataCoordinatorLogic.isRecentAndInvalid: start < 5 min ago).
+// 10 min gives a buffer for ingestion to settle.
+const INGESTION_GRACE_DATE_TO = '-600s'
let stuckRecordingTimeout: ReturnType<typeof setTimeout> | null = null
@@ -148,7 +152,7 @@ export const sessionRecordingsKioskLogic = kea<sessionRecordingsKioskLogicType>(
order: 'start_time',
order_direction: 'DESC',
date_from: dateFrom || '-30d',
- date_to: null,
+ date_to: INGESTION_GRACE_DATE_TO,
limit: 100,
filter_test_accounts: true,
properties,