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

@@ -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}