- 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:
@@ -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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user