fix(frontend): invalidate provider caches on remote resync

This commit is contained in:
Wesley Tanner committed 2026-10-30 07:14:45 -05:00
1 parent cb7d073af0
commit ca26875ea3
2 files changed
+2 -1

No files matched your search

@@ -3027,6 +3027,7 @@ describe('EventProvider permissions and forms', () => {
await waitFor(() => {
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'commands', 'srv_remote'] })
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'agents', 'srv_remote'] })
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['provider-integrations'] })
})
expect(invalidateQueries).not.toHaveBeenCalledWith({ queryKey: ['opencode', 'commands'] })
})
+1 -1
View File
@@ -1252,6 +1252,7 @@ export function EventProvider({ children }: { children: React.ReactNode }) {
const handleResync = (subscribedDirectories: string[], serverId?: string) => {
queryClient.invalidateQueries({ queryKey: [SESSION_GOAL_QUERY_ROOT] })
invalidateProviderCachesDebounced(queryClient)
if (serverId && !isLocalOpenCodeServer(serverId)) {
void reconcileRemoteDirectoryActivity(serverId, subscribedDirectories)
invalidateSessionListCachesDebounced(queryClient, undefined, serverId)
@@ -1267,7 +1268,6 @@ export function EventProvider({ children }: { children: React.ReactNode }) {
void syncRunningShells(directories)
invalidateChildSessionCaches(queryClient)
invalidateQueryKeysDebounced(queryClient, LOCATION_CATALOG_QUERY_KEYS)
invalidateProviderCachesDebounced(queryClient)
}
const initialDirectories = [...new Set((reposRef.current ?? []).map(r => r.fullPath))]