From d2631253a4aaa0cd39e0f4a5cfd206719ee10cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 13:38:19 +0200 Subject: [PATCH] fix(insights): match legacy-payload CTA button to its banner copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The legacy-payload yellow banner read "Insights updated — regenerate for new explainability features" but the CTA button underneath said "Start analysis", so the verb in the help text and the verb on the button disagreed. Switch the legacy CTA button to the existing `insights.heroRegenerate` key so both banner and button now talk about regeneration. The empty-state "Start analysis" CTA stays untouched — that one's never had analysis to start from. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../insights/__tests__/insight-advisor-card.test.tsx | 3 +++ src/components/insights/insight-advisor-card.tsx | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/insights/__tests__/insight-advisor-card.test.tsx b/src/components/insights/__tests__/insight-advisor-card.test.tsx index 3d16c3b0a..b78c02666 100644 --- a/src/components/insights/__tests__/insight-advisor-card.test.tsx +++ b/src/components/insights/__tests__/insight-advisor-card.test.tsx @@ -302,6 +302,9 @@ describe(" — polished loading / empty / error states (B1b) // No crash means the test got here. Surface the regenerate CTA so // the user has a one-click escape from the legacy state. expect(html).toContain('data-slot="insight-legacy-payload-cta"'); + // F-06 (v1.4.19): the CTA copy says "regenerate", so the button + // label must say "Regenerate" too — not "Start analysis". + expect(html).toContain("Regenerate"); }); it("error state without onRegenerate hides the retry button", () => { diff --git a/src/components/insights/insight-advisor-card.tsx b/src/components/insights/insight-advisor-card.tsx index 0c8f76bb1..6127c7f46 100644 --- a/src/components/insights/insight-advisor-card.tsx +++ b/src/components/insights/insight-advisor-card.tsx @@ -505,7 +505,7 @@ export function InsightAdvisorCard({ ) : ( )} - {t("insights.startAnalysis")} + {t("insights.heroRegenerate")} )} @@ -692,7 +692,7 @@ export function InsightAdvisorCard({ ) : ( )} - {t("insights.startAnalysis")} + {t("insights.heroRegenerate")}