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:
Fusion
2026-04-17 15:31:59 -07:00
committed by gsxdsm
parent a054db8859
commit d8f3cb065a
2 changed files with 77 additions and 2 deletions

View File

@@ -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");