.vbw-planning/milestones/ui-fixes-and-smart-scraping/phases/05-simplify-source-status/04-PLAN.md
Update all UI components to reflect the new 4-status health model: badge colors, filter dropdowns, interactive actions, and dashboard stats.
Files: app/helpers/source_monitor/health_badge_helper.rb
Replace the 7-status mapping with 4 statuses:
"working" -> { label: "Working", classes: "bg-green-100 text-green-700" }"declining" -> { label: "Declining", classes: "bg-yellow-100 text-yellow-700" }"improving" -> { label: "Improving", classes: "bg-sky-100 text-sky-700" }"failing" -> { label: "Failing", classes: "bg-rose-100 text-rose-700" }Update source_health_actions:
when "critical", "declining" to when "failing", "declining"when "auto_paused" case (auto-pause is now operational, not a health status)when "failing" that includes the reset action alongside fetch/health checkUpdate interactive_health_status?:
%w[critical declining auto_paused] to %w[failing declining]Update the default fallback from "healthy" to "working".
Files: app/views/source_monitor/sources/index.html.erb
Change the health filter options from:
["All Health", ""], ["Healthy", "healthy"], ["Warning", "warning"], ["Declining", "declining"], ["Critical", "critical"]
To:
["All Health", ""], ["Working", "working"], ["Declining", "declining"], ["Improving", "improving"], ["Failing", "failing"]
Files: app/views/source_monitor/dashboard/_stats.html.erb, lib/source_monitor/dashboard/queries/stats_query.rb
In _stats.html.erb, update the health_colors mapping:
"healthy" with "working", keep green"warning" with "improving", use sky/blue"declining" with orange/yellow"critical" with "failing", keep rose/redIn stats_query.rb, update the health_distribution method:
%w[healthy warning declining critical] to %w[working declining improving failing]Files: app/views/source_monitor/sources/_row.html.erb
No changes needed -- the row partial delegates to source_health_badge which is updated in Task 1. However, verify there are no hardcoded status string references in the row partial.