diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx index 22cc6c6..b26772e 100644 --- a/client/src/pages/Home.tsx +++ b/client/src/pages/Home.tsx @@ -1057,6 +1057,7 @@ export default function HomePage() { // behavior. staleTime: tab === 'recent' ? 0 : (isOnline ? 0 : 30000), refetchOnWindowFocus: tab === 'recent', + refetchOnMount: tab === 'recent' ? 'always' : undefined, }); useEffect(() => { @@ -1156,6 +1157,11 @@ export default function HomePage() { clearAll(); clearSelection(); setDelegationOnly(false); + // Force a background refresh of the Recent tab the moment it is selected, + // so a task viewed on another page appears at the top right away. + if (newTab === 'recent') { + queryClient.refetchQueries({ queryKey: ['home', 'recent'], type: 'all' }); + } } const toggleTask = useCallback((taskId: number) => {