From 84706196ddff91968e2a1bcfb65e294ef95e7ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 31 Jul 2026 21:17:01 +0200 Subject: [PATCH] Let the score settings announce a save the way every other surface does The new page wrote its own success toast. The outcome module owns that affordance so a saved thing looks the same everywhere, and a structural check catches anyone reaching around it. That check offers an allowlist entry as a way out; taking it would have left two places deciding what a success looks like, which is the thing the module exists to prevent. --- src/components/settings/score-section.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/settings/score-section.tsx b/src/components/settings/score-section.tsx index f89c37ea2..99334a8f5 100644 --- a/src/components/settings/score-section.tsx +++ b/src/components/settings/score-section.tsx @@ -43,6 +43,8 @@ import { useMemo, useState } from "react"; import Link from "next/link"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { toast } from "sonner"; + +import { toastWrittenOutcome } from "@/components/outcome/outcome-toast"; import { Gauge, Loader2 } from "lucide-react"; import { Button } from "@/components/ui/button"; @@ -206,7 +208,7 @@ export function ScoreSection() { queryKey: queryKeys.dashboardSnapshot(), }); void queryClient.invalidateQueries({ queryKey: queryKeys.dailyDigest() }); - toast.success(t("settings.sections.score.saved")); + toastWrittenOutcome("success", t("settings.sections.score.saved")); }, onError: (err) => { if (isConflict(err)) {