1
0
Fork 0

feat(frontend): render threat assessment empty state and drop redundant internal header

When no analyst estimate exists, the card now shows an inline
'Threat assessment unavailable / insufficient intel' placeholder that
matches the card chrome instead of collapsing to nothing. The duplicate
internal 'Threat Assessment // Intel' strip is removed now that the
section header carries the icon and label; the unused refCode is dropped
with it.
This commit is contained in:
Jason Fraley 2026-11-02 12:20:11 -05:00
parent 0a8246ebcc
commit f2f637e289

View file

@ -234,11 +234,42 @@ export function MissionThreatAssessment({
missionId,
}: MissionThreatAssessmentProps) {
if (!likelihoods || likelihoods.length === 0) {
return null;
return (
<section
aria-label="Threat Assessment"
className="relative overflow-hidden rounded-none border border-border/70 bg-card"
>
{/* Faint grid texture: constant opacity, never brightens. */}
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 z-[1] opacity-[0.04]"
style={{
backgroundImage:
"linear-gradient(to right, white 1px, transparent 1px), linear-gradient(to bottom, white 1px, transparent 1px)",
backgroundSize: "28px 28px",
}}
/>
{/* Corner brackets. */}
<div aria-hidden="true" className="pointer-events-none absolute inset-2 z-30">
<span className="absolute left-0 top-0 size-3 border-l border-t border-white/25" />
<span className="absolute right-0 top-0 size-3 border-r border-t border-white/25" />
<span className="absolute bottom-0 left-0 size-3 border-b border-l border-white/25" />
<span className="absolute bottom-0 right-0 size-3 border-b border-r border-white/25" />
</div>
{/* Placeholder body when no analyst estimate has been entered. */}
<div className="relative z-10 flex min-h-[10rem] flex-col items-center justify-center gap-2 px-6 py-10 text-center">
<BinocularsIcon aria-hidden="true" className="size-6 text-white/20" />
<p className="text-sm font-mono uppercase tracking-widest text-white/40">
Threat assessment unavailable
</p>
<p className="text-xs font-mono uppercase tracking-wider text-white/25">
insufficient intel
</p>
</div>
</section>
);
}
const refCode = missionId != null ? String(missionId).padStart(3, "0") : null;
return (
<section
aria-label="Threat Assessment"
@ -263,22 +294,6 @@ export function MissionThreatAssessment({
<span className="absolute bottom-0 right-0 size-3 border-b border-r border-white/25" />
</div>
{/* Classification strip. */}
<div
aria-hidden="true"
className="relative z-20 flex items-center justify-between border-b border-white/15 bg-black/50 px-5 py-1.5 backdrop-blur-sm"
>
<span className="flex items-center gap-1.5 font-mono text-[9px] uppercase tracking-widest text-white/60">
<RadarIcon className="size-3" />
Threat Assessment // Intel
</span>
{refCode && (
<span className="font-mono text-[9px] uppercase tracking-widest text-white/60">
REF {refCode}
</span>
)}
</div>
{/* Likelihood rows. */}
<table className="relative z-10 w-full border-collapse text-sm">
<caption className="sr-only">