chore(insights): remove the "Try a 7-day experiment" placeholder

Every correlation card carried a permanently disabled button with the
tooltip "Coming soon", which on a phone (no hover) was just a dead
control. The feature it stood for was never built; the button and its
two strings go in all ten locales. The Coach hand-off and the dismiss
action stay.
This commit is contained in:
Marc-André Bombeck committed 2026-11-11 20:30:24 +01:00
1 parent e098fc882f
commit 17fd1a0906
12 files changed
+6 -50

No files matched your search

-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Zusammenhänge",
"experimentCta": "7-Tage-Experiment starten",
"experimentTooltip": "Bald verfügbar",
"emptyTitle": "Mehr Daten nötig, um diesen Zusammenhang zu zeigen",
"sourceChip": "basierend auf {n} gepaarten Messungen ({window})",
"sourceWindowLast30": "letzte 30 Tage",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Relationships",
"experimentCta": "Try a 7-day experiment",
"experimentTooltip": "Coming soon",
"emptyTitle": "Need more data to see this relationship",
"sourceChip": "based on {n} paired readings ({window})",
"sourceWindowLast30": "last 30 days",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Correlaciones",
"experimentCta": "Iniciar experimento de 7 días",
"experimentTooltip": "Próximamente",
"emptyTitle": "Necesitamos más datos para mostrar esta correlación",
"sourceChip": "basado en {n} mediciones pareadas ({window})",
"sourceWindowLast30": "Últimos 30 días",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Corrélations",
"experimentCta": "Lancer une expérience de 7 jours",
"experimentTooltip": "Bientôt disponible",
"emptyTitle": "Il faut plus de données pour afficher cette corrélation",
"sourceChip": "sur la base de {n} mesures appariées ({window})",
"sourceWindowLast30": "30 derniers jours",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Correlazioni",
"experimentCta": "Avvia esperimento di 7 giorni",
"experimentTooltip": "In arrivo",
"emptyTitle": "Servono più dati per mostrare questa correlazione",
"sourceChip": "su {n} misurazioni appaiate ({window})",
"sourceWindowLast30": "Ultimi 30 giorni",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "관계",
"experimentCta": "7일 실험 해보기",
"experimentTooltip": "곧 제공돼요",
"emptyTitle": "이 관계를 보려면 데이터가 더 필요해요",
"sourceChip": "짝지은 측정값 {n}개 기준 ({window})",
"sourceWindowLast30": "최근 30일",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Verbanden",
"experimentCta": "Probeer een experiment van 7 dagen",
"experimentTooltip": "Binnenkort beschikbaar",
"emptyTitle": "Meer gegevens nodig om dit verband te zien",
"sourceChip": "gebaseerd op {n} gekoppelde metingen ({window})",
"sourceWindowLast30": "afgelopen 30 dagen",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Korelacje",
"experimentCta": "Uruchom 7-dniowy eksperyment",
"experimentTooltip": "Wkrótce",
"emptyTitle": "Potrzeba więcej danych, aby pokazać tę korelację",
"sourceChip": "na podstawie {n} sparowanych pomiarów ({window})",
"sourceWindowLast30": "Ostatnie 30 dni",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Relações",
"experimentCta": "Tente um experimento de 7 dias",
"experimentTooltip": "Em breve",
"emptyTitle": "Precisa de mais dados para ver esta relação",
"sourceChip": "com base em {n} leituras pareadas ({window})",
"sourceWindowLast30": "últimos 30 dias",
-2
View File
@@ -3017,8 +3017,6 @@
},
"correlationRow": {
"title": "Связи",
"experimentCta": "Попробовать 7-дневный эксперимент",
"experimentTooltip": "Скоро",
"emptyTitle": "Нужно больше данных, чтобы увидеть эту связь",
"sourceChip": "на основе {n} парных измерений ({window})",
"sourceWindowLast30": "последние 30 дней",
@@ -81,18 +81,15 @@ describe("<CorrelationCard>", () => {
expect(html).toContain("High confidence");
});
it("renders the disabled experiment CTA with the Coming-soon tooltip", () => {
it("offers no placeholder action, only ones that work", () => {
const html = render(<CorrelationCard result={okResult} />);
expect(html).toMatch(/data-slot="correlation-card-cta"/);
expect(html).toContain("Try a 7-day experiment");
expect(html).toMatch(/disabled/);
expect(html).toContain("Coming soon");
expect(html).not.toMatch(/data-slot="correlation-card-cta"/);
expect(html).not.toMatch(/<button[^>]*disabled/);
});
it("renders the empty-state when status=insufficient", () => {
const html = render(<CorrelationCard result={insufficient} />);
expect(html).toContain("Need more data to see this relationship");
expect(html).not.toContain("Try a 7-day experiment");
});
it("tags the wrapper with the correlation kind", () => {
@@ -103,7 +100,7 @@ describe("<CorrelationCard>", () => {
it("renders German copy when locale=de", () => {
const html = render(<CorrelationCard result={okResult} />, "de");
expect(html).toContain("BD × Therapietreue");
expect(html).toContain("7-Tage-Experiment");
expect(html).toContain("basierend auf 28 gepaarten Messungen");
});
it("never surfaces causal language in the interpretation slot", () => {
+2 -23
View File
@@ -1,8 +1,7 @@
"use client";
import dynamic from "next/dynamic";
import { Activity, Sparkles } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Activity } from "lucide-react";
import { Card, CardContent, CardHeader } from "@/components/ui/card";
import { TileHeader } from "@/components/insights/tile-header";
import { EmptyState } from "@/components/ui/empty-state";
@@ -177,27 +176,7 @@ export function CorrelationCard({ result }: CorrelationCardProps) {
})}
</p>
<div className="flex flex-wrap items-center gap-2">
<Button
type="button"
size="sm"
// Outline variant so the disabled placeholder reads as
// "this is on the roadmap" rather than "the system is
// broken right now". Flip back to default when the
// 7-day experiment feature ships in v1.5.
variant="outline"
disabled
data-slot="correlation-card-cta"
className="gap-1.5"
title={t("insights.correlationRow.experimentTooltip")}
>
<Sparkles className="h-3.5 w-3.5" aria-hidden="true" />
<span>{t("insights.correlationRow.experimentCta")}</span>
<span className="sr-only">
, {t("insights.correlationRow.experimentTooltip")}
</span>
</Button>
{/* v1.21.0 — the live Coach hand-off sits beside the
roadmap CTA: it scopes to both sources in the pair. */}
{/* The Coach hand-off scopes to both sources in the pair. */}
<AskCoachAction
question={t(COACH_QUESTION_BY_KIND[result.kind])}
scope={coachScope}