// Processing view (8-stage progress stepper): shows which backend stage // is active as a real progress indicator with animated states. const STAGES = [ "extracting", "classifying", "registering", "matching", "diffing", "summarizing", "reporting", "done", ] as const; const STAGE_LABELS: Record = { extracting: "Extracting entities...", classifying: "Classifying elements...", registering: "Registering sheets...", matching: "Matching entities...", diffing: "Computing differences...", summarizing: "Generating summary...", reporting: "Building report...", done: "Finishing up...", }; interface ProcessingViewProps { currentStage: string; fileOldName: string; fileNewName: string; } export function ProcessingView({ currentStage, fileOldName, fileNewName, }: ProcessingViewProps) { const currentIndex = STAGES.indexOf(currentStage as (typeof STAGES)[number]); const activeIndex = currentIndex >= 0 ? currentIndex : -1; const progressPercent = activeIndex >= 0 ? ((activeIndex + 1) / STAGES.length) * 100 : 5; const currentLabel = STAGE_LABELS[currentStage] || "Analyzing drawings..."; return (
✨
{currentLabel}
Comparing {fileOldName} with {fileNewName}
); }