fix(korrespondenz): dark theme, compact strip labels, year divider size, chevron alignment

- Add compact prop to PersonTypeahead: 7px uppercase label, 30px h input (matches spec FL/FI)
- Replace all hardcoded hex in 6 korrespondenz components with theme tokens (bg-surface,
  bg-muted, bg-canvas, border-line, text-ink, text-primary, text-accent, etc.)
- Fix year divider: text-[15px] font-black (spec: 15px/900)
- Fix log row chevron: items-center instead of items-start for vertical centering
- Fix recent-persons persistence: move persistRecentPerson to post-navigation $effect so
  senderName is resolved from server before stored in localStorage
- Add metadataComplete field to makeDoc() fixture to satisfy updated Document type
- Restore opacity-0 on swap button when only one person is set (matches spec + test)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-30 14:33:23 +02:00
parent 0387e9f428
commit 5fd7e41492
8 changed files with 80 additions and 73 deletions

View File

@@ -21,7 +21,7 @@ let sortDir = $state(untrack(() => data.filters.dir));
let senderName = $state(untrack(() => data.initialValues.senderName));
let receiverName = $state(untrack(() => data.initialValues.receiverName));
// Sync with server data after navigation
// Sync with server data after navigation; persist recent persons once the name is resolved
$effect(() => {
senderId = data.filters.senderId;
receiverId = data.filters.receiverId;
@@ -30,6 +30,9 @@ $effect(() => {
sortDir = data.filters.dir;
senderName = data.initialValues.senderName;
receiverName = data.initialValues.receiverName;
if (data.filters.senderId && data.initialValues.senderName) {
persistRecentPerson(data.filters.senderId, data.initialValues.senderName);
}
});
const isSinglePerson = $derived(!!senderId && !receiverId);
@@ -51,9 +54,6 @@ function persistRecentPerson(id: string, name: string) {
}
function applyFilters() {
// Persist to recent persons when a person is selected
if (senderId && senderName) persistRecentPerson(senderId, senderName);
const params = new SvelteURLSearchParams();
if (senderId) params.set('senderId', senderId);
if (receiverId) params.set('receiverId', receiverId);