fix(#145): deep-link notifications; show createdAt in recent docs

- Notification widget builds full link with ?commentId= and
  &annotationId= params, matching the bell notification behaviour
- Recent docs widget shows createdAt (upload date) instead of
  documentDate (the date on the original document)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-29 10:03:36 +02:00
parent c8da2224f8
commit 7734ce7bae
4 changed files with 31 additions and 17 deletions

View File

@@ -5,6 +5,8 @@ type NotificationDTO = {
id: string;
type: 'REPLY' | 'MENTION';
documentId?: string;
referenceId?: string;
annotationId?: string;
read: boolean;
createdAt: string;
actorName?: string;
@@ -26,7 +28,9 @@ let { mentions }: Props = $props();
<div class="flex items-center gap-3 border-b border-line py-2 last:border-0">
{#if mention.documentId}
<a
href="/documents/{mention.documentId}"
href={mention.annotationId
? `/documents/${mention.documentId}?commentId=${mention.referenceId}&annotationId=${mention.annotationId}`
: `/documents/${mention.documentId}?commentId=${mention.referenceId}`}
class="font-serif text-sm text-ink hover:text-ink-2"
>
{mention.actorName ?? ''}