---
status: complete
---

# Quick Task 260716-pgr: Fix confidence display bug — Summary

**`ClassificationCard` rendered the 0.0-1.0 `classifications.confidence` value by appending "%" directly, so a maximum-confidence classification (`confidence='1'`) displayed as "1% confidence" — read by an operator as near-zero, the opposite of its true meaning. Fixed by multiplying by 100 and rounding, guarded by `Number.isFinite`.**

## Change

`components/phishing/classification-card.tsx` — confidence render block:
```tsx
{classification.confidence != null && Number.isFinite(Number(classification.confidence)) && (
  <span className="text-sm text-muted-foreground">
    {Math.round(Number(classification.confidence) * 100)}% confidence
  </span>
)}
```

## Verification

- `npx tsc --noEmit --pretty` clean.
- `Math.round(Number(classification.confidence) * 100)` present.
- `Number.isFinite` guard present.
- Manual trace: `confidence='1'` → "100% confidence"; `confidence='0.85'` → "85% confidence"; `confidence=null` or unparseable → no confidence text renders.

## Deviations from Plan

None — plan executed exactly as written.

## Discovered while investigating this bug

This was found live while reviewing ticket 699415's classification in the Phase 22 review page (a Breach Secure Now/KnowBe4 simulated-phishing report, correctly classified `UNWANTED` with `confidence=1`, displaying as "1% confidence" before this fix). The same investigation surfaced two follow-on items tracked separately:
- A dead Autotask webhook (no delivery since 2026-04-29) — fixed same session by re-registering the Tickets/TicketNotes subscriptions.
- A request to add a dedicated "User Awareness"/simulation verdict (today forced into the generic `UNWANTED` bucket) plus a per-company automation gate — scoped as a new phase, not part of this quick task.
