import { X, RefreshCw, ChevronRight } from 'lucide-react' import { useNavigate } from 'react-router-dom' import type { Session } from '@/types' interface ActiveBatchBannerProps { treeId: string sessions: Session[] onDismiss: () => void } export function ActiveBatchBanner({ treeId, sessions, onDismiss }: ActiveBatchBannerProps) { const navigate = useNavigate() // Find the most recently started in-progress batch const inProgressSessions = sessions.filter(s => s.started_at && !s.completed_at && s.batch_id) if (inProgressSessions.length === 0) return null const batchId = inProgressSessions[0].batch_id! // Count all sessions in this batch const batchSessions = sessions.filter(s => s.batch_id === batchId) const completed = batchSessions.filter(s => s.completed_at).length const total = batchSessions.length return (

Batch in progress ยท {completed} of {total} targets complete

) }