From ef1fbb83968230ed6bba4fd5026af8939f472e84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?=
Date: Thu, 18 Jun 2026 19:11:58 +0200
Subject: [PATCH] feat(insights): state Rest Mode on the health-score card
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
During an active illness episode the server suppresses (never penalises)
the health score, but the card gave no sign of it, so a held number read
as a silent decline. The card now carries an explicit 'paused during
illness — not being judged today' line when Rest Mode is active, driven
from the value-free annotation already on the analytics payload. Adds
insights.healthScore.restModePaused across all six locales.
---
messages/de.json | 1 +
messages/en.json | 1 +
messages/es.json | 1 +
messages/fr.json | 1 +
messages/it.json | 1 +
messages/pl.json | 1 +
src/components/insights/health-score-card.tsx | 27 ++++++++++++++++++-
src/components/insights/hero-strip.tsx | 7 +++++
8 files changed, 39 insertions(+), 1 deletion(-)
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 && (
+
+
+ {t("insights.healthScore.restModePaused")}
+
+ )}
+