Skip to content

Commit dad44f1

Browse files
Surface candidate evidence in active break review
1 parent d06a231 commit dad44f1

1 file changed

Lines changed: 49 additions & 1 deletion

File tree

frontend/components/BreakResolutionWorkbench.tsx

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ export default function BreakResolutionWorkbench() {
10311031

10321032
function scrollToCandidateEvidence() {
10331033
document
1034-
.getElementById("related-candidate-evidence")
1034+
.getElementById("candidate-evidence-preview")
10351035
?.scrollIntoView({ behavior: "smooth", block: "start" });
10361036
}
10371037

@@ -1223,6 +1223,54 @@ export default function BreakResolutionWorkbench() {
12231223
selectedPacket={selectedPacket}
12241224
/>
12251225

1226+
{relatedCandidates.length > 0 ? (
1227+
<div
1228+
id="candidate-evidence-preview"
1229+
className="mb-5 rounded-2xl border border-blue-200 bg-blue-50/60 p-4"
1230+
>
1231+
<div className="mb-3 flex flex-col gap-2 lg:flex-row lg:items-end lg:justify-between">
1232+
<div>
1233+
<div className="text-xs font-bold uppercase tracking-[0.18em] text-blue-700">
1234+
Candidate evidence
1235+
</div>
1236+
<div className="mt-1 text-sm font-semibold text-blue-900">
1237+
Review candidate hypotheses before staging a candidate decision.
1238+
</div>
1239+
</div>
1240+
<div className="text-xs font-bold text-blue-700">
1241+
{relatedCandidates.length} candidate source(s)
1242+
</div>
1243+
</div>
1244+
1245+
<div className="grid gap-3 lg:grid-cols-2">
1246+
{relatedCandidates.slice(0, 2).map((candidate) => (
1247+
<CandidateCard
1248+
key={`preview-${candidate.source}`}
1249+
candidate={candidate}
1250+
selectedDecision={
1251+
candidateDecision?.source === candidate.source
1252+
? candidateDecision
1253+
: null
1254+
}
1255+
onDecision={(action) => {
1256+
const nextCandidateDecision = {
1257+
source: candidate.source,
1258+
action,
1259+
confidence: candidate.confidence,
1260+
rationale: candidate.rationale,
1261+
};
1262+
1263+
setCandidateDecision(nextCandidateDecision);
1264+
setAnalystNote("");
1265+
setDecision(`${action} ${candidate.source} candidate`);
1266+
setDecisionTimestamp(new Date().toISOString());
1267+
}}
1268+
/>
1269+
))}
1270+
</div>
1271+
</div>
1272+
) : null}
1273+
12261274
<EvidenceComparison fields={evidenceFields} />
12271275

12281276
<DrillDownPanels packet={selectedPacket} />

0 commit comments

Comments
 (0)