diff --git a/src/components/layout/__tests__/bottom-nav.test.tsx b/src/components/layout/__tests__/bottom-nav.test.tsx index 7e7a602bd..b676af7ce 100644 --- a/src/components/layout/__tests__/bottom-nav.test.tsx +++ b/src/components/layout/__tests__/bottom-nav.test.tsx @@ -7,8 +7,9 @@ * `aria-haspopup="dialog"`), not a navigation link * - the More button opens a hub (closed by default under SSR) * - the More hub is a real hub: Measurements + Mood (which left the - * always-visible strip) stay reachable here, alongside Workouts, - * Achievements, Notifications and Settings — nothing is orphaned + * always-visible strip) stay reachable here, alongside Achievements, + * Notifications and Settings — nothing is orphaned (v1.18.0 — Workouts + * and Recovery left the nav for their Insights pills) * - WCAG 2.5.5 floor: every strip entry is `min-h-11 min-w-11` * * v1.8.6 — the Targets (Zielwerte) page is deprecated and dropped from diff --git a/src/components/layout/__tests__/nav-model.test.ts b/src/components/layout/__tests__/nav-model.test.ts index c7f64cc3f..24df312a5 100644 --- a/src/components/layout/__tests__/nav-model.test.ts +++ b/src/components/layout/__tests__/nav-model.test.ts @@ -3,9 +3,10 @@ * * Pins the coherence contract the desktop sidebar and the mobile * bottom-nav both consume: one ordered destination list (so the two bars - * tell one story), Workouts AND Coach as first-class destinations on both + * tell one story), the Coach as a first-class destination on both * surfaces, cycle gated by the account flag, and an active-resolver that - * prefers the most-specific sibling under `/insights`. + * prefers the most-specific sibling under `/insights`. (v1.18.0 — + * Workouts and Recovery left the left nav for their Insights pills.) */ import { describe, expect, it } from "vitest"; @@ -182,12 +183,13 @@ describe("isNavDestinationActive most-specific resolution", () => { expect(isNavDestinationActive("/insights", "/coach")).toBe(false); }); - it("does not light up Insights when on its Workouts sibling", () => { - expect( - isNavDestinationActive("/insights/workouts", "/insights/workouts"), - ).toBe(true); + it("lights up Insights on its Workouts sub-route (no longer a separate nav home)", () => { + // v1.18.0 — Workouts left the left nav for its Insights pill, so it is + // no longer a more-specific NAV_DESTINATIONS sibling. The Insights nav + // home now reads active on `/insights/workouts`, like any other + // `/insights/*` sub-route. expect(isNavDestinationActive("/insights", "/insights/workouts")).toBe( - false, + true, ); }); diff --git a/src/components/layout/__tests__/sidebar-nav.test.tsx b/src/components/layout/__tests__/sidebar-nav.test.tsx index acebe471e..3f1145d20 100644 --- a/src/components/layout/__tests__/sidebar-nav.test.tsx +++ b/src/components/layout/__tests__/sidebar-nav.test.tsx @@ -133,15 +133,15 @@ describe(" targets deprecation (v1.8.6)", () => { }); describe(" unified destination model (v1.17.1 F-1 / F-3)", () => { - it("surfaces Workouts and the Coach as first-class sidebar destinations", () => { - // Pre-unify the sidebar hid Workouts entirely and had no Coach home, - // while the mobile bar promoted Workouts and still missed Coach. Both - // now render the one shared model, so both carry both destinations. + it("surfaces the Coach as a first-class sidebar destination", () => { + // Pre-unify the sidebar had no Coach home while the mobile bar missed + // it too; both now render the one shared model so both carry it. + // (v1.18.0 — Workouts left the left nav for its Insights pill, so it is + // no longer a sidebar destination.) const html = render(); - expect(html).toContain('href="/insights/workouts"'); expect(html).toContain('href="/coach"'); - expect(html).toContain("Workouts"); expect(html).toContain("Coach"); + expect(html).not.toContain('href="/insights/workouts"'); }); it("marks Coach active without also marking Insights active", () => { diff --git a/src/components/layout/nav-model.ts b/src/components/layout/nav-model.ts index 5fce0b12b..7af0a288c 100644 --- a/src/components/layout/nav-model.ts +++ b/src/components/layout/nav-model.ts @@ -3,7 +3,6 @@ import { Bell, Bug, Droplets, - Dumbbell, FlaskConical, Home, Lightbulb, @@ -92,15 +91,10 @@ export const NAV_DESTINATIONS: ReadonlyArray = [ icon: Stethoscope, tourId: "nav-vorsorge", }, - { - href: "/insights/workouts", - tKey: "nav.workouts", - icon: Dumbbell, - tourId: "nav-workouts", - }, - // v1.18.0 — Recovery left the left-nav: it surfaces as an Insights pill - // (`/insights/recovery`) rather than a top-level destination, so it no - // longer appears in `NAV_DESTINATIONS`. + // v1.18.0 — Workouts and Recovery both left the left-nav: each already + // surfaces as an Insights tab-strip pill (`/insights/workouts` gated on + // a workout row, `/insights/recovery` always present), so neither is a + // top-level `NAV_DESTINATIONS` entry any more. { href: "/insights", tKey: "nav.insights",