Remove six insights surfaces and a toggle nobody mounts

The production dead-code check has been documented rather than enforced
since PR #691, because its list mixed real debt with false positives.
Triaged against the shipped tree, six of them are genuinely unreachable
and go now.

Five died when their host was retired and the leaves were left behind:
the recommendation card with its confidence meter and feedback control,
the grid that mounted them, and the suggested-prompts chip strip that
left the hero band in v1.18.7. The sixth, the comparison toggle, has had
two regression tests pinning its absence since v1.4.22, because the
preference it once set is a Settings concern now.

Deleting them freed sixteen translation keys in every locale, a pinned
entry in the success-affordance register, and two entries in the Coach
gate fixtures. Each of those was found by a guard rather than by
reading, which is the point of having them.

The adapter under signals/adapters stays: knip reports it as unreachable
because only a test imports it, but that test is the registry invariant
it exists to prove, and deleting it would remove a check rather than
dead weight.
This commit is contained in:
Marc-André Bombeck committed 2026-08-15 03:15:48 +02:00
1 parent 8ec682f007
commit 52f8c5a57a
22 files changed
+10 -2518

No files matched your search

@@ -13,7 +13,6 @@ import {
type AssistantFlagSet,
} from "@/hooks/use-feature-flags";
import { SuggestedPrompts } from "@/components/insights/suggested-prompts";
import { CoachLaunchButton } from "@/components/insights/coach-launch-button";
import { LayoutCoachFab } from "@/components/insights/layout-coach-fab";
import { LayoutCoachMount } from "@/components/insights/layout-coach-mount";
@@ -138,15 +137,11 @@ interface CoachSurface {
}
// v1.18.7 — the HeroStrip "Ask the coach" action button + the in-band
// SuggestedPrompts chip strip were removed from the overview hero. The
// Coach is the bottom-right drawer; its launcher + the standalone
// SuggestedPrompts surface still carry the flag cascade below.
// SuggestedPrompts chip strip were removed from the overview hero, and the
// strip's component has since been deleted along with the rest of the
// unmounted insights cluster. The Coach is the bottom-right drawer; the
// launcher surfaces below carry the flag cascade.
const COACH_SURFACES: CoachSurface[] = [
{
name: "SuggestedPrompts standalone",
mount: () => <SuggestedPrompts onPick={() => undefined} />,
proofWhenOn: 'data-slot="insights-suggested-prompts"',
},
{
name: "CoachLaunchButton inline pill",
mount: () => (
@@ -278,7 +273,6 @@ describe("Coach disable cascade invariant", () => {
// action button + suggested-prompt strip were removed from the band.
"src/components/insights/layout-coach-fab.tsx",
"src/components/insights/layout-coach-mount.tsx",
"src/components/insights/suggested-prompts.tsx",
// v1.12.0 — the full-page Coach route gates on `flags.coach` and
// redirects to `/insights` when the operator master flag is off.
// v1.18.0 — moved to the standalone top-level `/coach` route.
@@ -405,6 +399,6 @@ describe("Coach disable cascade invariant", () => {
// test above pins every other `flags.coach` call site.
// v1.18.7 — dropped from 6 to 4: the two HeroStrip coach surfaces
// (action button + suggested-prompt strip) were removed from the band.
expect(COACH_SURFACES.length).toBe(4);
expect(COACH_SURFACES.length).toBe(3);
});
});
@@ -17,7 +17,6 @@ import type { AuthUser } from "@/hooks/use-auth";
import { CoachLaunchButton } from "@/components/insights/coach-launch-button";
import { LayoutCoachFab } from "@/components/insights/layout-coach-fab";
import { LayoutCoachMount } from "@/components/insights/layout-coach-mount";
import { SuggestedPrompts } from "@/components/insights/suggested-prompts";
/**
* v1.4.47 W3 — per-user "Hide Coach" opt-out invariant.
@@ -179,14 +178,11 @@ const DISABLE_COACH_SURFACES: DisableCoachSurface[] = [
),
proofWhenVisible: 'data-slot="coach-launch-inline"',
},
{
name: "SuggestedPrompts chip strip",
mount: () => <SuggestedPrompts onPick={() => undefined} />,
proofWhenVisible: 'data-slot="insights-suggested-prompts"',
},
// v1.18.7 — the HeroStrip "Ask the coach" action button was removed from
// the overview hero. The Coach is the bottom-right drawer; its launcher
// surfaces below carry the per-user disable gate.
// v1.18.7 — the HeroStrip "Ask the coach" action button and the
// SuggestedPrompts chip strip were removed from the overview hero, and the
// strip's component has now been deleted with the rest of the unmounted
// insights cluster. The Coach is the bottom-right drawer; the launcher
// surfaces above carry the per-user disable gate.
];
describe("Coach per-user disableCoach invariant", () => {
@@ -294,7 +290,6 @@ describe("Coach per-user disableCoach invariant", () => {
// the `useDisableCoach` call entirely.
"src/components/insights/layout-coach-fab.tsx",
"src/components/insights/layout-coach-mount.tsx",
"src/components/insights/suggested-prompts.tsx",
// v1.12.0 — the full-page Coach route mirrors the launch-button /
// FAB gate: operator master flag OR per-user opt-out redirects the
// page back to `/insights` instead of painting a dead chat shell.