From a7efb0044cd4e1a100a0ac6b36e6362e1d551bdf Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 23 Apr 2026 08:44:49 +0200 Subject: [PATCH] =?UTF-8?q?feat(documents):=20rebalance=20list=20row=20?= =?UTF-8?q?=E2=80=94=20summary=20+=20archive=20chips,=20restored=20sender/?= =?UTF-8?q?receiver?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refill the columns that went visually empty after the previous dedup commit (`fc0fc57`): - Middle column gains the document `summary` (line-clamp-2, italic, with `summaryOffsets` highlighting — the backend already populates the offsets, the frontend just wasn't rendering them) and a row of thin neutral chips for `archiveBox`, `archiveFolder`, and `location` (~99% of docs in the corpus carry these). Chips are desktop-only and skip empty values. - Right column restores `VON sender` and `AN receivers`, now with `` highlighting that the previous right-column copy lacked, so search matches stay visible there. Co-Authored-By: Claude Opus 4.7 --- .../src/lib/components/DocumentRow.svelte | 110 ++++++++++++------ .../lib/components/DocumentRow.svelte.spec.ts | 83 ++++++++++++- 2 files changed, 150 insertions(+), 43 deletions(-) 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} - -