diff --git a/src/app/insights/__tests__/ecg-cross-link-mount.test.tsx b/src/app/insights/__tests__/ecg-cross-link-mount.test.tsx index 70452e7b1..13bebd8e8 100644 --- a/src/app/insights/__tests__/ecg-cross-link-mount.test.tsx +++ b/src/app/insights/__tests__/ecg-cross-link-mount.test.tsx @@ -89,12 +89,12 @@ describe("EcgCrossLink mount on Heart sub-pages (H1)", () => { it("mounts the ECG cross-link on the resting-pulse page", () => { const html = render(); expect(html).toContain('data-slot="ecg-cross-link"'); - expect(html).toContain('href="/insights#ecg"'); + expect(html).toContain('href="/insights/ecg"'); }); it("mounts the ECG cross-link on the HRV page", () => { const html = render(); expect(html).toContain('data-slot="ecg-cross-link"'); - expect(html).toContain('href="/insights#ecg"'); + expect(html).toContain('href="/insights/ecg"'); }); }); diff --git a/src/components/insights/__tests__/ecg-cross-link.test.tsx b/src/components/insights/__tests__/ecg-cross-link.test.tsx index b5aa7a7d8..c9a4c9509 100644 --- a/src/components/insights/__tests__/ecg-cross-link.test.tsx +++ b/src/components/insights/__tests__/ecg-cross-link.test.tsx @@ -62,7 +62,7 @@ describe("", () => { hasRecordings: true, }); expect(html).toContain('data-slot="ecg-cross-link"'); - expect(html).toContain('href="/insights#ecg"'); + expect(html).toContain('href="/insights/ecg"'); expect(html).toContain("2 recordings on file."); // The latest (first) recording's DEVICE result, attributed to the device. expect(html).toContain("Latest device result:"); diff --git a/src/components/insights/ecg-cross-link.tsx b/src/components/insights/ecg-cross-link.tsx index 8fe779456..7121f87c8 100644 --- a/src/components/insights/ecg-cross-link.tsx +++ b/src/components/insights/ecg-cross-link.tsx @@ -13,7 +13,9 @@ import { TileHeader } from "@/components/insights/tile-header"; /** * S10 — ECG cross-link, the pointer from the resting-HR / pulse context into - * the ECG viewer (`/insights#ecg`). + * the ECG viewer (`/insights/ecg`). Points at the routed sub-page, which + * always mounts, rather than the overview `#ecg` fragment, which is absent + * until the overview section's own fetch resolves (UX-flows finding F1-1). * * NON-DIAGNOSTIC (load-bearing, mirrors `EcgSection` / `RhythmEventsCard`): the * card surfaces ONLY that recordings exist + the RECORDING DEVICE's OWN latest @@ -86,7 +88,7 @@ export function EcgCrossLink({ enabled = true, className }: EcgCrossLinkProps) { return (