import { FeatureCard } from './FeatureCard' import { Plus, Sparkles, Wand2 } from 'lucide-react' import type { Feature, ActiveAgent } from '../lib/types' interface KanbanColumnProps { title: string count: number features: Feature[] allFeatures?: Feature[] // For dependency status calculation activeAgents?: ActiveAgent[] // Active agents for showing which agent is working on a feature color: 'pending' | 'progress' | 'done' onFeatureClick: (feature: Feature) => void onAddFeature?: () => void onExpandProject?: () => void showExpandButton?: boolean onCreateSpec?: () => void // Callback to start spec creation showCreateSpec?: boolean // Show "Create Spec" button when project has no spec } const colorMap = { pending: 'kanban-header-pending', progress: 'kanban-header-progress', done: 'kanban-header-done', } export function KanbanColumn({ title, count, features, allFeatures = [], activeAgents = [], color, onFeatureClick, onAddFeature, onExpandProject, showExpandButton, onCreateSpec, showCreateSpec, }: KanbanColumnProps) { // Create a map of feature ID to active agent for quick lookup const agentByFeatureId = new Map( activeAgents.map(agent => [agent.featureId, agent]) ) return (
{/* Header */}

{title} {count}

{(onAddFeature || onExpandProject) && (
{onAddFeature && ( )} {onExpandProject && showExpandButton && ( )}
)}
{/* Cards */}
{features.length === 0 ? (
{showCreateSpec && onCreateSpec ? (

No spec created yet

) : ( 'No features' )}
) : ( features.map((feature, index) => (
onFeatureClick(feature)} isInProgress={color === 'progress'} allFeatures={allFeatures} activeAgent={agentByFeatureId.get(feature.id)} />
)) )}
) }