Files
HealthLog/src/app/insights/layout.tsx
T
Marc-André Bombeck 3d95ace218 feat(ui): an always-there coach button and a tidied insights chrome
A round coach button sits fixed bottom-right on every authenticated
page, above the bottom nav and safe-area inset, with a small dot when a
nudge is unread — replacing the bubble that only existed while a nudge
was pending. The per-chart target-adjust link is gone (the page-level
control remains), the duplicated customize entry on insights sub-pages
collapses onto the tab strip, and the full-width show-all-values foot
button becomes an icon beside the target control. The tab strip's
scroll container keeps four pixels of paint room so pill borders and
focus rings stop clipping at fractional zoom, and the mood tag
breakdown bars adopt the muted opacity the other mood charts use.
2026-06-11 22:12:06 +02:00

33 lines
1.5 KiB
TypeScript

import type { ReactNode } from "react";
import { InsightsLayoutShell } from "@/components/insights/insights-layout-shell";
/**
* v1.4.25 W4 — shared layout for the routed `/insights` sub-pages.
*
* Hosts the sticky `<InsightsTabStrip>` so the metric pills + (mother-
* page-only) regenerate affordance stay reachable while a user drills
* into a sub-page. The actual page body still owns its own data fetches
* — the layout is a thin presentational frame.
*
* v1.4.27 R3d MB4 — the Coach drawer mounts above the routed children
* inside a `<CoachLaunchProvider>` so navigating into a sub-page no
* longer unmounts the drawer. Every sub-page mounts a
* `<CoachLaunchButton>` that calls `askCoach()` on the same context;
* the mother `/insights/page.tsx` consumes the same hook for its hero
* strip + suggested-prompt chips.
*
* v1.4.34 IW-B — `<CoachLaunchProvider>` + `<LayoutCoachMount>` now
* live on the global `<AuthShell>` (`src/components/layout/auth-shell.tsx`)
* so every authenticated route (dashboard included) can open the drawer
* from the same context.
*
* v1.16.8 — the floating Coach launcher (`LayoutCoachFab`) moved to
* `<AuthShell>` as well: it renders once for every authenticated route
* and hides itself on the Coach page, so this layout no longer mounts
* any Coach surface of its own.
*/
export default function InsightsLayout({ children }: { children: ReactNode }) {
return <InsightsLayoutShell>{children}</InsightsLayoutShell>;
}