From 89a15b7f2775bad46b41c382f2f2178a227750fd Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 23 Apr 2026 22:24:29 +0200 Subject: [PATCH] feat(dashboard): fall back to document-text heroicon when no thumbnail yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses the same heroicon as DocumentThumbnail so the "no thumbnail yet" signal reads identically across the app: one shape, one meaning. The parchment SVG still lives on in the fully-empty state (no resume doc at all), where it represents a different thing — we removed it only from the "document exists, thumbnail not generated yet" branch (#309). Co-Authored-By: Claude Opus 4.7 --- .../components/DashboardResumeStrip.svelte | 21 +++++++++++++++++++ .../DashboardResumeStrip.svelte.spec.ts | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/frontend/src/lib/components/DashboardResumeStrip.svelte b/frontend/src/lib/components/DashboardResumeStrip.svelte index fcf16812..1be18627 100644 --- a/frontend/src/lib/components/DashboardResumeStrip.svelte +++ b/frontend/src/lib/components/DashboardResumeStrip.svelte @@ -56,6 +56,27 @@ function safeColor(color: string): string { loading="lazy" decoding="async" /> + {:else} + {/if} diff --git a/frontend/src/lib/components/DashboardResumeStrip.svelte.spec.ts b/frontend/src/lib/components/DashboardResumeStrip.svelte.spec.ts index a7b411c0..0c1f9b48 100644 --- a/frontend/src/lib/components/DashboardResumeStrip.svelte.spec.ts +++ b/frontend/src/lib/components/DashboardResumeStrip.svelte.spec.ts @@ -69,4 +69,11 @@ describe('DashboardResumeStrip', () => { await expect.element(img).toHaveAttribute('loading', 'lazy'); await expect.element(img).toHaveAttribute('decoding', 'async'); }); + + it('renders fallback icon when thumbnailUrl is null', async () => { + render(DashboardResumeStrip, { resumeDoc: mockResume }); + const fallback = page.getByTestId('resume-thumbnail-fallback'); + await expect.element(fallback).toBeInTheDocument(); + await expect.element(page.getByTestId('resume-thumbnail-img')).not.toBeInTheDocument(); + }); });