From 2cce994535c65cb502dc4c5034a1d9cb5f84ac21 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 22:48:37 +0000 Subject: [PATCH 1/2] Initial plan From 56c6c06707c41e9e50d39150f09c782cb60e4008 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 22:52:48 +0000 Subject: [PATCH 2/2] perf(web): add transcript no-filter fast path Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com> --- apps/web/src/lib/__tests__/transcript-search.test.ts | 4 ++++ apps/web/src/lib/transcript-search.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/apps/web/src/lib/__tests__/transcript-search.test.ts b/apps/web/src/lib/__tests__/transcript-search.test.ts index f94e35c22..105269a1c 100644 --- a/apps/web/src/lib/__tests__/transcript-search.test.ts +++ b/apps/web/src/lib/__tests__/transcript-search.test.ts @@ -54,6 +54,10 @@ describe('filterSegments — empty/null query behavior (#908)', () => { segments.length, ); }); + + it('returns the original segment array when no filters are active', () => { + expect(filterSegments(segments, { search: '' })).toBe(segments); + }); }); describe('filterSegments — null-safe segment text (#908)', () => { diff --git a/apps/web/src/lib/transcript-search.ts b/apps/web/src/lib/transcript-search.ts index 7a22c05aa..0c1c12ab9 100644 --- a/apps/web/src/lib/transcript-search.ts +++ b/apps/web/src/lib/transcript-search.ts @@ -68,6 +68,8 @@ export function filterSegments( segments: readonly TranscriptSegment[], { search, speaker }: TranscriptFilter, ): TranscriptSegment[] { + if (!search && !speaker) return segments as TranscriptSegment[]; + // Hoisted out of the loop: removes N toLowerCase() allocations per keystroke // update on long transcripts. This is the optimization PR #972 shipped. const lowerSearchQuery = search ? search.toLowerCase() : '';