mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix(frontend): invalidate provider caches on remote resync
This commit is contained in:
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'] })
|
||||
})
|
||||
|
||||
@@ -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))]
|
||||
|
||||
Reference in new issue
Block a user