mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
|
||||
@@ -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 }} />
|
||||
) : (
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user