From e3e61c161cadffba1942af39fc5daef3d5033c8a Mon Sep 17 00:00:00 2001 From: Bohan Jiang <52446949+Bohan-J@users.noreply.github.com> Date: Tue, 12 May 2026 18:06:42 +0800 Subject: [PATCH] fix(inbox): show Multica logo for system-actor notifications (#2479) Notifications from system actors (e.g. GitHub PR closed) were rendering with an "S" initials fallback. The avatar now shows the Multica icon when actor_type === "system", matching the platform's brand. Co-authored-by: multica-agent --- packages/core/types/inbox.ts | 2 +- packages/core/workspace/hooks.ts | 1 + packages/ui/components/common/actor-avatar.tsx | 5 +++++ packages/views/common/actor-avatar.tsx | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/core/types/inbox.ts b/packages/core/types/inbox.ts index bb77a6932..0d1bc1d75 100644 --- a/packages/core/types/inbox.ts +++ b/packages/core/types/inbox.ts @@ -25,7 +25,7 @@ export interface InboxItem { workspace_id: string; recipient_type: "member" | "agent"; recipient_id: string; - actor_type: "member" | "agent" | null; + actor_type: "member" | "agent" | "system" | null; actor_id: string | null; type: InboxItemType; severity: InboxSeverity; diff --git a/packages/core/workspace/hooks.ts b/packages/core/workspace/hooks.ts index ecfad9742..a01e003db 100644 --- a/packages/core/workspace/hooks.ts +++ b/packages/core/workspace/hooks.ts @@ -22,6 +22,7 @@ export function useActorName() { const getActorName = (type: string, id: string) => { if (type === "member") return getMemberName(id); if (type === "agent") return getAgentName(id); + if (type === "system") return "Multica"; return "System"; }; diff --git a/packages/ui/components/common/actor-avatar.tsx b/packages/ui/components/common/actor-avatar.tsx index 1629dc1fc..e7de8a41e 100644 --- a/packages/ui/components/common/actor-avatar.tsx +++ b/packages/ui/components/common/actor-avatar.tsx @@ -3,12 +3,14 @@ import { useState, useEffect } from "react"; import { Bot } from "lucide-react"; import { cn } from "@multica/ui/lib/utils"; +import { MulticaIcon } from "./multica-icon"; interface ActorAvatarProps { name: string; initials: string; avatarUrl?: string | null; isAgent?: boolean; + isSystem?: boolean; size?: number; className?: string; } @@ -18,6 +20,7 @@ function ActorAvatar({ initials, avatarUrl, isAgent, + isSystem, size = 20, className, }: ActorAvatarProps) { @@ -46,6 +49,8 @@ function ActorAvatar({ className="h-full w-full object-cover" onError={() => setImgError(true)} /> + ) : isSystem ? ( + ) : isAgent ? ( ) : ( diff --git a/packages/views/common/actor-avatar.tsx b/packages/views/common/actor-avatar.tsx index 72e51e1f4..026e9ae35 100644 --- a/packages/views/common/actor-avatar.tsx +++ b/packages/views/common/actor-avatar.tsx @@ -53,6 +53,7 @@ export function ActorAvatar({ initials={getActorInitials(actorType, actorId)} avatarUrl={getActorAvatarUrl(actorType, actorId)} isAgent={actorType === "agent"} + isSystem={actorType === "system"} size={size} className={className} />