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 <github@multica.ai>
This commit is contained in:
Bohan Jiang
2026-05-12 18:06:42 +08:00
committed by GitHub
parent a0c64aaf65
commit e3e61c161c
4 changed files with 8 additions and 1 deletions

View File

@@ -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;

View File

@@ -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";
};

View File

@@ -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 ? (
<MulticaIcon noSpin style={{ width: size * 0.55, height: size * 0.55 }} />
) : isAgent ? (
<Bot style={{ width: size * 0.55, height: size * 0.55 }} />
) : (

View File

@@ -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}
/>