fix(dashboard): i18n, a11y, security, and type-safety fixes from PR review

- Use @RequiredArgsConstructor in AuditLogQueryService; remove unused import
- Add 401/403 tests for /activity endpoint
- Add getPulseStats and findContributorsPerDocument integration tests
- Use m.pulse_headline/pulse_you in FamilyPulse; composite avatar keys
- Replace hover:text-accent with hover:text-ink in ActivityFeed (WCAG AA)
- Localise "Alle →" link with feed_show_all key + aria-label
- Gate DropZone behind {#if data.canWrite}
- Export DashboardResumeDTO, DashboardPulseDTO, ActivityFeedItemDTO from api.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-19 21:43:16 +02:00
parent 148710f2ed
commit 2bb08b6877
6 changed files with 77 additions and 9 deletions

View File

@@ -17,20 +17,20 @@ const { pulse }: Props = $props();
{#if pulse.pages > 0}
<h2 class="mt-1 font-serif text-[1.375rem] leading-snug text-ink">
Ihr habt <strong>{pulse.pages}</strong> Seiten bearbeitet.
{m.pulse_headline({ pages: pulse.pages })}
</h2>
{/if}
{#if pulse.yourPages > 0}
<p class="font-serif text-sm text-ink-2">
Du selbst hast {pulse.yourPages} davon bearbeitet.
{m.pulse_you({ pages: pulse.yourPages })}
</p>
{/if}
{#if pulse.contributors.length > 0}
<div class="mt-3 flex items-center gap-1">
<p class="mr-1 font-sans text-[11px] text-ink-3">{m.pulse_contributors()}</p>
{#each pulse.contributors as c (c.initials)}
{#each pulse.contributors as c (c.initials + c.color)}
<span
class="-ml-2 inline-flex h-7 w-7 items-center justify-center rounded-full font-sans text-[11px] font-bold text-white ring-2 ring-white first:ml-0"
style="background:{c.color}"

View File

@@ -4451,3 +4451,7 @@ export interface operations {
};
};
}
export type DashboardResumeDTO = components['schemas']['DashboardResumeDTO'];
export type DashboardPulseDTO = components['schemas']['DashboardPulseDTO'];
export type ActivityFeedItemDTO = components['schemas']['ActivityFeedItemDTO'];

View File

@@ -151,7 +151,9 @@ const greetingText = $derived.by(() => {
<div class="flex flex-col gap-5 lg:sticky lg:top-[80px]">
<DashboardFamilyPulse pulse={data.pulse ?? null} />
<DashboardActivityFeed feed={data.activityFeed ?? []} />
<DropZone />
{#if data.canWrite}
<DropZone />
{/if}
</div>
</div>
{:else}