From 1f87e636620f6b69dabdb12b027f083d698caa84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 30 Jul 2026 10:49:06 +0200 Subject: [PATCH] fix(insights): restore the shared card rhythm the two assessment cards lost The spacing pass on this branch tightened `insight-status-card` to `gap-1.5` and left `mood-insights-sections` at `gap-2`, so two sibling cards that are meant to read as one family stopped matching. `assessment-spine-order.test.ts` exists to hold exactly that contract and went red as soon as the formatter stopped masking it: `format:check` failed first in the job, so the unit tests never ran and the divergence shipped unnoticed onto the branch. Bring the mood card to the same value rather than widen the other one back. The direction of travel is the tighter rhythm, and both allowed steps are on the sanctioned spacing scale. The test's expected string moves with the contract, not around it: it still asserts that both cards carry the SAME value, which is the whole point of it. --- src/app/insights/__tests__/assessment-spine-order.test.ts | 4 ++-- src/components/insights/mood/mood-insights-sections.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/insights/__tests__/assessment-spine-order.test.ts b/src/app/insights/__tests__/assessment-spine-order.test.ts index 66fb9f720..dd121c8a5 100644 --- a/src/app/insights/__tests__/assessment-spine-order.test.ts +++ b/src/app/insights/__tests__/assessment-spine-order.test.ts @@ -176,11 +176,11 @@ describe("assessment presentation contract", () => { ); expect(cardSource).toContain( - 'className="animate-insight-in gap-2 py-3 md:py-4"', + 'className="animate-insight-in gap-1.5 py-3 md:py-4"', ); expect(cardSource).toContain('className="text-foreground text-sm"'); expect(moodSource).toContain( - 'className="animate-insight-in gap-2 py-3 md:py-4"', + 'className="animate-insight-in gap-1.5 py-3 md:py-4"', ); expect(moodSource).toContain('data-slot="insight-assessment"'); expect(moodBodySource).toContain( diff --git a/src/components/insights/mood/mood-insights-sections.tsx b/src/components/insights/mood/mood-insights-sections.tsx index 19a5156e0..054bc861a 100644 --- a/src/components/insights/mood/mood-insights-sections.tsx +++ b/src/components/insights/mood/mood-insights-sections.tsx @@ -288,7 +288,7 @@ export function MoodInsightsSections({ // v1.13.1 — match the canonical `gap-1.5` + `pb-1` heading-to-body // rhythm the other assessment cards use, so the heading sits tight // above its body instead of floating ~16-24 px above it. - className="animate-insight-in gap-2 py-3 md:py-4" + className="animate-insight-in gap-1.5 py-3 md:py-4" >