feature(persons): Korrespondenz-Überblick dashboard on /persons/[id] #306
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Extend
/persons/[id]with a correspondence-at-a-glance block on the right column. Replaces the currentCoCorrespondentsListwith a richerPersonDashboardthat shows stats, activity over the years, direction split, top correspondents, top locations, and a tag cloud. Every element deep-links into/briefwechselwith pre-filled filters — the person page becomes the discovery surface,/briefwechselstays the reading surface.Spec
Final HTML spec (scaled wireframes × 3 viewports + impl-ref tables with exact Tailwind classes and pixel values + WCAG contrast verification):
docs/specs/person-dashboard-spec.htmlExploration context (same 5-concept brainstorm as sister issue #305):
docs/specs/briefwechsel-fill/index.html— concept 5 evolved into this spec after user feedback ruled out hosting insights on/briefwechseldirectly.What changes visually
/persons/[id]replacesCoCorrespondentsListwith a newPersonDashboardblock/briefwechsel?senderId=…&from=YYYY-01-01&to=YYYY-12-31DistributionBar.sveltefrom the thumbnail-rows issueStates covered in spec
Breakdown
Phase 1 — backend aggregation endpoint
GET /api/persons/{id}/dashboardreturningPersonDashboardDTO@RequirePermission(Permission.READ_ALL)(personId, dataVersion); invalidate on Document write hooksnpm run generate:api)Phase 2 — frontend components
PersonDashboard.svelte— orchestratorStatStrip.svelte— 4-cell stats grid (semantic<dl>)ActivityHistogram.svelte— one bar per year, peak highlight, tooltip + aria-label, click → deep linkDistributionBar.svelte— re-used from the thumbnail-rows issue (do not duplicate)TopTileList.svelte— generic ordered list, used for correspondents and locationsTagCloud.svelte— frequency-sized chips with size bucketsCoCorrespondentsList.svelteusage in/persons/[id]/+page.sveltecoCorrespondentsderivation from+page.svelte(dashboard owns it server-side)+page.server.tsloads person data + dashboard in parallelPhase 3 — new query params on /briefwechsel
direction=OUT|INfilterlocation=<slug>filter (case-insensitive match onDocument.location)tagId=<uuid>filterPhase 4 — testing
/briefwechsel; click a correspondent → bilateral viewAccessibility contract
All contrast ratios verified in the spec — light and dark mode pass WCAG AA or AAA. Stats as
<dl>pairs, histogram isrole="img"with descriptive aria-label, top lists are semantic<ol>, tag cloud is<ul>of<li><a>, every interactive element hasfocus-visiblering, touch targets ≥ 44 px on mobile.prefers-reduced-motiondisables bar animations and chip hover lift.Related
DistributionBar.sveltecomponent — ship whichever lands first./briefwechselquery params (direction,location,tagId) are prerequisites for the deep links to work end-to-end.