Skip to content

fix(dashboard): stop automatic health polling - #331

Merged
outof-place merged 1 commit into
mainfrom
codex/health-polling-performance
Aug 20, 2026
Merged

fix(dashboard): stop automatic health polling#331
outof-place merged 1 commit into
mainfrom
codex/health-polling-performance

Conversation

@outof-place

@outof-place outof-place commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the Health screen out of the global polling loop, including when Live was persisted
  • hide the Live control on Health so the UI matches the safe behavior
  • deduplicate manual scans and recover the button after fresh data or a 15-second timeout

Why

One visible Health tab with Live enabled triggered a full provider fan-out every 5 seconds. Overlapping refreshes could consume requests without committing fresh UI data and leave Scanning stuck.

Verification

  • dashboard typecheck
  • full dashboard test suite
  • focused Health and cockpit polling tests: 16/16
  • GitHub CI: passed
  • CodeRabbit: no actionable comments, minimal merge risk
  • production Chrome: no Live control, timestamp stable while idle, manual scan disables then recovers and updates data
  • production logs: exactly one Health request per page load/manual scan and no 5-second loop
  • dashboard and worker runtime error logs: empty

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-workflow-app-dashboard Ready Ready Preview Aug 20, 2026 8:27pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 62ef36fc-33e5-4d5f-876d-d6d899a0fc33

📥 Commits

Reviewing files that changed from the base of the PR and between 0b41be7 and 4c8cad2.

📒 Files selected for processing (5)
  • apps/dashboard/app/(cockpit)/cockpit-shell.test.tsx
  • apps/dashboard/app/(cockpit)/cockpit-shell.tsx
  • apps/dashboard/components/cockpit/mobile/mobile-header.tsx
  • apps/dashboard/components/cockpit/screens/health.test.tsx
  • apps/dashboard/components/cockpit/screens/health.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The health screen now disables global live polling and hides live-poll controls. Its scan action prevents duplicate requests, reflects scanning state, clears after fresh data, and resets after a 15-second timeout.

Changes

Health screen controls

Layer / File(s) Summary
Health-screen polling isolation
apps/dashboard/app/(cockpit)/cockpit-shell.tsx, apps/dashboard/components/cockpit/mobile/mobile-header.tsx, apps/dashboard/app/(cockpit)/cockpit-shell.test.tsx
The health screen disables polling and hides live-poll controls on mobile and desktop. Integration coverage verifies persisted polling does not refresh the screen.
Health scan refresh state
apps/dashboard/components/cockpit/screens/health.tsx, apps/dashboard/components/cockpit/screens/health.test.tsx
The scan action blocks duplicate requests, tracks fresh health data, and resets stalled scans after 15 seconds. Tests cover each state transition.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 4c8ca

The change disables automatic Health polling, hides the Live control there, and improves manual scan handling; no actionable merge-blocking risk remains after normal checks and review.

Poem

I’m a rabbit watching scans go round,
No stray live polls disturb the ground.
One click digs, then waits with care,
Fresh health data clears the hare.
Fifteen ticks restore the way.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: disabling automatic polling on the dashboard Health screen.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@outof-place

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@outof-place
outof-place merged commit 7439767 into main Aug 20, 2026
7 checks passed
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