Overview
src/store/slices/healthDashboardStore.ts polls service health but does not automatically respond to degraded states by disabling dependent features. When the streaming API is degraded, the app continues offering streaming courses — they fail after a timeout, showing errors to users. Automatic feature flag adjustment during degradation would hide failing features and show static alternatives gracefully.
Specifications
Features:
- Health check results mapped to feature flags in
degradationStore
- Streaming API degraded → auto-disable streaming, fall back to paginated content
- Payment API degraded → show 'Payments temporarily unavailable' instead of payment form
- Recovery restores features automatically
- Admin can override auto-disable via remote config
Tasks:
- Define
HEALTH_TO_FEATURE_MAP in src/config/degradationConfig.ts
- After each health check cycle, apply feature flags based on service status
- Show user-friendly fallback UI when feature auto-disabled
- On service recovery, re-enable feature flag
- Add unit test for degradation → disable → recovery → re-enable cycle
Impacted Files:
src/store/slices/healthDashboardStore.ts
src/store/slices/degradationStore.ts
src/config/degradationConfig.ts (create)
Acceptance Criteria
- Streaming API health check failure disables streaming feature flag
- User sees static content fallback during streaming degradation
- Recovery enables streaming feature within 60 seconds
- Unit test covers full degradation → fallback → recovery cycle
Overview
src/store/slices/healthDashboardStore.tspolls service health but does not automatically respond to degraded states by disabling dependent features. When the streaming API is degraded, the app continues offering streaming courses — they fail after a timeout, showing errors to users. Automatic feature flag adjustment during degradation would hide failing features and show static alternatives gracefully.Specifications
Features:
degradationStoreTasks:
HEALTH_TO_FEATURE_MAPinsrc/config/degradationConfig.tsImpacted Files:
src/store/slices/healthDashboardStore.tssrc/store/slices/degradationStore.tssrc/config/degradationConfig.ts(create)Acceptance Criteria