fix(insights): match legacy-payload CTA button to its banner copy

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) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-10 13:38:19 +02:00
1 parent 4feacad088
commit d2631253a4
2 files changed
+5 -2

No files matched your search

@@ -302,6 +302,9 @@ describe("<InsightAdvisorCard> — 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", () => {
@@ -505,7 +505,7 @@ export function InsightAdvisorCard({
) : (
<Sparkles className="mr-1.5 h-3 w-3" />
)}
{t("insights.startAnalysis")}
{t("insights.heroRegenerate")}
</Button>
)}
</div>
@@ -692,7 +692,7 @@ export function InsightAdvisorCard({
) : (
<Sparkles className="mr-1.5 h-3 w-3" />
)}
{t("insights.startAnalysis")}
{t("insights.heroRegenerate")}
</Button>
</div>
</div>