diff --git a/frontend/src/lib/components/DocumentRow.svelte b/frontend/src/lib/components/DocumentRow.svelte index b6d97762..c5659eb7 100644 --- a/frontend/src/lib/components/DocumentRow.svelte +++ b/frontend/src/lib/components/DocumentRow.svelte @@ -20,6 +20,15 @@ const snippet = $derived(item.matchData?.transcriptionSnippet ?? null); const snippetSegments = $derived( snippet ? applyOffsets(snippet, item.matchData?.snippetOffsets ?? []) : null ); +const summary = $derived(doc.summary?.trim() ? doc.summary : null); +const summarySegments = $derived( + summary ? applyOffsets(summary, item.matchData?.summaryOffsets ?? []) : null +); +const archiveChips = $derived( + [doc.archiveBox, doc.archiveFolder, doc.location].filter( + (c): c is string => !!c && c.trim().length > 0 + ) +); const senderMatched = $derived(item.matchData?.senderMatched ?? false); const matchedReceiverIds = $derived(new Set(item.matchData?.matchedReceiverIds ?? [])); const matchedTagIds = $derived(new Set(item.matchData?.matchedTagIds ?? [])); @@ -77,46 +86,36 @@ function safeTagColor(color: string | null | undefined): string {

{/if} - -