From 83fec3f6d6e5ae9b3b6ec0408861a9281c5baaf0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 25 Dec 2025 00:23:13 -0600 Subject: [PATCH] Invalidate git status after every git action --- src/components/git-sync/steps/SyncStep.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/git-sync/steps/SyncStep.tsx b/src/components/git-sync/steps/SyncStep.tsx index be7c189c..52b2fb48 100644 --- a/src/components/git-sync/steps/SyncStep.tsx +++ b/src/components/git-sync/steps/SyncStep.tsx @@ -79,7 +79,10 @@ export function SyncStep({ projectId, remoteUrl }: SyncStepProps) { setIsSyncing(false); setCurrentOperation(null); } - }, [remoteUrl]); + + // Invalidate git status to refresh UI + queryClient.invalidateQueries({ queryKey: ['git-status', projectId] }); + }, [projectId, queryClient, remoteUrl]); const handleSync = async () => { await executeGitOperation('sync', async () => { @@ -132,9 +135,6 @@ export function SyncStep({ projectId, remoteUrl }: SyncStepProps) { ref, force: true, }); - - // Invalidate git status to refresh UI - queryClient.invalidateQueries({ queryKey: ['git-status', projectId] }); }); };