chore(insights): retire the InsightAdvisorCard surface

Drop the InsightAdvisorCard component, its four integration tests
under src/components/insights/__tests__, the page-level mount on
/insights, the orphan i18n keys (advisorTitle, aiOverviewTitle), the
e2e advisor-card spec, the dashboard.spec.ts advisor assertion and
every related comment. The InsightsTabStrip regenerate icon stays
untouched as the sole power-user refresh affordance. The iOS-consumed
POST /api/insights/generate endpoint and its request/response shape
stay byte-stable.
This commit is contained in:
Marc-André Bombeck committed 2026-05-16 01:19:14 +02:00
1 parent cad53a68a3
commit 52edf85f02
19 files changed
+32 -2209

No files matched your search

@@ -228,11 +228,11 @@ describe("ALLOWED_CHART_TOKENS — drift guard", () => {
});
it("includes metric:MOOD now that <MoodChart> is wired into the renderer", () => {
// v1.4.3 enabled `metric:MOOD`. The renderer in
// `<InsightAdvisorCard>` branches on `tokenKind(token) === "mood"`
// and mounts the dedicated, self-fetching `<MoodChart>` instead of
// the generic `<HealthChart>` (which Zod-validates against
// `measurementTypeEnum` and would silently render empty).
// v1.4.3 enabled `metric:MOOD`. The chart-token renderer branches
// on `tokenKind(token) === "mood"` and mounts the dedicated,
// self-fetching `<MoodChart>` instead of the generic `<HealthChart>`
// (which Zod-validates against `measurementTypeEnum` and would
// silently render empty).
expect(ALLOWED_CHART_TOKENS).toContain("metric:MOOD");
});
+3 -4
View File
@@ -24,10 +24,9 @@ export const queryKeys = {
insightsTargets: () => ["insights", "targets"] as const,
/**
* Shared cache key for the rich `/api/insights/generate` advisor
* payload. `/insights` (full `<InsightAdvisorCard>`) and any other
* surface that subscribes under this key share the same cache so a
* regenerate on one surface refreshes the others without a second
* LLM round-trip.
* payload. Every surface that subscribes under this key shares the
* same cache so a regenerate on one surface refreshes the others
* without a second LLM round-trip.
*/
insightsAdvisor: () => ["insights", "advisor"] as const,
insightsBpStatus: (locale: string) =>