From 7a96a934bf099ea6981909da3ad9b0ccd9a59f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Mon, 15 Jun 2026 01:20:49 +0200 Subject: [PATCH 1/4] refactor(import): derive the CSV example header from the shared column list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The downloadable CSV example pinned its header as an inline string literal while csv-measurements.ts exported CSV_EXAMPLE_COLUMNS as the documented single source of truth for that order — so the two could silently drift. Derive the example header from the constant; the column order now has one owner and the previously unused export is wired in. --- src/components/settings/import-panel.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/settings/import-panel.tsx b/src/components/settings/import-panel.tsx index 2c0f8a1b0..efd05b62b 100644 --- a/src/components/settings/import-panel.tsx +++ b/src/components/settings/import-panel.tsx @@ -45,6 +45,7 @@ import { queryKeys } from "@/lib/query-keys"; import { useTranslations } from "@/lib/i18n/context"; import { cn } from "@/lib/utils"; import { apiFetchRaw, apiGet } from "@/lib/api/api-fetch"; +import { CSV_EXAMPLE_COLUMNS } from "@/lib/import/csv-measurements"; // ─────────────────────────── Section wrapper ─────────────────────────── @@ -641,7 +642,7 @@ function JsonImportCard() { * drift. Exported so a test can assert it stays a valid header. */ export const EXAMPLE_CSV = [ - "type,value,unit,measuredAt,glucoseContext,notes,externalId", + CSV_EXAMPLE_COLUMNS.join(","), "WEIGHT,80.5,kg,2026-05-01T08:00:00Z,,morning,", "BLOOD_GLUCOSE,5.3,mmol/L,2026-05-01T08:05:00+02:00,FASTING,,meter-001", "BLOOD_PRESSURE_SYS,120,mmHg,2026-05-01T08:05:00+02:00,,,", From 5a62d04651abb250a23c2d962bf5a0397bda4b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Mon, 15 Jun 2026 01:21:10 +0200 Subject: [PATCH 2/4] fix(import): use the success token for import success ticks The three import success check-icons hardcoded text-emerald-500, bypassing the semantic text-success token every other surface uses. The token is AA-tuned per theme (a darker green in light mode) where emerald-500 is a single fixed value, so the import ticks sat off-tone in light mode and could fall short of the AA bar the light tokens are tuned for. Swap to text-success to match the integration-card family. --- src/components/settings/import-panel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/settings/import-panel.tsx b/src/components/settings/import-panel.tsx index efd05b62b..f30fad3f8 100644 --- a/src/components/settings/import-panel.tsx +++ b/src/components/settings/import-panel.tsx @@ -322,7 +322,7 @@ function AppleHealthImportCard() { className="text-foreground flex items-start gap-2 text-xs" >