diff --git a/src/app/insights/sleep/page.tsx b/src/app/insights/sleep/page.tsx index f8e779af6..101b49d4d 100644 --- a/src/app/insights/sleep/page.tsx +++ b/src/app/insights/sleep/page.tsx @@ -117,13 +117,16 @@ export default function InsightsSchlafPage() { /> {/* - v1.17.0 — sleep-debt headline. Server-authoritative (the same DTO iOS - renders), gated on the data-bearing branch so a source-less account - never fetches. v1.18.7 W-D — the chronotype moved out to the prominent - bottom block (`` below); this section is the - sleep-debt headline alone. + v1.17.0 — sleep-debt headline + v1.18.7 W-D chronotype, paired in one + shared row. Both read the same server-authoritative `["sleep-rhythm"]` + cache (one fetch), so the grid adds no round-trip. They stack on narrow + viewports and sit side-by-side from `sm` up; each card keeps its own + internals (the debt headline and the chronotype band treatment). */} - +
+ + +
{/* v1.17.1 — "Sleep quality" block. Surfaces the WHOOP / Oura nightly @@ -137,15 +140,6 @@ export default function InsightsSchlafPage() { - - {/* - v1.18.7 W-D — chronotype as the PROMINENT bottom treatment of the - Sleep view (maintainer directive): a large band label with the natural - sleep-midpoint clock beneath it and an expandable disclosure for social - jetlag + MSFsc. Reads the same `["sleep-rhythm"]` cache the debt section - warmed, so it adds no round-trip; gated on the data-bearing branch. - */} - ); } diff --git a/src/components/insights/__tests__/layout-coach-fab.test.tsx b/src/components/insights/__tests__/layout-coach-fab.test.tsx index 02183430a..767dca039 100644 --- a/src/components/insights/__tests__/layout-coach-fab.test.tsx +++ b/src/components/insights/__tests__/layout-coach-fab.test.tsx @@ -71,7 +71,7 @@ describe("", () => { expect(html).not.toContain("lg:bottom-6"); }); - it("paints a white glyph + offset focus ring on the gradient", () => { + it("paints the on-accent glyph + offset focus ring on the gradient", () => { mockPathname = "/"; const html = render( @@ -79,10 +79,11 @@ describe("", () => { , ); // The glyph is decorative (aria-hidden) and the button carries its own - // accessible name, so the text-contrast rule does not gate it; the - // white glyph reads as a clean mark on the gradient. The button still - // sets text-background for any non-glyph text it might hold. - expect(html).toContain("text-white"); + // accessible name, so the text-contrast rule does not gate it; the glyph + // shares the button's own on-accent token (text-background) rather than a + // harsh pure white, so it reads as a softer mark on the gradient. + expect(html).not.toContain("text-white"); + expect(html).toMatch(/lucide-sparkles[^"]*text-background/); // The offset ring draws a visible halo around the gradient circle and // provides the non-text UI-component contrast against the page. expect(html).toContain("focus-visible:ring-offset-2"); diff --git a/src/components/insights/layout-coach-fab.tsx b/src/components/insights/layout-coach-fab.tsx index 7eb903ad5..e59d77802 100644 --- a/src/components/insights/layout-coach-fab.tsx +++ b/src/components/insights/layout-coach-fab.tsx @@ -238,7 +238,7 @@ export function LayoutCoachFab() { "[body:has([data-testid=onboarding-tour])_&]:invisible", )} > -