feat:HealthDashboard service checks timeout silently#730
Merged
RUKAYAT-CODER merged 1 commit intoJun 28, 2026
Merged
Conversation
|
@favour-GL Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for contributing to the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Health observability, circuit protection, coverage gates, and dependency scanning
timeout distinction
circuit breaker
coverage gates
dependabot
4 issues
Summary
Four infrastructure issues bundled together — all touch the reliability and observability layer without affecting product features. The health dashboard now distinguishes timeouts from errors, a circuit breaker prevents load amplification during outages, CI enforces a 50% coverage floor, and Dependabot keeps dependencies patched automatically.
Changes by issue
#1
Timeout status distinction in health dashboard
Health checks that exceed their timeout budget now report timeout (orange) instead of unknown. Three consecutive timeouts escalate to degraded (red). unknown is reserved for services whose check has never run.
NEW
src/types/serviceHealth.ts
MOD
src/store/slices/healthDashboardStore.ts
NEW
src/components/mobile/ServiceStatusBadge.tsx
NEW
src/components/mobile/ServiceHealthPanel.tsx
#2
Circuit breaker per API endpoint group
Implements CircuitBreaker and a singleton registry. Five failures within 60 s opens the circuit; subsequent calls fast-fail with CircuitOpenError without a network round-trip. A 30 s recovery window triggers a single probe; success closes the circuit. State is exposed in the dashboard.
NEW
src/services/api/circuitBreaker.ts
NEW
src/services/api/axiosCircuitBreakerInterceptor.ts
MOD
src/store/slices/healthDashboardStore.ts
#3
CI coverage thresholds (50% floor)
Adds coverageThreshold to jest.config.ts at 50% for branches, functions, lines, and statements. CI runs jest --coverage, uploads the report as an artifact, and fails the build if any threshold is missed. Removes --passWithNoTests.
MOD
jest.config.ts
MOD
.github/workflows/test.yml
MOD
.gitignore
#4
Dependabot — automated dependency scanning
Adds .github/dependabot.yml with weekly npm scans, grouped minor/patch updates to reduce PR noise, a limit of 10 open PRs, and auto-labeling with dependencies / security. Security PRs fire within 24 h of CVE disclosure.
NEW
.github/dependabot.yml
MOD
.github/CODEOWNERS
Acceptance criteria
Timed-out health check shows "Timeout" in orange; never shown as "Unknown"
3 consecutive timeouts escalate the service row to "Degraded" in red
"Unknown" only appears for services whose check has not run yet
5 failures in 60 s opens the circuit for that endpoint group — no further network calls during OPEN state
Recovery probe fires after 30 s; success closes the circuit, failure re-opens it
Circuit state is visible per-service in the health dashboard
PR with new code and 0% coverage fails CI
Coverage report uploaded as CI artifact on every PR
Dependabot PRs created weekly; security PRs within 24 h of CVE disclosure
Minor/patch updates batched into a single weekly PR per ecosystem
Test coverage added
src/tests/healthDashboard.test.ts
Status is "unknown" before any check runs
Successful check → "ok"
AbortError → "timeout"; non-abort error → "error"
consecutiveTimeouts increments; resets after success
3 consecutive timeouts → "degraded"
CLOSED → OPEN after 5 failures / 60 s
OPEN state throws CircuitOpenError immediately
OPEN → HALF_OPEN → CLOSED (probe success)
OPEN → HALF_OPEN → OPEN (probe failure)
State-change listeners fire on every transition
Registry returns the same instance per key
Migration notes
axios.config.ts — call installCircuitBreakerInterceptor(apiClient) once at the bottom of the file, after existing interceptors.
HealthDashboard — drop into the component wherever service rows should appear. The ServiceHealthStatus type import moves from healthDashboardStore to src/types/serviceHealth.
No breaking changes to existing store selectors or API surface — all additions are additive.
Closes #644
Closes #645
Closes #646
Closes #647