mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
feat(insights): render signals of the day and remove the overview ask-coach block
Render the new signalsOfDay list at the top of the daily-briefing card — a present-focused row (headline + concrete nudge) sharing the tone bar, metric icon, and sub-page routing of the key-finding row, with matching typography (text-sm headline, text-xs muted body) so the card reads consistently with the rest of the insight surfaces. Add the signalsTitle string across all six locales. Remove the "Ask the coach" action button and the guided-questions chip strip from the overview hero band: the Coach stays the bottom-right drawer mounted by the insights layout shell. The hero is now greeting + subtitle + baseline meta + the optional Health Score panel, and no longer reads the coach flags or the launch context. Update the coach-cascade / disable-cascade fixtures and the hero-strip slot tests to pin the affordances absent.
This commit is contained in:
1 parent
0b01bfb483
commit
f931f2f5c2
12 files changed
+156
-209
No files matched your search
@@ -24,7 +24,6 @@ import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { HeroStrip } from "@/components/insights/hero-strip";
|
||||
import { useInsightsAdvisorQuery } from "@/components/insights/use-insights-advisor";
|
||||
import { useCoachLaunch } from "@/lib/insights/coach-launch-context";
|
||||
import { useAnalyticsQuery } from "@/lib/queries/use-analytics-query";
|
||||
import { useDashboardDerived } from "@/components/insights/derived/use-dashboard-derived";
|
||||
// v1.4.41 W-ORG — shared shape lives in `src/types/analytics.ts` as
|
||||
@@ -234,11 +233,11 @@ export default function InsightsPage() {
|
||||
useScrollResetOnRoute();
|
||||
|
||||
// v1.4.27 R3d MB4 — Coach drawer state lives in the layout-level
|
||||
// `<CoachLaunchProvider>` so every routed sub-page can reach it.
|
||||
// The hero strip + suggested-prompt chips call `askCoach(prefill)`
|
||||
// on the same context, and the drawer itself is mounted next to
|
||||
// the provider in `src/app/insights/layout.tsx`.
|
||||
const coachLaunch = useCoachLaunch();
|
||||
// `<CoachLaunchProvider>`; the drawer is mounted next to the provider in
|
||||
// `src/app/insights/layout.tsx`. v1.18.7 removed the hero-band coach
|
||||
// entry points (the action button + suggested-prompt chips), so the
|
||||
// overview page no longer reads the launch context — the drawer + its
|
||||
// own launcher stay untouched.
|
||||
const flags = useFeatureFlags();
|
||||
|
||||
// v1.4.36 W1 — drop the page-level `isLoading` gate that used to
|
||||
@@ -471,14 +470,6 @@ export default function InsightsPage() {
|
||||
briefing={briefingPayload}
|
||||
updatedAt={heroStripUpdatedAt}
|
||||
userName={heroGreetingName}
|
||||
onAskCoach={
|
||||
coachLaunch
|
||||
? (prefill?: string) => coachLaunch.askCoach(prefill ?? null)
|
||||
: undefined
|
||||
}
|
||||
onPickPrompt={
|
||||
coachLaunch ? (prompt) => coachLaunch.askCoach(prompt) : undefined
|
||||
}
|
||||
healthScore={analytics?.healthScore ?? undefined}
|
||||
// v1.16.8 — reserve the score card's column while the thick
|
||||
// analytics payload is in flight. Every overview query
|
||||
|
||||
Reference in new issue
Block a user