From 0623316c12d4b01e8cfd06c37c8733be742b1918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 20 Jun 2026 16:51:17 +0200 Subject: [PATCH 1/2] feat(vorsorge): move cadence into metric row and link heading to filtered results Drop the grey cadence pill from the card heading. The cadence now reads as part of the metric line, styled like the metric label itself (no shaded background), via a new MedicationCardHeader metricMeta slot. Nothing else sits beside the heading. Link a measurement-linked reminder's heading to the measurements history pre-filtered to its type, reusing the existing kebab target. Free-text reminders keep a plain heading. --- .../vorsorge-section.tsx | 30 ++++++++++++++----- .../medications/medication-card-header.tsx | 18 ++++++++++- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/components/measurement-reminders/vorsorge-section.tsx b/src/components/measurement-reminders/vorsorge-section.tsx index e1c1c59f8..b1a68df33 100644 --- a/src/components/measurement-reminders/vorsorge-section.tsx +++ b/src/components/measurement-reminders/vorsorge-section.tsx @@ -770,11 +770,19 @@ function VorsorgeCard({ ? t(`measurementReminders.types.${reminder.measurementType}`) : t("measurementReminders.selfPlanned"); - // v1.18.6.1 — the cadence renders as a chip DIRECTLY to the right of the - // metric name (the med-card convention: cadence sits next to the name). - const cadenceChip = cadence ? ( - {cadence} - ) : null; + // v1.18.10 — the cadence reads as part of the METRIC ROW (the category + // line), styled like the metric label itself — same muted weight/colour, + // no shaded pill. The card heading stays clean (nothing beside it); the + // cadence rides next to "Blutdruck" et al. via `metricMeta` below. + const cadenceText = cadence || null; + + // v1.18.10 — a measurement-linked reminder's heading links to the + // measurements history pre-filtered to its type (the same target the + // "Messergebnisse anzeigen" kebab item uses). A free-text reminder has no + // readings to show, so it stays a plain (non-linking) heading. + const measurementsHref = isLinked + ? `/measurements?type=${encodeURIComponent(reminder.measurementType as string)}` + : undefined; // Provenance / disabled state badges keep their own row below the category. // Omit the row entirely when neither applies (don't render an empty band). @@ -900,13 +908,15 @@ function VorsorgeCard({ {resolveReminderLabel(reminder, t)} - {cadenceChip} + {/* v1.18.10 — cadence rides on the metric line, styled like the + metric text (no shaded pill). */}
{t(`measurementReminders.${due.key}`, { days: due.days })} {categoryLabel} + {cadenceText ? {cadenceText} : null}
@@ -991,7 +1001,13 @@ function VorsorgeCard({ name={resolveReminderLabel(reminder, t)} dose="" categoryLabel={categoryLabel} - nameChip={cadenceChip} + metricMeta={cadenceText} + href={measurementsHref} + linkLabel={ + measurementsHref + ? t("measurementReminders.showMeasurements") + : undefined + } stateBadges={stateBadges} actions={headerActions} /> diff --git a/src/components/medications/medication-card-header.tsx b/src/components/medications/medication-card-header.tsx index 1a7af3740..f3713df2a 100644 --- a/src/components/medications/medication-card-header.tsx +++ b/src/components/medications/medication-card-header.tsx @@ -43,6 +43,15 @@ export interface MedicationCardHeaderProps { * from `stateBadges` (which ride their own row below the category). */ nameChip?: ReactNode; + /** + * v1.18.10 — inline text rendered DIRECTLY beside the category label on + * line 2 (e.g. the Vorsorge cadence "alle 7 Tage"). Unlike `nameChip` + * (a chip on the title line) this reads as part of the metric row itself, + * inheriting the muted line's weight/colour rather than a shaded pill, so + * the cadence sits next to the metric name without an alarming grey + * background. + */ + metricMeta?: ReactNode; stateBadges?: ReactNode; actions?: ReactNode; /** @@ -60,6 +69,7 @@ export function MedicationCardHeader({ dose, categoryLabel, nameChip, + metricMeta, stateBadges, actions, href, @@ -81,10 +91,16 @@ export function MedicationCardHeader({ State badges now ride their own row below the category badge so the canonical row stays two lines on narrow viewports. */} -
+
{categoryLabel} + {/* v1.18.10 — cadence (and any future metric meta) reads as part of + the metric line itself: same muted weight/colour as the row, no + shaded pill. */} + {metricMeta ? ( + {metricMeta} + ) : null}
{stateBadges ? (
Date: Sat, 20 Jun 2026 16:51:18 +0200 Subject: [PATCH 2/2] fix(dashboard): refresh briefing and layout on the Startseite without reload The dashboard hero reads the briefing headline and the layout from the server snapshot. Regenerating a briefing or saving the dashboard layout only touched their own caches, so the snapshot kept stale data until its own window lapsed and the Startseite looked unchanged until a manual reload. Invalidate the dashboard snapshot on briefing regenerate and on layout save/reset. Harmonise the daily-briefing card body rhythm with its sibling insights cards (space-y-3, matching correlation-card) so it no longer reads taller. --- src/components/insights/daily-briefing.tsx | 9 +++++++-- src/components/insights/use-insights-advisor.ts | 9 +++++++++ .../settings/dashboard-layout-section.tsx | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/components/insights/daily-briefing.tsx b/src/components/insights/daily-briefing.tsx index 9c3442bce..99353d1c1 100644 --- a/src/components/insights/daily-briefing.tsx +++ b/src/components/insights/daily-briefing.tsx @@ -302,7 +302,7 @@ function BriefingSkeleton() { return (