@@ -17,6 +17,7 @@ import { type RunSourceFilter, RunSourceToolbar } from '~/components/RunSourceTo
1717import { TargetsTab } from '~/components/TargetsTab' ;
1818import {
1919 projectCompareOptions ,
20+ remoteStatusOptions ,
2021 syncRemoteResultsApi ,
2122 useEvalRuns ,
2223 useInfiniteProjectRunList ,
@@ -150,18 +151,21 @@ function ProjectRunsTab({
150151 setSyncFeedback ( null ) ;
151152 try {
152153 const result = await syncRemoteResultsApi ( projectId ) ;
154+ queryClient . setQueryData ( remoteStatusOptions ( projectId ) . queryKey , result ) ;
153155 const feedback = buildProjectSyncFeedback ( result ) ;
154156 setSyncFeedback ( feedback ) ;
155- await Promise . all ( [
157+ void Promise . all ( [
156158 queryClient . invalidateQueries ( { queryKey : [ 'projects' , projectId , 'runs' ] } ) ,
157159 queryClient . invalidateQueries ( { queryKey : [ 'projects' , projectId , 'experiments' ] } ) ,
158160 queryClient . invalidateQueries ( { queryKey : [ 'projects' , projectId , 'compare' ] } ) ,
159161 queryClient . invalidateQueries ( { queryKey : [ 'projects' , projectId , 'targets' ] } ) ,
160162 queryClient . invalidateQueries ( { queryKey : [ 'remote-status' , projectId ] } ) ,
161- ] ) ;
163+ ] ) . catch ( ( ) => undefined ) ;
162164 } catch ( err ) {
163165 setSyncFeedback ( buildProjectSyncErrorFeedback ( err , remoteStatus ) ) ;
164- await queryClient . invalidateQueries ( { queryKey : [ 'remote-status' , projectId ] } ) ;
166+ void queryClient
167+ . invalidateQueries ( { queryKey : [ 'remote-status' , projectId ] } )
168+ . catch ( ( ) => undefined ) ;
165169 } finally {
166170 setSyncInFlight ( false ) ;
167171 }
0 commit comments