diff --git a/frontend/src/lib/components/DashboardActivityFeed.svelte b/frontend/src/lib/components/DashboardActivityFeed.svelte
index d24fdd91..2595fd3e 100644
--- a/frontend/src/lib/components/DashboardActivityFeed.svelte
+++ b/frontend/src/lib/components/DashboardActivityFeed.svelte
@@ -1,6 +1,8 @@
{formatDate(item.happenedAt)}
+{timestamp(item)}
{/each} diff --git a/frontend/src/lib/components/DashboardActivityFeed.svelte.spec.ts b/frontend/src/lib/components/DashboardActivityFeed.svelte.spec.ts index b12c682c..51bfd384 100644 --- a/frontend/src/lib/components/DashboardActivityFeed.svelte.spec.ts +++ b/frontend/src/lib/components/DashboardActivityFeed.svelte.spec.ts @@ -17,7 +17,8 @@ const baseItem: ActivityFeedItemDTO = { documentId: 'doc-1', documentTitle: 'Brief 1920', happenedAt: '2026-04-19T10:00:00Z', - youMentioned: false + youMentioned: false, + count: 1 }; describe('DashboardActivityFeed', () => { @@ -39,4 +40,30 @@ describe('DashboardActivityFeed', () => { const section = page.getByText('Kommentare & Aktivität'); await expect.element(section).toBeInTheDocument(); }); + + it('renders count badge and en-dash time range for rollup rows (count > 1)', async () => { + const rollup: ActivityFeedItemDTO = { + ...baseItem, + count: 20, + happenedAtUntil: '2026-04-19T10:32:00Z' + }; + render(DashboardActivityFeed, { feed: [rollup] }); + const badge = page.getByTestId('feed-rollup-count'); + await expect.element(badge).toHaveTextContent('20'); + // "–" is U+2013 en-dash + const stamp = page.getByText(/\u2013/); + await expect.element(stamp).toBeInTheDocument(); + }); + + it('does not render count badge for singleton rows (count === 1)', async () => { + render(DashboardActivityFeed, { feed: [baseItem] }); + const badge = page.getByTestId('feed-rollup-count'); + await expect.element(badge).not.toBeInTheDocument(); + }); + + it('links the "show all" footer to /chronik, not /documents', async () => { + render(DashboardActivityFeed, { feed: [] }); + const link = page.getByRole('link', { name: /alle anzeigen/i }); + await expect.element(link).toHaveAttribute('href', '/chronik'); + }); });