: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix: replay autoplay options (#58773)
Christian Rafferty18991bcfb09b
diff --git a/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.test.ts b/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.test.tsindex ff3bf35eadf9..60d119ee158e 100644--- a/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.test.ts+++ b/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.test.ts@@ -209,7 +209,7 @@ describe('sessionRecordingsPlaylistLogic', () => {})describe('nextSessionRecording', () => {- it('returns next older recording when autoplay direction is null (autoplay off)', async () => {+ it('returns undefined when autoplay direction is null (autoplay off)', async () => {playerSettingsLogic.mount()playerSettingsLogic.actions.setAutoplayDirection(null)@@ -217,7 +217,7 @@ describe('sessionRecordingsPlaylistLogic', () => {.toDispatchActions(['loadSessionRecordingsSuccess']).toMatchValues({activeSessionRecording: listOfSessionRecordings[0],- nextSessionRecording: listOfSessionRecordings[1],+ nextSessionRecording: undefined,})})diff --git a/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts b/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.tsindex dab15ba4e98d..50a5a1abef4a 100644--- a/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts+++ b/frontend/src/scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic.ts@@ -1369,7 +1369,7 @@ export const sessionRecordingsPlaylistLogic = kea<sessionRecordingsPlaylistLogicnextSessionRecording: [(s) => [s.activeSessionRecording, s.recordings, s.autoplayDirection],(activeSessionRecording, recordings, autoplayDirection): Partial<SessionRecordingType> | undefined => {- if (!activeSessionRecording) {+ if (!activeSessionRecording || !autoplayDirection) {return}const activeSessionRecordingIndex = recordings.findIndex((x) => x.id === activeSessionRecording.id)