From 97583cf8914a624b29530a67181de9359cf88fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 14 May 2026 12:29:02 +0200 Subject: [PATCH] refactor(targets): extract TargetCard + RangeBar + ConsistencyStrip + TargetCoachButton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /targets page composed everything inline in a 790-line page.tsx. Break it into focused primitives under src/components/targets/ so the W3e redesign can iterate per-card without growing the page file: - target-card.tsx — the redesigned card composition. Headline + verbal status pill, big-number row with inline trend chevron, range bar, consistency strip, recency + streak chips (both conditional on real data), per-card Coach CTA gated by aiEnabled, source link footer. MOOD_STABILITY swaps the raw σ headline for a verbal label via the moodStabilityLabel helper. Fixed card order is owned by the page; this component is presentational. - range-bar.tsx — extracted intact from page.tsx. Same behaviour, same data-slot. Now carries its own test suite. - consistency-strip.tsx — NEW. 7 dots (one per Berlin-tz day), each filled / amber / red / hollow per the day's band classification. Caption flips between "X of 7 in range" and "X of 7 logged" when cadence is the more informative signal. Accessible: