Skip to content

fix(dashboard): add 90s auto-refresh to overview page - #1

Open
HubKey76 wants to merge 1 commit into
mainfrom
fix/dashboard-heartbeat-polling
Open

HubKey76 wants to merge 1 commit into
mainfrom
fix/dashboard-heartbeat-polling

Conversation

@HubKey76

Copy link
Copy Markdown
Owner

What

Adds an AutoRefresh client component that calls router.refresh() every 90 seconds on the dashboard overview page.

Why

AgentStatusGrid is a pure display component receiving server-fetched heartbeat props. The overview page is a Next.js server component with force-dynamic — it fetches fresh data on every page request but has no client-side refresh mechanism. Rosie's browser froze on the heartbeat timestamps from page-load until manual reload. This caused repeated false "stale agent" alerts every 4+ hours.

Evidence

  • auto-refresh.tsx: 17 lines, zero new dependencies — uses useRouter from next/navigation
  • page.tsx diff: +2 lines (import + <AutoRefresh />)
  • tsc: clean

Edge cases

  • Component renders null — no visual impact
  • clearInterval in cleanup prevents leak on unmount/navigation
  • 90s interval: fast enough to catch 4h cron heartbeats within 2 refreshes; light on server load

Reviewer ask

Approve and merge to main. Mike to confirm no concerns with the 90s interval.

🤖 Generated with Claude Code

AgentStatusGrid was a pure display component with no client-side refresh —
heartbeat data froze at page-load time until browser was manually reloaded.
AutoRefresh mounts in the overview page and calls router.refresh() every 90s,
keeping heartbeat timestamps current without requiring a user action.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@HubKey76
HubKey76 force-pushed the fix/dashboard-heartbeat-polling branch from 4b15008 to fe6b193 Compare July 29, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant