Commit graph

15 commits

Author SHA1 Message Date
5b09dbff96 fix: tighten Headers tab grid layout and wrap long values instead of overflowing the card 2026-07-18 06:04:37 -04:00
74e43e23c4 feat(260717-v6c): add Mark as accidental report button, dialog, and timeline case
- ActionAreaCard: new GatedButton + confirm AlertDialog (optional reason),
  resolved/tooltip logic now covers accidental_report status, toast
  distinguishes full success from note-post failure
- TimelineCard: campaign_marked_accidental_report entry uses the
  blue/CheckCircle2 tint (distinct from slate/XCircle false-positive)
2026-07-17 22:34:09 -04:00
ec6c5d05e6 fix: convert 0-1 scale confidence to percent in timeline-card (same bug as classification-card, missed in 260716-pgr) 2026-07-17 22:24:02 -04:00
952b63c8a4 fix: show pre-forward auth verdict (authResultsOriginal) instead of misleading post-forward SPF/DKIM/DMARC in evidence card 2026-07-17 21:00:25 -04:00
9ae834f5e6 feat(23-02): add USER_AWARENESS support to TimelineCard, prevent review-page crash
- Add USER_AWARENESS to classification-entry verdict union and VERDICT_TINT (emerald, matching ClassificationCard)
- Widen campaign_classified audit-case cast to include USER_AWARENESS
- Add defensive fallback on both .split(' ') tint sites so any unrecognized runtime verdict string can never crash the render (T-23-12) — phishing-timeline.ts emits verdict as an unvalidated plain string
2026-07-16 19:36:11 -04:00
547372e57a feat(23-02): add acknowledge_user manual action case to ActionAreaCard
- Add acknowledge_user: 'Acknowledge user' to ACTION_LABEL
- Add case 'acknowledge_user' to ActionParamsForm mirroring no_action (no-params form)
- Renders as a normal checkbox + Approve action for every company; no automation-gate logic added (D-04) — the auto-approval carve-out lives only in the webhook path (Plan 05)
2026-07-16 19:35:38 -04:00
af8a5bd438 feat(23-02): add USER_AWARENESS badge variant + acknowledge_user label to ClassificationCard
- Add USER_AWARENESS to ClassificationCardData verdict union
- Add emerald VERDICT_VARIANT_CLASS entry for USER_AWARENESS (distinct from UNWANTED amber and THREAT destructive)
- Add acknowledge_user: 'Acknowledge user' to ACTION_LABEL
2026-07-16 19:35:22 -04:00
3f16268152 fix(260716-pgr): confidence display shows percent, not raw 0-1 scale
classifications.confidence is 0.0-1.0 (1 = max confidence). ClassificationCard
appended "%" directly to the raw value, so confidence=1 rendered as "1%
confidence" -- read as near-zero, the opposite of its true meaning. Found live
while reviewing a Breach Secure Now simulated-phishing classification.
2026-07-16 18:21:40 -04:00
1a7a5922fe feat(22-05): remediate + mark-false-positive + permission/resolved gating (REVIEW-06, D-05, D-06)
- Add GatedButton: buttons stay in the DOM (D-05) always, wrapped in a
  Tooltip explanation when disabled
- Gate all three actions with hasPermission(role, 'phishing', 'approve'|
  'remediate') from lib/permissions.ts — the identical check the server
  routes enforce, never a bespoke role === 'admin' string check (REVIEW-06)
- Derive resolved = campaignStatus === 'false_positive' OR any completed
  remediation_actions row; resolved-state tooltip mirrors the completed
  action's approver/date or the campaign's updated_at
- Remediate: AlertDialog confirmation listing approved action count/types,
  then POST /remediate (no body), refetch on success
- Mark as false positive: AlertDialog with optional reason Textarea, then
  POST /mark-false-positive { reason? }; disabled reason mirrors the
  server's 409 guard exactly (approved/completed remediation blocks it)
2026-07-16 14:42:05 -04:00
11190abafd feat(22-05): checkbox list + editable params + Approve selected (D-03)
- Create ActionAreaCard with a null-guard on classification (renders an
  informational note, never dereferences recommendedActions, for the
  default grouped-but-unclassified state)
- Render one checkbox row per recommended action with an always-visible
  params form pre-filled via deriveDefaultParams(actionType, evidence)
- Submit exact ApproveActionInput[] to POST /approve; purge_message
  mailboxes is edited as a comma-separated string and normalized to
  string[] at submit time
- Refetch via onActionComplete() on success (D-04, no optimistic mutation)
2026-07-16 14:40:00 -04:00
75cd454ff8 Merge branch 'worktree-agent-a432f929ffab2e5b8'
# Conflicts:
#	.planning/phases/22-approval-ui-livelink-addressable-campaign-review-and-approve/deferred-items.md
2026-07-16 14:33:16 -04:00
4ec5ba4979 feat(22-03): add EvidenceCard tabbed EML evidence display (REVIEW-03)
- components/phishing/evidence-card.tsx renders Headers, URLs,
  Attachments, Body preview, and Blast Radius tabs for a selected
  message
- Body preview renders inside a <pre className="whitespace-pre-wrap">
  as plain JSX text only, never via a raw-HTML injection prop
- URLs tab delegates to UrlList (D-09 inert copy-only)
- Blast radius renders explicit unavailable-state copy or a
  matched/delivered/held/rejected/clicked stat row + per-recipient
  table when ok
- CardTitle explicitly overridden with font-bold per UI-SPEC typography
2026-07-16 14:29:34 -04:00
e990a320b2 feat(22-04): add TimelineCard chronological event renderer
- Merges reports/classifications/audit-events into one ascending list
  (relies on server ordering, no client-side sort)
- Per-kind icon/label/tint: FileText for reports, Sparkles tinted by
  verdict for classifications, event_type table for audit rows
  (remediation_approved/completed, campaign_marked_false_positive,
  campaign_classified, humanized fallback for anything else)
- 8px rail dot + border-l connector per UI-SPEC Timeline Spec
2026-07-16 14:29:15 -04:00
14adddfdf0 feat(22-04): add ClassificationCard read-only verdict display
- Renders latest classification verdict/confidence/summary/reasons
- Recommended-action chips (informational, no checkboxes)
- Requires-approval warning Alert when requiresApproval is true
- Reclassify button gated on hasPermission(role, 'phishing', 'analyze')
- Returns null when classification is missing (empty-state handled by plan 06)
2026-07-16 14:27:29 -04:00
87008a5da6 feat(22-03): add tooltip primitive + inert UrlList component (D-09)
- npx shadcn add tooltip generates components/ui/tooltip.tsx (official
  registry, no npm dependency added)
- components/phishing/url-list.tsx renders extracted URLs as inert
  <code> text with copy-to-clipboard only — no <a>/href, no <Link>,
  no navigating onClick per D-09
2026-07-16 14:27:11 -04:00