/** * Tiny circular progress ring. Renders an open ring when in-progress and * fills to a solid arc when complete. */ export function ProgressRing({ done, total, size = 12, }: { done: number; total: number; size?: number; }) { const stroke = 1.5; const radius = (size - stroke) / 2; const circumference = 2 * Math.PI * radius; const ratio = total > 0 ? Math.min(done / total, 1) : 0; const offset = circumference * (1 - ratio); const isComplete = total > 0 && done >= total; return ( ); }