diff --git a/src/components/charts/mood-chart.tsx b/src/components/charts/mood-chart.tsx index a1c98d459..16208ce11 100644 --- a/src/components/charts/mood-chart.tsx +++ b/src/components/charts/mood-chart.tsx @@ -621,10 +621,32 @@ export function MoodChart({ data={chartDataWithCompare ?? chartData} margin={{ top: 10, right: 8, bottom: 8, left: 8 }} > + {/* v1.4.25 W3 — the mood chart's YAxis is pinned to + five mood-score ticks ([1,2,3,4,5]), which Recharts + syncs with CartesianGrid by default. That left the + mini variant painting five horizontal lines while + the BP / Weight / Pulse minis painted six (their + auto-generated YAxis ticks land on six bands in + typical health ranges). The explicit coordinates + generator below produces six evenly-spaced lines + so the trends row reads as a single rhythm. */} { + // `offset` carries the chart's plot-area metrics. + // Six evenly-spaced y-coordinates inside the plot + // area (top + 4 intermediate + bottom) match the + // density of the BP/Weight/Pulse minis. + const top = offset.top ?? 0; + const height = offset.height ?? 0; + if (height <= 0) return []; + const lines = 6; + return Array.from({ length: lines }, (_, i) => + Math.round(top + (height * i) / (lines - 1)), + ); + }} /> {showBands && VALUE_BANDS.map((band) => ( diff --git a/src/components/insights/trends-row.tsx b/src/components/insights/trends-row.tsx index 3e510ccc7..54ea18b55 100644 --- a/src/components/insights/trends-row.tsx +++ b/src/components/insights/trends-row.tsx @@ -98,13 +98,17 @@ export function TrendsRow({ annotations, confidence }: TrendsRowProps) { three cards on visibly different baselines. Each card is now a flex column with `min-h-[300px]` so the chart anchors to the top and the annotation grows downward into a shared - minimum height. The grid + min-h together preserve the visual - rhythm even on a row where only one annotation is multi-line. */} -
+ minimum height. + v1.4.25 W3 — strengthen the equal-height contract with + `md:auto-rows-fr` + `md:items-stretch` on the grid and + `h-full` on each card so the tallest annotation still pins + every row member to a single baseline. The `min-h-[300px]` + floor stays in place for the single-column mobile view. */} +