fix(tests): remove blind visibility, both teams always see each other's fields

Red and Blue could not see each other's real field data until both
reviews passed, showing a placeholder message instead. This kept
detection testing blind to what Red actually did; both sides now see
the full, live test data at all times.
This commit is contained in:
kitos
2026-07-14 13:36:19 +02:00
parent bdc6579c10
commit f87959369b
3 changed files with 21 additions and 101 deletions
@@ -177,13 +177,6 @@ export default function TeamTabs({
(role === "blue_lead" ||
(role === "blue_tech" && !!test.blue_work_started_at));
// Blind visibility: neither side sees the other's data until both reviews
// pass (matches the backend's field-masking on GET /tests/{id}).
const BLIND_STATES = ["draft", "red_executing", "red_review", "blue_evaluating", "blue_review"];
const isBlind = BLIND_STATES.includes(test.state) && role !== "admin" && role !== "viewer";
const hideBlueFromMe = isBlind && (role === "red_tech" || role === "red_lead");
const hideRedFromMe = isBlind && (role === "blue_tech" || role === "blue_lead");
// Containment fields only visible when attack was detected (draft or saved value)
const isDetected = canEditBlue
? blueDraft.detection_result === "detected" || blueDraft.detection_result === "partially_detected"
@@ -211,17 +204,6 @@ export default function TeamTabs({
// ── Red Team Tab ─────────────────────────────────────────────────
const renderRedTab = () => {
if (hideRedFromMe) {
return (
<div className="py-12 text-center">
<Shield className="mx-auto h-10 w-10 text-gray-600" />
<p className="mt-2 text-sm text-gray-400">
Red Team work is hidden until both teams' reviews are complete — this keeps
detection testing blind.
</p>
</div>
);
}
return (
<div className="space-y-6">
{/* Locked hint for red_tech in draft state */}
@@ -420,17 +402,6 @@ export default function TeamTabs({
// ── Blue Team Tab ────────────────────────────────────────────────
const renderBlueTab = () => {
if (hideBlueFromMe) {
return (
<div className="py-12 text-center">
<ShieldCheck className="mx-auto h-10 w-10 text-gray-600" />
<p className="mt-2 text-sm text-gray-400">
Blue Team work is hidden until both teams' reviews are complete this keeps
detection testing blind.
</p>
</div>
);
}
return (
<div className="space-y-6">
{/* Locked hint for blue_tech before Start Evaluation */}