feat(disputed): Confirm My Validation button + discussion request modal
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: POST /tests/{id}/request-discussion
- Only callable by the lead whose vote is 'approved' in a disputed test
- Sends notification to the rejecting lead: 'Lead X confirms their
approval and wants to discuss your rejection'
- Logs the action in audit trail
Frontend:
- 'Confirm My Validation' button (amber outline) alongside 'Change to Rejected'
- Opens a modal showing:
* Explanation: both leads must agree to finalise
* Other lead's rejection reason/notes
* What happens next (stays disputed, notification sent, either can change)
- 'Send Discussion Request' → calls the new endpoint → shows success state:
'Lead username has been notified...'
- Instruction to reach out via team channels to resolve offline
Flow summary for disputed tests:
Approving lead sees 2 options:
a) 'Confirm My Validation' → modal → send request → other lead notified
b) 'Change to Rejected' → validation modal → both agree to reject → rejected
This commit is contained in:
@@ -308,6 +308,16 @@ export interface RTImportResult {
|
||||
engagement: string;
|
||||
}
|
||||
|
||||
/** Confirm approval in a disputed test and notify the rejecting lead to discuss. */
|
||||
export async function requestDiscussion(testId: string): Promise<{
|
||||
status: string;
|
||||
message: string;
|
||||
rejector_username: string;
|
||||
}> {
|
||||
const { data } = await client.post(`/tests/${testId}/request-discussion`);
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Import results from a real Red Team engagement. */
|
||||
export async function importRT(payload: RTImportPayload): Promise<RTImportResult> {
|
||||
const { data } = await client.post<RTImportResult>("/tests/import-rt", payload);
|
||||
|
||||
Reference in New Issue
Block a user