From 93c78433cf445367ed9b4ce6d2267228061e1625 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 15 Apr 2026 18:34:14 +0200 Subject: [PATCH] feat(search): render title highlights and transcription snippets in DocumentList Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/DocumentList.svelte | 25 +++++- .../src/routes/DocumentList.svelte.spec.ts | 78 ++++++++++++++++++- 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/DocumentList.svelte b/frontend/src/routes/DocumentList.svelte index 78aaa09e..06dc446b 100644 --- a/frontend/src/routes/DocumentList.svelte +++ b/frontend/src/routes/DocumentList.svelte @@ -4,6 +4,8 @@ import { m } from '$lib/paraglide/messages.js'; import { formatDate } from '$lib/utils/date'; import { groupDocuments } from '$lib/utils/groupDocuments'; import GroupDivider from '$lib/components/GroupDivider.svelte'; +import { applyOffsets } from '$lib/search'; +import type { components } from '$lib/generated/api'; let { documents, @@ -11,7 +13,8 @@ let { error, total = 0, q = '', - sort + sort, + matchData = {} }: { documents: { id: string; @@ -28,6 +31,7 @@ let { total?: number; q?: string; sort?: string; + matchData?: Record; } = $props(); const fallbackLabel = $derived( @@ -75,6 +79,10 @@ const showDividers = $derived(groupedDocuments.length >= 2); {/if}