: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-vision): open replay modal instead of new tab (#80398)
Hayne Ryu373c5874732a
diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerCalibrationTab.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerCalibrationTab.tsxindex 058bfbc9c7f1..417b78f10627 100644--- a/products/replay_vision/frontend/replay_scanners/components/ScannerCalibrationTab.tsx+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerCalibrationTab.tsx@@ -20,6 +20,7 @@ import { getColorVar } from 'lib/colors'import { TZLabel } from 'lib/components/TZLabel'import { dayjs } from 'lib/dayjs'import { LemonTableColumns } from 'lib/lemon-ui/LemonTable'+import { sessionPlayerModalLogic } from 'scenes/session-recordings/player/modal/sessionPlayerModalLogic'import { urls } from 'scenes/urls'import { themeLogic } from '~/layout/navigation-3000/themeLogic'@@ -151,6 +152,7 @@ function SuggestionEvaluationPanel({editedSinceTest: boolean}): JSX.Element | null {const [detailsOpen, setDetailsOpen] = useState(false)+ const { openSessionPlayer } = useActions(sessionPlayerModalLogic)const evaluation = suggestion.evaluationif (!evaluation) {return null@@ -248,13 +250,11 @@ function SuggestionEvaluationPanel({title: 'Session',key: 'session',render: (_, result) => (- // New tab like the results table links, so reviewers keep their place.<Link- to={urls.replaySingle(result.session_id)}- target="_blank"- className="font-mono"+ onClick={() => openSessionPlayer({ id: result.session_id })}+ className="font-mono text-xs whitespace-nowrap">- {result.session_id.slice(0, 8)}…+ {result.session_id}</Link>),},@@ -813,6 +813,7 @@ export function ScannerCalibrationTab({ scannerId }: { scannerId: string }): JSXconst logic = scannerCalibrationLogic({ scannerId })const { observations, observationsLoading, total, page, ratedFilter, sort } = useValues(logic)const { setPage, setRatedFilter, setSort, labelChanged } = useActions(logic)+ const { openSessionPlayer } = useActions(sessionPlayerModalLogic)const { scanner } = useValues(replayScannerLogic({ id: scannerId }))const scannerType = scanner?.scanner_type@@ -920,8 +921,7 @@ export function ScannerCalibrationTab({ scannerId }: { scannerId: string }): JSXsize="small"type="secondary"icon={<IconRewindPlay />}- to={urls.replaySingle(obs.session_id)}- targetBlank+ onClick={() => openSessionPlayer({ id: obs.session_id })}className="whitespace-nowrap"data-attr="vision-calibration-view-recording">diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerRunTab.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerRunTab.tsxindex c4e23536dbfc..9393a1454bf1 100644--- a/products/replay_vision/frontend/replay_scanners/components/ScannerRunTab.tsx+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerRunTab.tsx@@ -10,6 +10,7 @@ import { humanFriendlyDuration } from 'lib/utils/durations'import { PersonDisplay } from 'scenes/persons/PersonDisplay'import { recordingsQueryToUniversalFilters } from 'scenes/session-recordings/filters/recordingsQueryConversions'import { ReplayFiltersTab } from 'scenes/session-recordings/filters/RecordingsUniversalFiltersEmbed'+import { sessionPlayerModalLogic } from 'scenes/session-recordings/player/modal/sessionPlayerModalLogic'import {getDefaultFilters,SessionRecordingPlaylistLogicProps,@@ -90,6 +91,7 @@ function RecordingsList({ scannerId }: { scannerId: string }): JSX.Element {scannerRunTabLogic({ scannerId }))const { setVisibleSessionIds, startScan, startBulkScan } = useActions(scannerRunTabLogic({ scannerId }))+ const { openSessionPlayer } = useActions(sessionPlayerModalLogic)const { scanner } = useValues(replayScannerLogic({ id: scannerId }))const editDisabledReason = getReplayVisionEditDisabledReason(scanner?.user_access_level)@@ -105,7 +107,10 @@ function RecordingsList({ scannerId }: { scannerId: string }): JSX.Element {key: 'session',width: 300,render: (_, recording) => (- <Link to={urls.replaySingle(recording.id)} className="font-mono text-xs text-primary truncate block">+ <Link+ onClick={() => openSessionPlayer({ id: recording.id })}+ className="font-mono text-xs text-primary truncate block"+ >{recording.id}</Link>),