import type { ReactNode, MouseEventHandler } from 'react'; import { cn } from '../../lib/utils'; import type { SocialCard as SocialCardData, AgentStatus } from '../../lib/social-cards'; import { AgentAvatar } from '../shared/agent-avatar'; import { BaseCard } from '../shared/base-card'; interface SocialCardProps { data: SocialCardData; className?: string; selected?: boolean; onClick?: MouseEventHandler; onJumpToGraph?: (id: string) => void; onJumpToKanban?: (id: string) => void; } const RELATIONSHIP_COLORS = { // NEW: unlocks = what blocks ME (rose) unlocks: 'text-rose-400', // NEW: blocks = what I block (amber) blocks: 'text-amber-400', }; const DOT_COLORS = { // NEW: unlocks = what blocks ME (rose) unlocks: 'bg-rose-400', // NEW: blocks = what I block (amber) blocks: 'bg-amber-400', }; function Dot({ color }: { color: 'unlocks' | 'blocks' }) { return ( ); } function RelationshipSection({ label, items, color, }: { label: string; items: string[]; color: 'unlocks' | 'blocks'; }) { if (items.length === 0) return null; return (
{label}:
{items.slice(0, 3).map((id) => ( {id} ))} {items.length > 3 && ( +{items.length - 3} )}
); } function ViewJumpIcon({ icon, label, onClick, }: { icon: ReactNode; label: string; onClick?: () => void; }) { return ( ); } function GraphIcon() { return ( ); } function KanbanIcon() { return ( ); } function ExpandIcon() { return ( ); } export function SocialCard({ data, className, selected = false, onClick, onJumpToGraph, onJumpToKanban, }: SocialCardProps) { // NEW semantic: blocks = what I block (amber), unblocks = what blocks me (rose) const hasBlocks = data.blocks.length > 0; const hasUnblocks = data.unblocks.length > 0; return (
{data.id}

{data.title}

{(hasBlocks || hasUnblocks) && (
{/* UNLOCKS: tasks blocking THIS task (rose) - what blocks me */} {/* BLOCKS: tasks THIS task blocks (amber) - what I block */}
)}
{data.agents.slice(0, 3).map((agent) => ( ))} {data.agents.length > 3 && ( +{data.agents.length - 3} )}
} label="View in Graph" onClick={() => onJumpToGraph?.(data.id)} /> } label="View in Kanban" onClick={() => onJumpToKanban?.(data.id)} />
); }