+
+
+ {t("insights.subPage.primary.inRangeLabel")}
+
+
{sharePct}%
+
+
+
= 70 ? "bg-dracula-green" : "bg-dracula-orange",
+ )}
+ style={{ width: `${Math.min(100, Math.max(0, sharePct))}%` }}
+ />
+
+
+ ) : null}
+
+ );
+}
diff --git a/src/components/insights/metric-target-summary.tsx b/src/components/insights/metric-target-summary.tsx
index da6709f4a..5599dfeea 100644
--- a/src/components/insights/metric-target-summary.tsx
+++ b/src/components/insights/metric-target-summary.tsx
@@ -298,20 +298,19 @@ function TargetReferencePanel({
const sourceLink = getTargetSourceLink(target);
- // In-target share: fraction of logged days in the green band over the
- // last 30. Suppressed when the route flagged insufficient data so the
- // sub-page suppresses the share line.
- const showShare = !target.insufficientData && target.daysLogged30d > 0;
- const sharePct = showShare
- ? Math.round((target.daysInRange30d / target.daysLogged30d) * 100)
- : null;
-
- // 30-day average. BP stitches the diastolic average into the familiar
- // `S/D` pair; everything else rounds to one decimal.
+ // v1.12.0 — the in-target share (% of logged days in band) and the
+ // 30-day average moved UP to `
`, the canonical home
+ // for the headline + 30-day average + "Im Zielbereich" bar (the
+ // no-duplicate-info rule). This panel stays the band reference: the
+ // range string, the status pill, the positional range bar (where
+ // today's value sits inside the band — distinct from the % bar), the
+ // 7-day consistency strip, and the guideline source. Blood pressure is
+ // the exception: it has no `` (this richer panel IS
+ // its primary tile), so it keeps the stitched S/D 30-day average inline.
let averageLabel: string | null = null;
- if (target.average30 != null) {
+ if (isBp && target.average30 != null) {
const avgValue =
- isBp && bpDiastolic?.average30 != null
+ bpDiastolic?.average30 != null
? `${Math.round(target.average30)}/${Math.round(bpDiastolic.average30)}`
: String(Math.round(target.average30 * 10) / 10);
averageLabel = `${t("targets.average30d")} ${avgValue} ${unit}`;
@@ -383,15 +382,12 @@ function TargetReferencePanel({
) : null}
- {/* Row 3: in-target share + 30-day average. */}
- {sharePct != null || averageLabel ? (
+ {/* Row 3: 30-day average (blood pressure only — every other metric
+ surfaces its 30-day average in `