fix: keep config references on save and apply review batch 2 fixes (OM-179)

This commit is contained in:
Chris Scott committed 2026-11-02 23:21:33 -05:00
1 parent 49bb4ebd36
commit 8a6fd56e9a
17 files changed
+524 -60

No files matched your search

@@ -1230,6 +1230,7 @@ describe('EventProvider permissions and forms', () => {
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'agents'] })
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'skills'] })
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'providers'] })
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode-config', 'managed'] })
})
})
@@ -3109,6 +3110,7 @@ describe('EventProvider permissions and forms', () => {
expect(invalidateQueries).toHaveBeenCalledWith({ queryKey: ['opencode', 'agents', 'srv_remote'] })
})
expect(invalidateQueries).not.toHaveBeenCalledWith({ queryKey: ['opencode', 'commands'] })
expect(invalidateQueries).not.toHaveBeenCalledWith({ queryKey: ['opencode-config', 'managed'] })
})
it('reconciles only linked directories with active work on a remote resync', async () => {
+5 -1
View File
@@ -42,6 +42,7 @@ import {
invalidateQueryKeysDebounced,
invalidateRepoGitCachesDebounced,
invalidateSessionListCachesDebounced,
OPEN_CODE_MANAGED_CONFIG_QUERY_KEY,
} from '@/lib/queryInvalidation'
const STATUS_POLL_INTERVAL_MS = 5000
@@ -1273,7 +1274,10 @@ export function EventProvider({ children }: { children: React.ReactNode }) {
void fetchInitialSessionStatuses()
void syncRunningShells(directories)
invalidateChildSessionCaches(queryClient)
invalidateQueryKeysDebounced(queryClient, LOCATION_CATALOG_QUERY_KEYS)
invalidateQueryKeysDebounced(queryClient, [
...LOCATION_CATALOG_QUERY_KEYS,
OPEN_CODE_MANAGED_CONFIG_QUERY_KEY,
])
}
const initialDirectories = [...new Set((reposRef.current ?? []).map(r => r.fullPath))]