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
This commit is contained in:
lorentz 2026-07-16 19:35:22 -04:00
parent 7048bf693a
commit af8a5bd438

View file

@ -12,7 +12,7 @@ import { hasPermission } from '@/lib/permissions';
export interface ClassificationCardData {
id: string;
verdict: 'SPAM' | 'UNWANTED' | 'THREAT';
verdict: 'SPAM' | 'UNWANTED' | 'THREAT' | 'USER_AWARENESS';
confidence: string | null;
summary: string | null;
reasons: string[];
@ -31,6 +31,7 @@ const VERDICT_VARIANT_CLASS: Record<ClassificationCardData['verdict'], string> =
SPAM: 'bg-slate-500/15 text-slate-600',
UNWANTED: 'bg-amber-500/15 text-amber-600',
THREAT: 'bg-destructive/15 text-destructive',
USER_AWARENESS: 'bg-emerald-500/15 text-emerald-600',
};
const ACTION_LABEL: Record<string, string> = {
@ -41,6 +42,7 @@ const ACTION_LABEL: Record<string, string> = {
reset_password: 'Reset password',
isolate_endpoint: 'Isolate endpoint',
disable_forwarding_rule: 'Disable forwarding rule',
acknowledge_user: 'Acknowledge user',
};
function humanizeAction(actionType: string): string {