fix(briefwechsel): repair 500 by consuming backend thumbnailUrl directly
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m46s
CI / OCR Service Tests (push) Successful in 29s
CI / Backend Unit Tests (push) Failing after 2m56s

ConversationThumbnail still imported the `$lib/thumbnails` helper that
a02f6cdc deleted, so every SSR render of /briefwechsel crashed with
"Cannot find module '$lib/thumbnails'". Finish that refactor by reading
`doc.thumbnailUrl` straight off the Document DTO (same shape
DocumentThumbnail already uses), and update the spec fixtures to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-24 13:26:13 +02:00
parent bdac5e42ad
commit 6e021fb23a
2 changed files with 13 additions and 17 deletions

View File

@@ -1,17 +1,14 @@
<script lang="ts">
import { thumbnailUrl } from '$lib/thumbnails';
import type { components } from '$lib/generated/api';
type Doc = {
id: string;
thumbnailKey?: string;
thumbnailGeneratedAt?: string;
thumbnailAspect?: 'PORTRAIT' | 'LANDSCAPE';
pageCount?: number;
};
type Doc = Pick<
components['schemas']['Document'],
'id' | 'thumbnailUrl' | 'thumbnailAspect' | 'pageCount'
>;
let { doc }: { doc: Doc } = $props();
const url = $derived(thumbnailUrl(doc));
const url = $derived(doc.thumbnailUrl ?? null);
const aspect = $derived(doc.thumbnailAspect ?? 'PORTRAIT');
const pageCount = $derived(doc.pageCount ?? 1);
const tileClass = $derived(aspect === 'LANDSCAPE' ? 'h-[120px] w-[168px]' : 'h-[168px] w-[120px]');