From 41cd6418dd3a28fb22ceb358e36b12a49d32a5c9 Mon Sep 17 00:00:00 2001 From: Guillem Arias Date: Sat, 9 May 2026 13:11:59 +0200 Subject: [PATCH] revert(settings/providers): drop the slim health strip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per-row status pills already carry the at-a-glance signal (connected / action needed) at the scale this app sees (1–4 connections per family). The strip was redundant chrome for almost every user; only worth bringing back if the catalog grows to a point where the row list itself stops fitting on a single screen. - Delete _health_strip.html.erb partial. - Drop @health controller assignment + provider_health_strip helper. - Drop unused settings.providers.health_strip.* locale keys. - concise_time_ago helper stays — still used by per-row meta text. --- .../settings/providers_controller.rb | 2 -- app/helpers/settings_helper.rb | 17 ----------- .../settings/providers/_health_strip.html.erb | 28 ------------------- app/views/settings/providers/show.html.erb | 6 ---- config/locales/views/settings/en.yml | 5 ---- 5 files changed, 58 deletions(-) delete mode 100644 app/views/settings/providers/_health_strip.html.erb diff --git a/app/controllers/settings/providers_controller.rb b/app/controllers/settings/providers_controller.rb index 0d724b9db..159ca3ef5 100644 --- a/app/controllers/settings/providers_controller.rb +++ b/app/controllers/settings/providers_controller.rb @@ -261,8 +261,6 @@ class Settings::ProvidersController < ApplicationController @connected = entries.select { |e| e[:summary][:status] == :ok } @needs_attention = entries.select { |e| [ :warn, :err ].include?(e[:summary][:status]) } @available = entries.select { |e| e[:summary][:status] == :off } - - @health = view_context.provider_health_strip(connected: @connected, needs_attention: @needs_attention) end # Returns a hash mapping provider key → { error:, last_synced_at:, stale: } diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index e450aa8a0..c60552f61 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -128,23 +128,6 @@ module SettingsHelper end end - # Slim health-strip data for the providers index. Pulls counts from the - # already-resolved entry summaries plus the family's distinct synced-account - # count for the trailing stat. Returns a hash consumed by the - # `settings/providers/_health_strip` partial. - def provider_health_strip(connected:, needs_attention:) - active_entries = connected + needs_attention - last_synced_at = active_entries.map { |e| e[:summary][:last_synced_at] }.compact.max - accounts_count = Current.family.accounts.joins(:account_providers).distinct.count - - { - connected: active_entries.size, - needs_attention: needs_attention.size, - accounts_syncing: accounts_count, - last_synced_at: last_synced_at - } - end - # Strips the leading "about " from `time_ago_in_words` so copy reads as # "Synced 6 hours ago" instead of "Synced about 6 hours ago". def concise_time_ago(time) diff --git a/app/views/settings/providers/_health_strip.html.erb b/app/views/settings/providers/_health_strip.html.erb deleted file mode 100644 index 0c5d75dfd..000000000 --- a/app/views/settings/providers/_health_strip.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -<%# locals: (connected:, needs_attention:, accounts_syncing:, last_synced_at:) %> -
- - <%= icon "check", size: "sm", class: "!w-3.5 !h-3.5 text-success" %> - <%= connected %> - <%= t("settings.providers.health_strip.connected") %> - - <% if needs_attention.positive? %> - - - <%= icon "circle-alert", size: "sm", class: "!w-3.5 !h-3.5 text-warning" %> - <%= needs_attention %> - <%= t("settings.providers.health_strip.needs_attention") %> - - <% end %> - <% if accounts_syncing.positive? %> - - - <%= accounts_syncing %> - <%= t("settings.providers.health_strip.accounts_syncing") %> - - <% end %> - <% if last_synced_at %> - - <%= t("settings.providers.health_strip.last_synced", time: concise_time_ago(last_synced_at)) %> - - <% end %> -
diff --git a/app/views/settings/providers/show.html.erb b/app/views/settings/providers/show.html.erb index 2e36ad0a4..d9677b762 100644 --- a/app/views/settings/providers/show.html.erb +++ b/app/views/settings/providers/show.html.erb @@ -32,12 +32,6 @@ <% all_connections = @needs_attention + @connected %> <% if all_connections.any? %> - <%= render "settings/providers/health_strip", - connected: @health[:connected], - needs_attention: @health[:needs_attention], - accounts_syncing: @health[:accounts_syncing], - last_synced_at: @health[:last_synced_at] %> - <%= render "settings/providers/group_heading", title: t("settings.providers.groups.your_connections"), count: all_connections.size %> diff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.yml index 33b0b87fd..8f00616b9 100644 --- a/config/locales/views/settings/en.yml +++ b/config/locales/views/settings/en.yml @@ -204,11 +204,6 @@ en: your_connections: Your connections available: Available empty_available: All available providers are connected. - health_strip: - connected: connected - needs_attention: needs attention - accounts_syncing: accounts syncing - last_synced: Last synced %{time} ago meta: sync_error: Sync error no_recent_sync: Sync overdue