import { CheckCircle2, Circle, Loader2, MessageCircle, UserCircle } from 'lucide-react' import type { Feature, ActiveAgent } from '../lib/types' import { DependencyBadge } from './DependencyBadge' import { AgentAvatar } from './AgentAvatar' import { Card, CardContent } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' interface FeatureCardProps { feature: Feature onClick: () => void isInProgress?: boolean allFeatures?: Feature[] activeAgent?: ActiveAgent } // Generate consistent color for category function getCategoryColor(category: string): string { const colors = [ 'bg-pink-500', 'bg-cyan-500', 'bg-green-500', 'bg-yellow-500', 'bg-orange-500', 'bg-purple-500', 'bg-blue-500', ] let hash = 0 for (let i = 0; i < category.length; i++) { hash = category.charCodeAt(i) + ((hash << 5) - hash) } return colors[Math.abs(hash) % colors.length] } export function FeatureCard({ feature, onClick, isInProgress, allFeatures = [], activeAgent }: FeatureCardProps) { const categoryColor = getCategoryColor(feature.category) const isBlocked = feature.blocked || (feature.blocking_dependencies && feature.blocking_dependencies.length > 0) const hasActiveAgent = !!activeAgent return ( {/* Header */}
{feature.category}
#{feature.priority}
{/* Name */}

{feature.name}

{/* Description */}

{feature.description}

{/* Agent working on this feature */} {activeAgent && (
{activeAgent.agentName} is working on this!
{activeAgent.thought && (

{activeAgent.thought}

)}
)} {/* Status */}
{isInProgress ? ( <> Processing... ) : feature.passes ? ( <> Complete ) : feature.needs_human_input ? ( <> Needs Your Input ) : isBlocked ? ( <> Blocked ) : ( <> Pending )}
) }