Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(web): resolve merge conflicts with dev and unify remaining inline avatars

Naiyuan Qingcc922367beb9
diff --cc apps/web/app/(dashboard)/agents/page.tsx
index a6e8c09270,a6e8c09270..0ab927a6af
--- a/apps/web/app/(dashboard)/agents/page.tsx
+++ b/apps/web/app/(dashboard)/agents/page.tsx
@@@ -74,6 -74,6 +74,7 @@@ import { useAuthStore } from "@/feature
import { useWorkspaceStore } from "@/features/workspace";
import { useRuntimeStore } from "@/features/runtimes";
import { useIssueStore } from "@/features/issues";
++import { ActorAvatar } from "@/components/common/actor-avatar";
// ---------------------------------------------------------------------------
@@@ -97,14 -97,14 +98,6 @@@ const taskStatusConfig: Record<string,
cancelled: { label: "Cancelled", icon: XCircle, color: "text-muted-foreground" },
};
--function getInitials(name: string): string {
-- return name
-- .split(/[\s-]+/)
-- .map((w) => w[0])
-- .join("")
-- .toUpperCase()
-- .slice(0, 2);
--}
function generateId(): string {
return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
@@@ -341,9 -341,9 +334,7 @@@ function AgentListItem(
isSelected ? "bg-accent" : "hover:bg-accent/50"
}`}
>
-- <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-xs font-semibold">
-- {getInitials(agent.name)}
-- </div>
++ <ActorAvatar actorType="agent" actorId={agent.id} size={32} className="rounded-lg" />
<div className="min-w-0 flex-1">
<div className="flex items-center gap-2">
@@@ -1322,9 -1322,9 +1313,7 @@@ function AgentDetail(
<div className="flex h-full flex-col">
{/* Header */}
<div className="flex h-12 shrink-0 items-center gap-3 border-b px-4">
-- <div className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-muted text-xs font-bold">
-- {getInitials(agent.name)}
-- </div>
++ <ActorAvatar actorType="agent" actorId={agent.id} size={28} className="rounded-md" />
<div className="min-w-0 flex-1">
<div className="flex items-center gap-2">
<h2 className="text-sm font-semibold truncate">{agent.name}</h2>
diff --cc apps/web/app/(dashboard)/settings/_components/members-tab.tsx
index fd101e088a,fd101e088a..e49d540355
--- a/apps/web/app/(dashboard)/settings/_components/members-tab.tsx
+++ b/apps/web/app/(dashboard)/settings/_components/members-tab.tsx
@@@ -2,6 -2,6 +2,7 @@@
import { useState } from "react";
import { Crown, Shield, User, Plus, MoreHorizontal, UserMinus, Users } from "lucide-react";
++import { ActorAvatar } from "@/components/common/actor-avatar";
import type { MemberWithUser, MemberRole } from "@/shared/types";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
@@@ -70,14 -70,14 +71,7 @@@ function MemberRow(
return (
<div className="flex items-center gap-3 px-4 py-3">
-- <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold">
-- {member.name
-- .split(" ")
-- .map((w) => w[0])
-- .join("")
-- .toUpperCase()
-- .slice(0, 2)}
-- </div>
++ <ActorAvatar actorType="member" actorId={member.user_id} size={32} />
<div className="min-w-0 flex-1">
<div className="text-sm font-medium truncate">{member.name}</div>
<div className="text-xs text-muted-foreground truncate">{member.email}</div>
diff --cc apps/web/components/common/actor-avatar.tsx
index a50d71ccb2,a50d71ccb2..5a94e7a15b
--- a/apps/web/components/common/actor-avatar.tsx
+++ b/apps/web/components/common/actor-avatar.tsx
@@@ -45,6 -45,6 +45,7 @@@ function ActorAvatar(
return (
<div
++ data-slot="avatar"
className={cn(
"inline-flex shrink-0 items-center justify-center rounded-full font-medium overflow-hidden",
"bg-muted text-muted-foreground",
diff --cc apps/web/components/common/mention-hover-card.tsx
index f54d4ad28f,f54d4ad28f..f0c3ef2cbf
--- a/apps/web/components/common/mention-hover-card.tsx
+++ b/apps/web/components/common/mention-hover-card.tsx
@@@ -1,7 -1,7 +1,6 @@@
"use client";
import type { ReactNode } from "react";
--import { Bot } from "lucide-react";
import { HoverCard, HoverCardTrigger, HoverCardContent } from "@/components/ui/hover-card";
import { ActorAvatar } from "@/components/common/actor-avatar";
import { useWorkspaceStore } from "@/features/workspace";
@@@ -49,9 -49,9 +48,7 @@@ function MentionHoverCard({ type, id, c
</HoverCardTrigger>
<HoverCardContent align="start" className="w-auto min-w-48 max-w-72">
<div className="flex items-center gap-2.5">
-- <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted">
-- <Bot className="h-4 w-4 text-muted-foreground" />
-- </div>
++ <ActorAvatar actorType="agent" actorId={id} size={32} />
<div className="min-w-0">
<p className="text-sm font-medium truncate">{agent.name}</p>
{agent.description && (
diff --cc apps/web/features/issues/components/issue-detail.tsx
index 3b5ea8556e,c6be3dfef0..15b0f94677
--- a/apps/web/features/issues/components/issue-detail.tsx
+++ b/apps/web/features/issues/components/issue-detail.tsx
@@@ -53,7 -53,7 +53,7 @@@ import
import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover";
import { Checkbox } from "@/components/ui/checkbox";
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@/components/ui/command";
--import { Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount } from "@/components/ui/avatar";
++import { AvatarGroup, AvatarGroupCount } from "@/components/ui/avatar";
import { ActorAvatar } from "@/components/common/actor-avatar";
import type { UpdateIssueRequest, IssueStatus, IssuePriority, TimelineEntry } from "@/shared/types";
import { ALL_STATUSES, STATUS_CONFIG, PRIORITY_ORDER, PRIORITY_CONFIG } from "@/features/issues/config";
@@@ -180,7 -179,7 +180,7 @@@ export function IssueDetail({ issueId,
const currentIndex = allIssues.findIndex((i) => i.id === id);
const prevIssue = currentIndex > 0 ? allIssues[currentIndex - 1] : null;
const nextIssue = currentIndex < allIssues.length - 1 ? allIssues[currentIndex + 1] : null;
-- const { getActorName, getActorInitials } = useActorName();
++ const { getActorName } = useActorName();
const { uploadWithToast } = useFileUpload();
const { defaultLayout, onLayoutChanged } = useDefaultLayout({
id: layoutId,
@@@ -598,9 -597,9 +598,12 @@@
{subscribers.length > 0 ? (
<AvatarGroup>
{subscribers.slice(0, 4).map((sub) => (
-- <Avatar key={`${sub.user_type}-${sub.user_id}`} size="sm">
-- <AvatarFallback>{getActorInitials(sub.user_type, sub.user_id)}</AvatarFallback>
-- </Avatar>
++ <ActorAvatar
++ key={`${sub.user_type}-${sub.user_id}`}
++ actorType={sub.user_type}
++ actorId={sub.user_id}
++ size={24}
++ />
))}
{subscribers.length > 4 && (
<AvatarGroupCount>+{subscribers.length - 4}</AvatarGroupCount>