From ce377ef56d26b13167460292cb1acf0ec6c8e678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 11 Nov 2026 21:47:54 +0100 Subject: [PATCH] chore: remove leftovers of the deleted onboarding AI offer and badge The end-to-end setup still seeded the shared-provider offer's account and captured its session, although the journey that used it is gone. Three comments still pointed at what was removed: the tour launcher cited the deleted personal-record badge as its model, the personal record worker said the badge still renders, and the morning briefing push said a concerning reading goes out as an anomaly notification, which nothing sends. --- e2e/setup/global-setup.ts | 21 ------------------- src/components/onboarding/tour-launcher.tsx | 3 +-- src/lib/daily/daily-briefing-push.ts | 6 +++--- .../personal-records/pr-detection-worker.ts | 4 ++-- 4 files changed, 6 insertions(+), 28 deletions(-) diff --git a/e2e/setup/global-setup.ts b/e2e/setup/global-setup.ts index 355535f32..087d71406 100644 --- a/e2e/setup/global-setup.ts +++ b/e2e/setup/global-setup.ts @@ -717,21 +717,6 @@ export const E2E_SETUP_LOCALE = { role: "USER", } as const; -/** - * v1.38.19 — the shared-provider offer's own account. - * - * Its journey seeds INSTANCE-wide state (the operator key's presence and the - * provider-health ledger the tri-state folds) and mints a consent receipt on - * the account, so it cannot share one with a journey that asserts a module - * map or a tile order. - */ -export const E2E_SETUP_AI_OFFER = { - email: "e2e-setup-ai-offer@healthlog.test", - username: "e2e-setup-ai-offer", - password: "Ao6!Zd3fB9qMv2Rk", - role: "USER", -} as const; - export const SETUP_BP_STORAGE_STATE_PATH = resolve( process.cwd(), "e2e/setup/storageStateSetupBp.json", @@ -760,10 +745,6 @@ export const SETUP_LOCALE_STORAGE_STATE_PATH = resolve( process.cwd(), "e2e/setup/storageStateSetupLocale.json", ); -export const SETUP_AI_OFFER_STORAGE_STATE_PATH = resolve( - process.cwd(), - "e2e/setup/storageStateSetupAiOffer.json", -); const SETUP_FLOW_ACCOUNTS = [ E2E_SETUP_BP, @@ -772,7 +753,6 @@ const SETUP_FLOW_ACCOUNTS = [ E2E_SETUP_CHILD, E2E_SETUP_A11Y, E2E_SETUP_LOCALE, - E2E_SETUP_AI_OFFER, E2E_SETUP_CONNECT, ] as const; @@ -1882,7 +1862,6 @@ export default async function globalSetup(config: FullConfig): Promise { await capture(E2E_SETUP_A11Y, SETUP_A11Y_STORAGE_STATE_PATH); await capture(E2E_SETUP_LOCALE, SETUP_LOCALE_STORAGE_STATE_PATH); await capture(E2E_SETUP_CONNECT, SETUP_CONNECT_STORAGE_STATE_PATH); - await capture(E2E_SETUP_AI_OFFER, SETUP_AI_OFFER_STORAGE_STATE_PATH); await capture(E2E_SETUP_CHILD, SETUP_CHILD_STORAGE_STATE_PATH); await pool.query( `UPDATE users SET totp_confirmed_at = $2 WHERE username = $1`, diff --git a/src/components/onboarding/tour-launcher.tsx b/src/components/onboarding/tour-launcher.tsx index 71786dbde..77205fd6d 100644 --- a/src/components/onboarding/tour-launcher.tsx +++ b/src/components/onboarding/tour-launcher.tsx @@ -244,8 +244,7 @@ export function TourLauncher({ ready = true }: TourLauncherProps) { // v1.4.47 — clock reading for the 24 h auto-launch gate. The // useState lazy-initialiser runs once at mount; subsequent re-renders // reuse the same value. This keeps the render path pure (React's - // purity linter rejects a bare `Date.now()` reference in render) and - // matches the established pattern in `personal-record-badge.tsx`: + // purity linter rejects a bare `Date.now()` reference in render): // capture the clock at a stable boundary, then derive freshness from // it. The launcher only consults this value once per (user, flag) // tuple via the `decidedFor` guard, so a mount that takes ten diff --git a/src/lib/daily/daily-briefing-push.ts b/src/lib/daily/daily-briefing-push.ts index 1fa56dab9..16047602a 100644 --- a/src/lib/daily/daily-briefing-push.ts +++ b/src/lib/daily/daily-briefing-push.ts @@ -22,9 +22,9 @@ * signal's headline without a figure in it, "your score is ready", or the * honest all-clear — never a reading, a dose or the score itself, since the * push lands on a locked phone). It is dispatched NON-URGENT, so it never escalates to a - * Focus-bypassing / time-sensitive delivery — a concerning reading always stays - * on `MEASUREMENT_ANOMALY`, never here. It fires ONLY inside a local morning - * window, which is the quiet-hours guarantee for this nudge. + * Focus-bypassing / time-sensitive delivery, and a concerning reading is never + * pushed through it. It fires ONLY inside a local morning window, which is the + * quiet-hours guarantee for this nudge. */ import { SESSION_USER_SELECT, type SessionUser } from "@/lib/auth/session-user"; import type { PrismaClient } from "@/generated/prisma/client"; diff --git a/src/lib/personal-records/pr-detection-worker.ts b/src/lib/personal-records/pr-detection-worker.ts index e2839662a..77074822d 100644 --- a/src/lib/personal-records/pr-detection-worker.ts +++ b/src/lib/personal-records/pr-detection-worker.ts @@ -79,8 +79,8 @@ export interface DetectPersonalRecordsOptions { * Set when a batch ingest crosses the historical-backfill threshold * — a multi-year Apple Health import shouldn't fire hundreds of * pushes during initial sync. The flag rides through to the - * dispatcher; the row is still written, the badge still renders, the - * doctor report still picks it up. + * dispatcher; the row is still written and the doctor report still + * picks it up. */ silent?: boolean; /**