feat(chronik): align layout to grouped card pattern; fix duplicate rollup count
Some checks failed
CI / Unit & Component Tests (push) Failing after 3m31s
CI / OCR Service Tests (push) Successful in 57s
CI / Backend Unit Tests (push) Failing after 3m0s

- ChronikTimeline: date buckets now render as bordered cards with muted
  header (border-line / bg-surface / shadow-sm) and divide-y row
  separators, matching the DocumentList card pattern
- ChronikRow: remove rounded-sm (card handles clipping), hover:bg-canvas
  → hover:bg-muted/50; restore rollup count badge after doc title
- Messages (de/en/es): remove embedded {count} from all four rollup verb
  strings so the badge is the single source of truth, consistent with
  DashboardActivityFeed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-22 09:13:03 +02:00
parent ba0f9bb325
commit 4f671824dd
5 changed files with 21 additions and 19 deletions

View File

@@ -776,13 +776,13 @@
"chronik_day_this_week": "Diese Woche",
"chronik_day_older": "Älter",
"chronik_singleton_text_saved": "{actor} transkribierte einen Block in {doc}",
"chronik_rollup_text_saved": "{actor} transkribierte {count} Blöcke in {doc}",
"chronik_rollup_text_saved": "{actor} transkribierte {doc}",
"chronik_singleton_uploaded": "{actor} lud {doc} hoch",
"chronik_rollup_uploaded": "{actor} lud {count} Dokumente hoch",
"chronik_rollup_uploaded": "{actor} lud Dokumente hoch",
"chronik_singleton_reviewed": "{actor} überprüfte einen Block in {doc}",
"chronik_rollup_reviewed": "{actor} überprüfte {count} Blöcke in {doc}",
"chronik_rollup_reviewed": "{actor} überprüfte {doc}",
"chronik_singleton_annotated": "{actor} annotierte {doc}",
"chronik_rollup_annotated": "{actor} annotierte {doc} {count}×",
"chronik_rollup_annotated": "{actor} annotierte {doc}",
"chronik_comment_added": "{actor} kommentierte {doc}",
"chronik_mention_created": "{actor} erwähnte dich in {doc}",
"chronik_reply_received": "{actor} antwortete dir in {doc}",

View File

@@ -776,13 +776,13 @@
"chronik_day_this_week": "This week",
"chronik_day_older": "Older",
"chronik_singleton_text_saved": "{actor} transcribed a block in {doc}",
"chronik_rollup_text_saved": "{actor} transcribed {count} blocks in {doc}",
"chronik_rollup_text_saved": "{actor} transcribed {doc}",
"chronik_singleton_uploaded": "{actor} uploaded {doc}",
"chronik_rollup_uploaded": "{actor} uploaded {count} documents",
"chronik_rollup_uploaded": "{actor} uploaded documents",
"chronik_singleton_reviewed": "{actor} reviewed a block in {doc}",
"chronik_rollup_reviewed": "{actor} reviewed {count} blocks in {doc}",
"chronik_rollup_reviewed": "{actor} reviewed {doc}",
"chronik_singleton_annotated": "{actor} annotated {doc}",
"chronik_rollup_annotated": "{actor} annotated {doc} {count}×",
"chronik_rollup_annotated": "{actor} annotated {doc}",
"chronik_comment_added": "{actor} commented on {doc}",
"chronik_mention_created": "{actor} mentioned you in {doc}",
"chronik_reply_received": "{actor} replied to you in {doc}",

View File

@@ -776,13 +776,13 @@
"chronik_day_this_week": "Esta semana",
"chronik_day_older": "Anterior",
"chronik_singleton_text_saved": "{actor} transcribió un bloque en {doc}",
"chronik_rollup_text_saved": "{actor} transcribió {count} bloques en {doc}",
"chronik_rollup_text_saved": "{actor} transcribió {doc}",
"chronik_singleton_uploaded": "{actor} subió {doc}",
"chronik_rollup_uploaded": "{actor} subió {count} documentos",
"chronik_rollup_uploaded": "{actor} subió documentos",
"chronik_singleton_reviewed": "{actor} revisó un bloque en {doc}",
"chronik_rollup_reviewed": "{actor} revisó {count} bloques en {doc}",
"chronik_rollup_reviewed": "{actor} revisó {doc}",
"chronik_singleton_annotated": "{actor} anotó {doc}",
"chronik_rollup_annotated": "{actor} anotó {doc} {count}×",
"chronik_rollup_annotated": "{actor} anotó {doc}",
"chronik_comment_added": "{actor} comentó en {doc}",
"chronik_mention_created": "{actor} te mencionó en {doc}",
"chronik_reply_received": "{actor} te respondió en {doc}",

View File

@@ -108,7 +108,7 @@ const rowHref: string = $derived(
<a
href={rowHref}
data-variant={variant}
class="group flex items-start gap-3 rounded-sm p-3 transition-colors hover:bg-canvas focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:outline-none
class="group flex items-start gap-3 p-3 transition-colors hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:outline-none
{variant === 'for-you' ? 'border-l-[3px] border-accent bg-accent-bg/10' : ''}"
>
<!-- Avatar -->

View File

@@ -43,17 +43,19 @@ const grouped: Record<DayBucket, ActivityFeedItemDTO[]> = $derived.by(() => {
});
</script>
<div class="flex flex-col">
<div class="mt-6 flex flex-col">
{#each BUCKET_ORDER as bucket (bucket)}
{#if grouped[bucket].length > 0}
<section data-testid="chronik-bucket-{bucket}">
<div class="mt-6 mb-2 flex items-center gap-3">
<span class="text-xs font-bold tracking-widest text-ink-3 uppercase">
<section
data-testid="chronik-bucket-{bucket}"
class="mb-4 overflow-hidden border border-line bg-surface shadow-sm"
>
<div class="border-b border-line bg-muted px-5 py-2">
<span class="font-sans text-xs font-bold tracking-widest text-ink-3 uppercase">
{bucketLabel(bucket)}
</span>
<span class="h-px flex-1 bg-line"></span>
</div>
<ul role="list" class="flex flex-col gap-2">
<ul role="list" class="divide-y divide-line">
{#each grouped[bucket] as it (it.kind + it.happenedAt + it.documentId)}
<li>
<ChronikRow item={it} />