fix(FN-2020): prevent duplicate retry toasts
- Remove the pre-retry info toast from TaskDetailModal retry handling
- Keep a single completion toast with updated success copy: "Retried {taskId}"
- Add regression tests to assert exactly one toast is shown on retry success
- Add regression tests to assert exactly one toast is shown on retry failure
This commit is contained in:
@@ -716,10 +716,9 @@ export function TaskDetailModal({
|
||||
const handleRetry = useCallback(() => {
|
||||
if (!onRetryTask) return;
|
||||
onClose();
|
||||
addToast(`Retrying ${task.id}...`, "info");
|
||||
onRetryTask(task.id)
|
||||
.then(() => {
|
||||
addToast(`Retry started for ${task.id}`, "success");
|
||||
addToast(`Retried ${task.id}`, "success");
|
||||
})
|
||||
.catch((err: any) => {
|
||||
addToast(err.message, "error");
|
||||
|
||||
Reference in New Issue
Block a user