diff --git a/messages/de.json b/messages/de.json index ecf2d8338..ff302577a 100644 --- a/messages/de.json +++ b/messages/de.json @@ -1966,6 +1966,7 @@ "progressAria": "Gesundheitsscore-Fortschritt", "deltaVsLastWeek": "{delta} im Vergleich zur Vorwoche", "deltaUnavailable": "Noch keine Historie — schau nächste Woche wieder vorbei.", + "restModePaused": "Während einer Krankheitsphase pausiert — dein Score wird heute nicht bewertet.", "componentBp": "Blutdruck", "componentWeight": "Gewicht", "componentMood": "Stimmung", diff --git a/messages/en.json b/messages/en.json index 63d8a76e0..5b51a4331 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1966,6 +1966,7 @@ "progressAria": "Health Score progress", "deltaVsLastWeek": "{delta} vs last week", "deltaUnavailable": "No history yet — check back next week.", + "restModePaused": "Paused during illness — your score isn't being judged today.", "componentBp": "BP", "componentWeight": "Weight", "componentMood": "Mood", diff --git a/messages/es.json b/messages/es.json index fe84dfe60..af96478e9 100644 --- a/messages/es.json +++ b/messages/es.json @@ -1966,6 +1966,7 @@ "progressAria": "Progreso de la puntuación de salud", "deltaVsLastWeek": "{delta} respecto a la semana anterior", "deltaUnavailable": "Aún no hay historial — vuelve la semana que viene.", + "restModePaused": "En pausa durante la enfermedad — hoy tu puntuación no se evalúa.", "componentBp": "PA", "componentWeight": "Peso", "componentMood": "Estado de ánimo", diff --git a/messages/fr.json b/messages/fr.json index fd10e6d92..217d9afe0 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -1966,6 +1966,7 @@ "progressAria": "Progression du score de santé", "deltaVsLastWeek": "{delta} par rapport à la semaine précédente", "deltaUnavailable": "Pas encore d’historique — reviens la semaine prochaine.", + "restModePaused": "En pause pendant la maladie — ton score n'est pas évalué aujourd'hui.", "componentBp": "TA", "componentWeight": "Poids", "componentMood": "Humeur", diff --git a/messages/it.json b/messages/it.json index 841d260b7..abb275f53 100644 --- a/messages/it.json +++ b/messages/it.json @@ -1966,6 +1966,7 @@ "progressAria": "Avanzamento del punteggio di salute", "deltaVsLastWeek": "{delta} rispetto alla settimana scorsa", "deltaUnavailable": "Ancora nessuno storico — ripassa la prossima settimana.", + "restModePaused": "In pausa durante la malattia — oggi il tuo punteggio non viene valutato.", "componentBp": "PA", "componentWeight": "Peso", "componentMood": "Umore", diff --git a/messages/pl.json b/messages/pl.json index 29520337d..77c41a83d 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -1966,6 +1966,7 @@ "progressAria": "Postęp wyniku zdrowia", "deltaVsLastWeek": "{delta} w porównaniu z ubiegłym tygodniem", "deltaUnavailable": "Brak historii — zajrzyj w przyszłym tygodniu.", + "restModePaused": "Wstrzymane podczas choroby — Twój wynik nie jest dziś oceniany.", "componentBp": "RR", "componentWeight": "Waga", "componentMood": "Nastrój", diff --git a/src/components/insights/health-score-card.tsx b/src/components/insights/health-score-card.tsx index ee2091d43..985454608 100644 --- a/src/components/insights/health-score-card.tsx +++ b/src/components/insights/health-score-card.tsx @@ -1,7 +1,7 @@ "use client"; import { useId, useMemo, useState } from "react"; -import { ArrowDown, ArrowUp, ChevronDown, Minus } from "lucide-react"; +import { ArrowDown, ArrowUp, ChevronDown, Minus, Moon } from "lucide-react"; import { useTranslations } from "@/lib/i18n/context"; import { cn } from "@/lib/utils"; import { HealthScoreDeltaExplainer } from "./health-score-delta-explainer"; @@ -87,6 +87,15 @@ export interface HealthScoreCardProps { * four-row layout for the common (mood-enabled) case. */ moodEnabled?: boolean; + /** + * v1.18.6 — Rest Mode annotation. When an illness episode is active the + * server suppresses (never penalises) the score; the card itself then + * carries an explicit "paused during illness — not being judged today" + * line so a frozen/held number reads as intentional rather than as a + * silent drop. Value-free: the card only needs to know that it is + * active, not the episode details. Default off (the common case). + */ + restModeActive?: boolean; } type ComponentKey = keyof HealthScoreCardProps["components"]; @@ -174,6 +183,7 @@ export function HealthScoreCard({ onAskCoach: _onAskCoach, initiallyExpanded = false, moodEnabled = true, + restModeActive = false, }: HealthScoreCardProps) { const { t, locale } = useTranslations(); // The asOf timestamps render under the source pill as a tooltip @@ -404,6 +414,21 @@ export function HealthScoreCard({ )}

+ {/* v1.18.6 — Rest Mode legibility. While an illness episode is + active the server suppresses (never penalises) the score, so + the card states plainly that the number is paused and not being + judged today. Without this the held score reads as a silent + decline. */} + {restModeActive && ( +

+

+ )} +