import { Button } from '@/components/ui/button' import { LinkButton } from '@/components/LinkButton' import type { ProgressMessage } from '@/types' interface BlockProgressProps { progress: ProgressMessage eventRkey: string onUndo: () => void onRetry: () => void onShare: () => void undoLoading: boolean retryLoading: boolean shareLoading: boolean sharedListUrl: string | null } export function BlockProgress({ progress, eventRkey, onUndo, onRetry, onShare, undoLoading, retryLoading, shareLoading, sharedListUrl, }: BlockProgressProps) { const { status, total, completed, failed } = progress const isDone = status === 'complete' || status === 'failed' const processed = completed + failed const percent = total > 0 ? Math.round((processed / total) * 100) : 0 return (
{/* Progress bar + label */}

{isDone ? ( status === 'complete' ? `Done — ${completed.toLocaleString()} blocked${failed > 0 ? `, ${failed.toLocaleString()} failed` : '.'}` : `Failed — ${completed.toLocaleString()} blocked, ${failed.toLocaleString()} failed.` ) : ( `Blocking ${processed.toLocaleString()} of ${total.toLocaleString()}…` )}

{/* Done state: actions */} {isDone && (
{sharedListUrl && ( View shared block list on Bluesky ↗ )}
{failed > 0 && ( )} {completed > 0 && !sharedListUrl && ( )} View history →
)} {/* In-progress note */} {!isDone && (

Blocking at ~1/sec to respect the network's rate limits. You can close this tab — progress is saved to your account.

)}
) }