+ {/* Procedure */}
+
+
+ {canEditRed ? (
+
+
+ {/* Tool Used */}
+
+
+ {canEditRed ? (
+
onRedFieldChange("tool_used", e.target.value)}
+ className="w-full rounded-lg border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"
+ placeholder="e.g. Atomic Red Team, Cobalt Strike, ..."
+ />
+ ) : (
+
{test.tool_used || "Not specified"}
+ )}
+
+
+ {/* Attack Success toggle */}
+
+
+ {canEditRed ? (
+
+ ) : (
+
+ {test.attack_success === null ? "Not set" : test.attack_success ? "Yes" : "No"}
+
+ )}
+
+
+ {/* Red Summary */}
+
+
+ {canEditRed ? (
+
+
+ {/* Red Evidences */}
+
+
Red Team Evidence
+ {canEditRed && (
+
+ await onUploadEvidence(file, "red")}
+ isUploading={isUploading}
+ />
+
+ )}
+
+
+
+ {/* Red validation status if applicable */}
+ {test.red_validation_status && (
+
+
+ {test.red_validation_status === "approved" ? (
+
+ ) : (
+
+ )}
+
+ Red Lead: {test.red_validation_status === "approved" ? "Approved" : "Rejected"}
+
+
+ {test.red_validation_notes && (
+
{test.red_validation_notes}
+ )}
+
+ )}
+
+ );
+
+ // ── Blue Team Tab ────────────────────────────────────────────────
+
+ const renderBlueTab = () => (
+
+ {/* Detection Result */}
+
+
+ {canEditBlue ? (
+
+ {DETECTION_RESULTS.map((opt) => (
+
+ ))}
+
+ ) : (
+
+ {test.detection_result ? (
+
+ {test.detection_result.replace(/_/g, " ")}
+
+ ) : (
+ Not evaluated yet
+ )}
+
+ )}
+
+
+ {/* Blue Summary */}
+
+
+ {canEditBlue ? (
+
+
+ {/* Blue Evidences */}
+
+
Blue Team Evidence
+ {canEditBlue && (
+
+ await onUploadEvidence(file, "blue")}
+ isUploading={isUploading}
+ />
+
+ )}
+
+
+
+ {/* Blue validation status if applicable */}
+ {test.blue_validation_status && (
+
+
+ {test.blue_validation_status === "approved" ? (
+
+ ) : (
+
+ )}
+
+ Blue Lead: {test.blue_validation_status === "approved" ? "Approved" : "Rejected"}
+
+
+ {test.blue_validation_notes && (
+
{test.blue_validation_notes}
+ )}
+
+ )}
+
+ );
+
+ // ── Summary Tab ──────────────────────────────────────────────────
+
+ const renderSummaryTab = () => (
+
+ {/* Timeline vertical line */}
+
+
+ {timeline.map((entry, idx) => (
+
+ {/* Dot */}
+
+
+
+ {/* Content */}
+
+
{entry.action}
+
+ {formatDate(entry.timestamp)}
+ {entry.user_id && ` - User: ${entry.user_id}`}
+
+ {entry.details && Object.keys(entry.details).length > 0 && (
+
+ {JSON.stringify(entry.details, null, 2)}
+
+ )}
+
+
+ ))}
+
+ );
+ };
+
+ // ── Tab content router ───────────────────────────────────────────
+
+ const TAB_CONTENT: Record