From 18cf12c295c4614b57d9a616765dc09dd071b125 Mon Sep 17 00:00:00 2001 From: Alex Netsch Date: Tue, 28 Oct 2025 16:13:10 +0000 Subject: [PATCH] - Cleared persisted git error state whenever the modal hides or attempts change so reopened dialogs start clean; also reset the state during close handling to avoid stale messages `frontend/src/components/dialogs/tasks/GitActionsDialog.tsx:128`. (#1097) - No automated tests were run; recommend triggering a git error, close/reopen the dialog, and retry a successful action to confirm the message clears. --- frontend/src/components/dialogs/tasks/GitActionsDialog.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx b/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx index 4b2217b6..f8141c1e 100644 --- a/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx +++ b/frontend/src/components/dialogs/tasks/GitActionsDialog.tsx @@ -125,8 +125,15 @@ export const GitActionsDialog = NiceModal.create( .finally(() => setLoadingBranches(false)); }, [effectiveProjectId]); + useEffect(() => { + if (!modal.visible) { + setGitError(null); + } + }, [modal.visible, attemptId]); + const handleOpenChange = (open: boolean) => { if (!open) { + setGitError(null); modal.hide(); } };