- 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.
This commit is contained in:
Alex Netsch
2025-10-28 16:13:10 +00:00
committed by GitHub
parent 6bf7f494f3
commit 18cf12c295

View File

@@ -125,8 +125,15 @@ export const GitActionsDialog = NiceModal.create<GitActionsDialogProps>(
.finally(() => setLoadingBranches(false)); .finally(() => setLoadingBranches(false));
}, [effectiveProjectId]); }, [effectiveProjectId]);
useEffect(() => {
if (!modal.visible) {
setGitError(null);
}
}, [modal.visible, attemptId]);
const handleOpenChange = (open: boolean) => { const handleOpenChange = (open: boolean) => {
if (!open) { if (!open) {
setGitError(null);
modal.hide(); modal.hide();
} }
}; };