Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dashboard/src/app/(dashboard)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { LiveActivity } from '@/components/overview/live-activity';
import { SystemHealth } from '@/components/overview/system-health';
import { MetricCards } from '@/components/overview/metric-cards';
import { AgentStatusGrid } from '@/components/overview/agent-status-grid';
import { AutoRefresh } from '@/components/overview/auto-refresh';

export const dynamic = 'force-dynamic';

Expand Down Expand Up @@ -67,6 +68,7 @@ export default async function OverviewPage({

return (
<div className="space-y-6">
<AutoRefresh />
{/* Header */}
<div className="flex items-center justify-between">
<div>
Expand Down
17 changes: 17 additions & 0 deletions dashboard/src/components/overview/auto-refresh.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use client';

import { useEffect } from 'react';
import { useRouter } from 'next/navigation';

const REFRESH_INTERVAL_MS = 90_000; // 90s — fast enough to catch cron heartbeats, light on server

export function AutoRefresh() {
const router = useRouter();

useEffect(() => {
const id = setInterval(() => router.refresh(), REFRESH_INTERVAL_MS);
return () => clearInterval(id);
}, [router]);

return null;
}