diff --git a/components/phishing/timeline-card.tsx b/components/phishing/timeline-card.tsx index 3c23897..06d106a 100644 --- a/components/phishing/timeline-card.tsx +++ b/components/phishing/timeline-card.tsx @@ -51,7 +51,8 @@ function renderEntry(entry: TimelineEntry): { } if (entry.kind === 'classification') { - const confidence = entry.confidence != null ? ` (${entry.confidence}%)` : ''; + const confidencePct = entry.confidence != null ? Number(entry.confidence) : NaN; + const confidence = Number.isFinite(confidencePct) ? ` (${Math.round(confidencePct * 100)}%)` : ''; // Defensive fallback: phishing-timeline.ts emits verdict as a plain // unvalidated runtime `string`, so a value outside this component's // narrowed union must never crash the render (T-23-12).