feat(tests): reopen rejected test keeps all content + rejection notes
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Backend (reopen_test): - Preserve red/blue validation NOTES — teams see exactly what to fix without losing the rejection context. Previously both notes were cleared. - Preserve all content fields: procedure_text, tool_used, red_summary, attack_success, blue_summary, detection_result (already the case). - Preserve evidences (separate table, unaffected — already the case). - Still clear: validation statuses + who/when validated (fresh re-validation required). Phase timing reset so the new execution starts clean. Frontend: - Button label: 'Reopen Test' → 'Continue Test' (more accurate intent) - Dialog title: 'Reopen Test' → 'Continue Test' - Dialog message: replaces alarming 'workflow will be restarted / clear all' with accurate description of what is preserved vs reset - Toast: explains what to do next
This commit is contained in:
@@ -230,7 +230,7 @@ export default function TestDetailPage() {
|
||||
onSuccess: () => {
|
||||
invalidateAll();
|
||||
setConfirmReopen(false);
|
||||
showToast("Test reopened", "success");
|
||||
showToast("Test returned to Draft — address the feedback and resubmit", "success");
|
||||
},
|
||||
onError: (err: unknown) => {
|
||||
setConfirmReopen(false);
|
||||
@@ -587,9 +587,9 @@ export default function TestDetailPage() {
|
||||
{/* Confirm Reopen Dialog */}
|
||||
<ConfirmDialog
|
||||
open={confirmReopen}
|
||||
title="Reopen Test"
|
||||
message="This will move the test back to Draft state and clear all validation decisions. The Red/Blue workflow will need to be restarted. Are you sure?"
|
||||
confirmLabel="Reopen"
|
||||
title="Continue Test"
|
||||
message="The test will return to Draft so you can address the rejection feedback. All content is preserved — procedure, summaries, evidences and rejection notes. Only the validation decisions are cleared so leads can re-validate the updated submission."
|
||||
confirmLabel="Continue"
|
||||
variant="warning"
|
||||
isLoading={reopenMutation.isPending}
|
||||
onConfirm={() => reopenMutation.mutate()}
|
||||
|
||||
Reference in New Issue
Block a user