feat(settings): retire /settings/bank_sync; merge into providers page

- Delete Settings::BankSyncController and its views (the providers page is
  now a strict superset of what bank_sync offered)
- Add permanent 301 redirect: GET /settings/bank_sync → /settings/providers
- Collapse nav to a single "Bank Sync" entry pointing at /settings/providers;
  remove the duplicate admin-only "Providers" entry from the Advanced section
- Remove "Providers" from SETTINGS_ORDER; point "Bank Sync" at
  settings_providers_path for next/prev navigation
- Rename page title to "Bank Sync"; replace admin-credential lede with
  user-facing copy ("Connect external accounts…")
- Update breadcrumb: Home → Bank sync
- Add controller test asserting 301 status and Location header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Juan José Mata
2026-05-08 21:36:41 +00:00
parent 4623bc3653
commit 2b59dd64c8
6 changed files with 8 additions and 105 deletions

View File

@@ -1,43 +0,0 @@
class Settings::BankSyncController < ApplicationController
layout "settings"
def show
@providers = [
{
name: "Lunch Flow",
description: "US, Canada, UK, EU, Brazil and Asia through multiple open banking providers.",
path: "https://lunchflow.app/features/sure-integration?atp=BiDIYS",
target: "_blank",
rel: "noopener noreferrer"
},
{
name: "Plaid",
description: "US & Canada bank connections with transactions, investments, and liabilities.",
path: "https://github.com/we-promise/sure/blob/main/docs/hosting/plaid.md",
target: "_blank",
rel: "noopener noreferrer"
},
{
name: "SimpleFIN",
description: "US & Canada connections via SimpleFIN protocol.",
path: "https://beta-bridge.simplefin.org",
target: "_blank",
rel: "noopener noreferrer"
},
{
name: "Enable Banking (beta)",
description: "European bank connections via open banking APIs across multiple countries.",
path: "https://enablebanking.com",
target: "_blank",
rel: "noopener noreferrer"
},
{
name: "Sophtron (alpha)",
description: "US & Canada bank, credit card, investment, loan, insurance, utility, and other connections.",
path: "https://www.sophtron.com/",
target: "_blank",
rel: "noopener noreferrer"
}
]
end
end

View File

@@ -4,7 +4,7 @@ nav_sections = [
header: t(".general_section_title"),
items: [
{ label: t(".accounts_label"), path: accounts_path, icon: "layers" },
{ label: t(".bank_sync_label"), path: settings_bank_sync_path, icon: "banknote" },
{ label: t(".bank_sync_label"), path: settings_providers_path, icon: "banknote" },
{ label: t(".preferences_label"), path: settings_preferences_path, icon: "bolt" },
{ label: t(".appearance_label"), path: settings_appearance_path, icon: "palette" },
{ label: t(".profile_label"), path: settings_profile_path, icon: "circle-user" },
@@ -30,7 +30,6 @@ nav_sections = [
{ label: "LLM Usage", path: settings_llm_usage_path, icon: "activity" },
{ label: t(".api_keys_label"), path: settings_api_key_path, icon: "key" },
{ label: t(".self_hosting_label"), path: settings_hosting_path, icon: "database", if: self_hosted? },
{ label: "Providers", path: settings_providers_path, icon: "plug" },
{ label: t(".imports_label"), path: imports_path, icon: "download" },
{ label: t(".exports_label"), path: family_exports_path, icon: "upload" },
{ label: "SSO Providers", path: admin_sso_providers_path, icon: "key-round", if: Current.user&.super_admin? },

View File

@@ -1,33 +0,0 @@
<%# locals: (provider_link:) %>
<%# Assign distinct colors to each provider %>
<% provider_colors = {
"Lunch Flow" => "#6471eb",
"Plaid" => "#4da568",
"SimpleFin" => "#e99537",
"Enable Banking" => "#6471eb",
"CoinStats" => "#FF9332", # https://coinstats.app/press-kit/
"Sophtron" => "#1E90FF"
} %>
<% provider_color = provider_colors[provider_link[:name]] || "#6B7280" %>
<%= link_to provider_link[:path],
target: provider_link[:target],
rel: provider_link[:rel],
class: "flex justify-between items-center p-4 bg-container hover:bg-container-hover transition-colors" do %>
<div class="flex w-full items-center gap-2.5">
<%= render partial: "shared/color_avatar", locals: { name: provider_link[:name], color: provider_color } %>
<div class="flex flex-col">
<p class="text-primary text-sm font-medium">
<%= provider_link[:name] %>
</p>
<p class="text-secondary text-xs">
<%= provider_link[:description] %>
</p>
</div>
</div>
<div class="justify-self-end">
<%= icon("arrow-right", size: "sm", class: "text-secondary") %>
</div>
<% end %>

View File

@@ -1,26 +0,0 @@
<%= content_for :page_title, "Bank Sync" %>
<div class="bg-container rounded-xl shadow-border-xs p-4">
<% if @providers.any? %>
<div class="rounded-xl bg-container-inset space-y-1 p-1">
<div class="flex items-center gap-1.5 px-4 py-2 text-xs font-medium text-secondary uppercase">
<p>PROVIDERS</p>
<span class="text-subdued">&middot;</span>
<p><%= @providers.count %></p>
</div>
<div class="bg-container rounded-lg shadow-border-xs">
<div class="overflow-hidden rounded-lg">
<%= render partial: "provider_link", collection: @providers, spacer_template: "shared/ruler" %>
</div>
</div>
</div>
<% else %>
<div class="flex justify-center items-center py-20">
<div class="text-center flex flex-col items-center max-w-[300px]">
<p class="text-primary mb-1 font-medium text-sm">No providers configured</p>
<p class="text-secondary text-sm">Configure providers to link your bank accounts.</p>
</div>
</div>
<% end %>
</div>

View File

@@ -8,6 +8,12 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTest
Provider::Factory.ensure_adapters_loaded
end
test "GET /settings/bank_sync redirects permanently to /settings/providers" do
get "/settings/bank_sync"
assert_redirected_to "/settings/providers"
assert_equal 301, response.status
end
test "can access when self hosting is disabled (managed mode)" do
Rails.configuration.stubs(:app_mode).returns("managed".inquiry)
get settings_providers_url

View File

@@ -7,7 +7,7 @@ class SettingsTest < ApplicationSystemTestCase
# Base settings available to all users
@settings_links = [
[ "Accounts", accounts_path ],
[ "Bank Sync", settings_bank_sync_path ],
[ "Bank Sync", settings_providers_path ],
[ "Preferences", settings_preferences_path ],
[ "Profile Info", settings_profile_path ],
[ "Security", settings_security_path ],