From a45dde2039ceff440c18b4417aaa14d47cc2843e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 14 Aug 2026 01:56:25 +0200 Subject: [PATCH] Retire the guardian toggle over a pref nothing reads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The evidence disclosure stopped honouring showEvidenceByDefault in v1.4.27 and the owner surface retired the control with it — but the managed-record coach form still offered the switch, silently governing nothing. Remove the control, the managed-schema pick, the response field, and the label in all six locales; the strict schema now refuses the key outright. --- messages/de.json | 1 - messages/en.json | 1 - messages/es.json | 1 - messages/fr.json | 1 - messages/it.json | 1 - messages/pl.json | 1 - .../record-settings-configuration.test.ts | 19 ++++++++++++++++++- src/app/api/record-settings/[family]/route.ts | 2 -- .../managed-record-settings-section.tsx | 7 ------- src/lib/record-settings/configuration.ts | 1 - 10 files changed, 18 insertions(+), 17 deletions(-) diff --git a/messages/de.json b/messages/de.json index fc5edef42..f04f2afba 100644 --- a/messages/de.json +++ b/messages/de.json @@ -4719,7 +4719,6 @@ "last30days": "Letzte 30 Tage", "last90days": "Letzte 90 Tage", "allTime": "Gesamter Zeitraum", - "showEvidence": "Evidenz standardmäßig anzeigen", "excludedMetrics": "Ausgeschlossene Messwerte", "dataClusters": "Datenbereiche", "customClusters": "Eigene Auswahl von Datenbereichen verwenden", diff --git a/messages/en.json b/messages/en.json index 8bad5393c..ce5b28d1b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -4719,7 +4719,6 @@ "last30days": "Last 30 days", "last90days": "Last 90 days", "allTime": "All time", - "showEvidence": "Show evidence by default", "excludedMetrics": "Excluded metrics", "dataClusters": "Data clusters", "customClusters": "Use a custom cluster selection", diff --git a/messages/es.json b/messages/es.json index 6c18fafdc..2aca2bcad 100644 --- a/messages/es.json +++ b/messages/es.json @@ -4719,7 +4719,6 @@ "last30days": "Últimos 30 días", "last90days": "Últimos 90 días", "allTime": "Todo el tiempo", - "showEvidence": "Mostrar evidencia de forma predeterminada", "excludedMetrics": "Métricas excluidas", "dataClusters": "Grupos de datos", "customClusters": "Usar una selección personalizada de grupos", diff --git a/messages/fr.json b/messages/fr.json index fad6b48b2..5022654d2 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -4719,7 +4719,6 @@ "last30days": "30 derniers jours", "last90days": "90 derniers jours", "allTime": "Depuis toujours", - "showEvidence": "Afficher les sources par défaut", "excludedMetrics": "Mesures exclues", "dataClusters": "Groupes de données", "customClusters": "Utiliser une sélection personnalisée de groupes", diff --git a/messages/it.json b/messages/it.json index f8838c6a0..7449aeba6 100644 --- a/messages/it.json +++ b/messages/it.json @@ -4719,7 +4719,6 @@ "last30days": "Ultimi 30 giorni", "last90days": "Ultimi 90 giorni", "allTime": "Tutto il periodo", - "showEvidence": "Mostra le fonti per impostazione predefinita", "excludedMetrics": "Metriche escluse", "dataClusters": "Gruppi di dati", "customClusters": "Usa una selezione personalizzata di gruppi", diff --git a/messages/pl.json b/messages/pl.json index e4020cde3..5a9e73f54 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -4719,7 +4719,6 @@ "last30days": "Ostatnie 30 dni", "last90days": "Ostatnie 90 dni", "allTime": "Cały okres", - "showEvidence": "Domyślnie pokazuj źródła", "excludedMetrics": "Wykluczone metryki", "dataClusters": "Grupy danych", "customClusters": "Użyj własnego wyboru grup", diff --git a/src/__tests__/record-settings-configuration.test.ts b/src/__tests__/record-settings-configuration.test.ts index f967fa668..a881aaabf 100644 --- a/src/__tests__/record-settings-configuration.test.ts +++ b/src/__tests__/record-settings-configuration.test.ts @@ -82,7 +82,6 @@ describe("managed record settings configuration contract", () => { tone: "warm", verbosity: "default", excludeMetrics: [], - showEvidenceByDefault: false, defaultWindow: "allTime", }, }, @@ -100,6 +99,24 @@ describe("managed record settings configuration contract", () => { expect(() => parseManagedRecordSettingsPatch(family, patch)).not.toThrow(); }); + // Watched red: re-adding `showEvidenceByDefault: true` to the managed + // coach pick makes the strict schema accept the key again and this + // fails. The evidence disclosure stopped honouring the flag in v1.4.27 + // (F14); a guardian toggle over a pref nothing reads is a dead control. + it("refuses the retired showEvidenceByDefault pref", () => { + expect(() => + parseManagedRecordSettingsPatch("coach", { + preferences: { + tone: "warm", + verbosity: "default", + excludeMetrics: [], + defaultWindow: "allTime", + showEvidenceByDefault: true, + }, + }), + ).toThrow(); + }); + it("uses the complete canonical module inventory for a fresh record", () => { expect(Object.keys(MANAGED_RECORD_SETTINGS_MODULE_DEFAULTS)).toEqual( WRITABLE_MODULE_KEYS, diff --git a/src/app/api/record-settings/[family]/route.ts b/src/app/api/record-settings/[family]/route.ts index 16399acc1..c18bf3919 100644 --- a/src/app/api/record-settings/[family]/route.ts +++ b/src/app/api/record-settings/[family]/route.ts @@ -139,7 +139,6 @@ export const GET = apiHandler( tone: preferences.tone, verbosity: preferences.verbosity, excludeMetrics: preferences.excludeMetrics, - showEvidenceByDefault: preferences.showEvidenceByDefault, defaultWindow: preferences.defaultWindow, ...(preferences.dataClusters !== undefined ? { dataClusters: preferences.dataClusters } @@ -344,7 +343,6 @@ export const PATCH = apiHandler( tone: preferences.tone, verbosity: preferences.verbosity, excludeMetrics: preferences.excludeMetrics, - showEvidenceByDefault: preferences.showEvidenceByDefault, defaultWindow: preferences.defaultWindow, ...(preferences.dataClusters !== undefined ? { dataClusters: preferences.dataClusters } diff --git a/src/components/settings/managed-record-settings-section.tsx b/src/components/settings/managed-record-settings-section.tsx index be5bcdfa4..83c221803 100644 --- a/src/components/settings/managed-record-settings-section.tsx +++ b/src/components/settings/managed-record-settings-section.tsx @@ -734,7 +734,6 @@ function CoachSettingsForm({ excludeMetrics: COACH_EXCLUDE_METRICS.filter( (metric) => form.get(`exclude-${metric}`) === "on", ), - showEvidenceByDefault: form.get("showEvidenceByDefault") === "on", defaultWindow: asString(form.get("defaultWindow"), "allTime"), ...(form.get("useCustomClusters") === "on" ? { @@ -817,12 +816,6 @@ function CoachSettingsForm({ -
{t("settings.sharedRecord.managedSettings.coach.excludedMetrics")} diff --git a/src/lib/record-settings/configuration.ts b/src/lib/record-settings/configuration.ts index db950e695..d7d2507b2 100644 --- a/src/lib/record-settings/configuration.ts +++ b/src/lib/record-settings/configuration.ts @@ -124,7 +124,6 @@ const managedCoachPreferencesSchema = coachPrefsSchema tone: true, verbosity: true, excludeMetrics: true, - showEvidenceByDefault: true, defaultWindow: true, dataClusters: true, })