From a4d22e07ebec84e190dee05367d01f3cbd2cbcfb Mon Sep 17 00:00:00 2001 From: mantrakp04 Date: Mon, 1 Jun 2026 18:17:48 -0700 Subject: [PATCH] fix(session-replays): remove temporary debug list multiplier A TEMPORARY x100 list multiplier (left in from manual scroll verification) was committed, which rendered the session list 100x. Drop the debug scaffolding and map recordings to list rows directly. (cubic) --- .../session-replays/page-client.tsx | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/session-replays/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/session-replays/page-client.tsx index 2acbb6809..b3da4b590 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/session-replays/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/session-replays/page-client.tsx @@ -45,8 +45,6 @@ const BACKGROUND_CHUNK_BATCH = 50; const EXTRA_TABS_TO_SHOW = 2; const REPLAY_SETTINGS_STORAGE_KEY = "stack.session-replay.settings"; const LEGACY_PLAYER_SPEED_STORAGE_KEY = "stack.session-replay.speed"; -// TEMPORARY: multiply the rendered list for scroll verification. Set back to 1 after manual verification. -const SESSION_REPLAY_LIST_DEBUG_MULTIPLIER: number = 100; type RrwebEventWithTime = import("rrweb/typings/types").eventWithTime; type RrwebReplayer = InstanceType; @@ -512,19 +510,10 @@ export default function PageClient({ initialReplayId, lockedUserId }: PageClient ?? (standaloneReplay?.id === selectedRecordingId ? standaloneReplay : null), [recordings, selectedRecordingId, standaloneReplay], ); - const recordingListRows = useMemo(() => { - if (SESSION_REPLAY_LIST_DEBUG_MULTIPLIER === 1) { - return recordings.map((replay) => ({ replay, key: replay.id })); - } - - const rows: RecordingListRow[] = []; - for (let copyIndex = 0; copyIndex < SESSION_REPLAY_LIST_DEBUG_MULTIPLIER; copyIndex++) { - for (const replay of recordings) { - rows.push({ replay, key: `${replay.id}:${copyIndex}` }); - } - } - return rows; - }, [recordings]); + const recordingListRows = useMemo( + () => recordings.map((replay) => ({ replay, key: replay.id })), + [recordings], + ); const hasAutoSelectedRef = useRef(false); const loadingMoreRef = useRef(false);