feat(tests): disputed state + fix timestamps on reopen
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
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
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,7 @@ const testStateColors: Record<string, string> = {
|
||||
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",
|
||||
disputed: "bg-amber-900/50 text-amber-400 border-amber-500/30",
|
||||
};
|
||||
|
||||
export default function CampaignDetailPage() {
|
||||
|
||||
@@ -54,6 +54,7 @@ const testStateBadgeColors: Record<string, string> = {
|
||||
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",
|
||||
disputed: "bg-amber-900/50 text-amber-400 border-amber-500/30",
|
||||
};
|
||||
|
||||
const testStateLabels: Record<string, string> = {
|
||||
|
||||
@@ -45,6 +45,7 @@ const testStateBadgeColors: Record<TestState, string> = {
|
||||
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",
|
||||
disputed: "bg-amber-900/50 text-amber-400 border-amber-500/30",
|
||||
};
|
||||
|
||||
const testResultBadgeColors: Record<TestResult, string> = {
|
||||
|
||||
@@ -32,6 +32,7 @@ const testStateBadgeColors: Record<TestState, string> = {
|
||||
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",
|
||||
disputed: "bg-amber-900/50 text-amber-400 border-amber-500/30",
|
||||
};
|
||||
|
||||
const testStateLabels: Record<TestState, string> = {
|
||||
@@ -41,6 +42,7 @@ const testStateLabels: Record<TestState, string> = {
|
||||
in_review: "In Review",
|
||||
validated: "Validated",
|
||||
rejected: "Rejected",
|
||||
disputed: "Disputed",
|
||||
};
|
||||
|
||||
const ALL_STATES: TestState[] = [
|
||||
@@ -50,6 +52,7 @@ const ALL_STATES: TestState[] = [
|
||||
"in_review",
|
||||
"validated",
|
||||
"rejected",
|
||||
"disputed",
|
||||
];
|
||||
|
||||
/* ── Helper: which team "owns" the current state ────────────────────── */
|
||||
|
||||
Reference in New Issue
Block a user