feat(tests): disputed state + fix timestamps on reopen

1. New 'disputed' state — one lead approved, the other rejected:
   - Both approved → validated (unchanged)
   - Both rejected → rejected (unchanged)
   - One approves + one rejects → disputed (new)
   - DB: ALTER TYPE teststate ADD VALUE 'disputed'
   - Notification sent to the approving lead explaining the conflict
     with the rejection notes

2. Disputed UI in TestDetailHeader:
   - Amber banner showing conflict + rejection reason from notes
   - 'Change Vote to Rejected' button for the lead who approved
   - Validation indicators shown for disputed state too

3. Fix timestamps on reopen (rejected → draft):
   - Keep red_started_at, blue_started_at etc. as historical record
   - Only clear paused_at defensively
   - Timestamps naturally update when test is re-executed

4. disputed badge (amber) added to all badge color maps
This commit is contained in:
kitos
2026-06-03 12:21:47 +02:00
parent de0db3cec8
commit 643e65fbe5
11 changed files with 166 additions and 21 deletions
+2 -1
View File
@@ -43,7 +43,8 @@ export type TestState =
| "blue_evaluating"
| "in_review"
| "validated"
| "rejected";
| "rejected"
| "disputed"; // one lead approved, the other rejected — needs discussion
export type TestResult = "detected" | "not_detected" | "partially_detected";