feat(tests): review panels, blind visibility UX, red_review/blue_review badges

This commit is contained in:
kitos
2026-07-06 12:02:14 +02:00
parent 82033b5037
commit d5e3df00f9
11 changed files with 449 additions and 11 deletions
+17 -1
View File
@@ -29,7 +29,9 @@ import { useAuth } from "../context/AuthContext";
const testStateBadgeColors: Record<TestState, string> = {
draft: "bg-gray-800/50 text-gray-400 border-gray-600/30",
red_executing: "bg-orange-900/50 text-orange-400 border-orange-500/30",
red_review: "bg-amber-900/50 text-amber-400 border-amber-500/30",
blue_evaluating: "bg-indigo-900/50 text-indigo-400 border-indigo-500/30",
blue_review: "bg-purple-900/50 text-purple-400 border-purple-500/30",
in_review: "bg-blue-900/50 text-blue-400 border-blue-500/30",
validated: "bg-green-900/50 text-green-400 border-green-500/30",
rejected: "bg-red-900/50 text-red-400 border-red-500/30",
@@ -39,7 +41,9 @@ const testStateBadgeColors: Record<TestState, string> = {
const testStateLabels: Record<TestState, string> = {
draft: "Draft",
red_executing: "Red Executing",
red_review: "Red Review",
blue_evaluating: "Blue Evaluating",
blue_review: "Blue Review",
in_review: "In Review",
validated: "Validated",
rejected: "Rejected",
@@ -49,7 +53,9 @@ const testStateLabels: Record<TestState, string> = {
const ALL_STATES: TestState[] = [
"draft",
"red_executing",
"red_review",
"blue_evaluating",
"blue_review",
"in_review",
"validated",
"rejected",
@@ -63,8 +69,12 @@ function currentTeamForState(state: TestState): string {
case "draft":
case "red_executing":
return "Red Team";
case "red_review":
return "Red Lead";
case "blue_evaluating":
return "Blue Team";
case "blue_review":
return "Blue Lead";
case "in_review":
return "Managers";
case "validated":
@@ -429,7 +439,9 @@ export default function TestsPage() {
const icons: Record<TestState, React.ReactNode> = {
draft: <Clock className="h-5 w-5 text-gray-400" />,
red_executing: <Play className="h-5 w-5 text-orange-400" />,
red_review: <Shield className="h-5 w-5 text-amber-400" />,
blue_evaluating: <Shield className="h-5 w-5 text-indigo-400" />,
blue_review: <Shield className="h-5 w-5 text-purple-400" />,
in_review: <Eye className="h-5 w-5 text-blue-400" />,
validated: <CheckCircle className="h-5 w-5 text-green-400" />,
rejected: <XCircle className="h-5 w-5 text-red-400" />,
@@ -438,7 +450,9 @@ export default function TestsPage() {
const colorMap: Record<TestState, string> = {
draft: "text-gray-400",
red_executing: "text-orange-400",
red_review: "text-amber-400",
blue_evaluating: "text-indigo-400",
blue_review: "text-purple-400",
in_review: "text-blue-400",
validated: "text-green-400",
rejected: "text-red-400",
@@ -708,7 +722,9 @@ function TestTable({
testStateBadgeColors[test.state]
}`}
>
{testStateLabels[test.state]}
{test.state === "blue_evaluating" && !test.blue_work_started_at
? "Queued Blue Team"
: testStateLabels[test.state]}
</span>
</td>
<td className="py-3 px-4 text-gray-400 text-xs">