From d8fe214da54d2495b433cd3c1e6a17e52106eda3 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Fri, 17 Jul 2026 06:59:29 +0000 Subject: [PATCH] fix(dashboard): hard-disable the Central feed_source option (retired backend) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Central's NATS broker is gone and its database was dropped 2026-07-15, but the per-adapter Native/Central toggle on the Environment page still let an operator pick "central" for 11 of 12 adapters and have it save successfully (config.py's validator still accepts central|native; env/store.py's gate just silently skips registration when feed_source != "native"). The result: flip the switch, save cleanly, feed dies with no error anywhere. This is a minimal stopgap, not the real fix. A separate refactor will strip feed_source/hasCentral/nativeOnly and the whole toggle out once Central's removal is complete; that's out of scope here and backend behavior (config validator, store gate) is intentionally untouched so existing YAML with feed_source: central doesn't break. For now: hard-disable the Central button in FeedSourceToggle regardless of hasCentral/nativeOnly (kept referenced, not deleted, for the pending refactor), and make the accompanying copy tell the truth — "Central feed source has been retired — native only" — instead of the old adapter-scoped "not available for this adapter" text that no longer describes what's happening. Verified: GaugeSites.tsx only reads usgs.feed_source to gate its lookup button, never writes it — not a second instance of this trap. tsc --noEmit and the pytest suite show zero new failures vs. pre-edit baseline. Co-Authored-By: Claude Opus 4.8 (1M context) --- work/dashboard-frontend/src/pages/Environment.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/work/dashboard-frontend/src/pages/Environment.tsx b/work/dashboard-frontend/src/pages/Environment.tsx index a9f6a4e..eebe5fc 100644 --- a/work/dashboard-frontend/src/pages/Environment.tsx +++ b/work/dashboard-frontend/src/pages/Environment.tsx @@ -188,7 +188,7 @@ function FeedSourceToggle({ value, onChange, disabled, centralDisabled }: { @@ -208,7 +208,13 @@ function AdapterPanel({ title, subtitle, enabled, onEnabled, feedSource, onFeedS /** Called when user toggles include_in_llm_context */ onLlmContext?: (v: boolean) => void }) { - const centralDisabled = nativeOnly || !hasCentral + // The Central service was retired 2026-07-15 (NATS broker gone, DB dropped) — there is + // nothing left to serve a "central" feed_source for ANY adapter, so the button is + // hard-disabled here regardless of `hasCentral`/`nativeOnly`. Those two stay wired in + // (rather than deleted) because the full removal of feed_source/hasCentral/nativeOnly and + // this whole toggle is a separate, larger refactor still pending; this is just the stopgap + // that keeps operators from picking a feed source that silently stops working. + const centralDisabled = true || nativeOnly || !hasCentral return (
@@ -240,8 +246,8 @@ function AdapterPanel({ title, subtitle, enabled, onEnabled, feedSource, onFeedS API key required — set it in the field below
)} - {nativeOnly && ( -
Central not available for this adapter — native only
+ {centralDisabled && ( +
Central feed source has been retired — native only
)}
{children}