Skip to content

Commit 0a635e9

Browse files
michellewzhangandrewshie-sentry
authored andcommitted
fix(replay): do not show chapters that occur before replay start (#102897)
prevents this: <img width="571" height="500" alt="SCR-20251106-kfrb" src="https://github.com/user-attachments/assets/70804059-f7ea-496a-b8ea-fc41947103ac" /> also remove error/feedback in chapter response -- we don't return that anymore
1 parent 9decc9f commit 0a635e9

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

static/app/views/replays/detail/ai/chapterList.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,20 @@ export function ChapterList({timeRanges}: Props) {
3737
[replay, setCurrentTime]
3838
);
3939

40+
// do not include chapters that are before the start of the replay;
41+
// we filter these crumbs on the frontend anyway
4042
const chapterData = useMemo(
4143
() =>
4244
timeRanges
43-
.map(({period_title, period_start, period_end, error, feedback}) => ({
45+
.filter(
46+
({period_start, period_end}) =>
47+
period_start >= (replay?.getStartTimestampMs() ?? 0) &&
48+
period_end >= (replay?.getStartTimestampMs() ?? 0)
49+
)
50+
.map(({period_title, period_start, period_end}) => ({
4451
title: period_title,
4552
start: period_start,
4653
end: period_end,
47-
error,
48-
feedback,
4954
breadcrumbs:
5055
replay
5156
?.getSummaryChapterFrames()

static/app/views/replays/detail/ai/utils.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ export interface SummaryResponse {
3535
}
3636

3737
export type TimeRanges = Array<{
38-
error: boolean;
39-
feedback: boolean;
4038
period_end: number;
4139
period_start: number;
4240
period_title: string;

0 commit comments

Comments
 (0)