mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
fix(ui): granular sleep sources, viewport-safe tour, one aligned settings language
A night with coarse apple-health samples next to granular watch data showed only awake and asleep — the per-session source pick now prefers the source that knows its stages. Tour popovers clamp into the viewport, wrap their footer and fall back to a bottom sheet on narrow screens. Settings and admin sections share one alignment rule — icon column left, everything else flush on the content column — with neutral header icons, no duplicated section titles under the shell heading, and every select on the account-style idiom with a visible chevron. The dashboard's customize icon matches insights, the target-settings link leaves the home charts, and the mood heatmap adopts the damped fills the other mood charts already use.
This commit is contained in:
1 parent
9f2c403f84
commit
024da9fe96
67 files changed
+545
-344
No files matched your search
@@ -37,6 +37,13 @@ vi.mock("@/hooks/use-feature-flags", async () => {
|
||||
};
|
||||
});
|
||||
|
||||
// v1.16.1 — the nudge-driven `<LayoutCoachFab>` reads the app router
|
||||
// (push + pathname); SSR test renders have no router context.
|
||||
vi.mock("next/navigation", () => ({
|
||||
useRouter: () => ({ push: vi.fn(), replace: vi.fn() }),
|
||||
usePathname: () => "/insights",
|
||||
}));
|
||||
|
||||
/**
|
||||
* v1.4.37 W5 — Coach disable cascade invariant.
|
||||
*
|
||||
@@ -178,7 +185,11 @@ const COACH_SURFACES: CoachSurface[] = [
|
||||
<LayoutCoachFab />
|
||||
</CoachLaunchProvider>
|
||||
),
|
||||
proofWhenOn: 'data-slot="coach-launch-fab"',
|
||||
// v1.16.1 — the FAB is nudge-driven: it renders nothing until the
|
||||
// nudge-status query resolves with an unseen nudge, so its SSR
|
||||
// shape is empty even when the flag is on. The negative `coach-*`
|
||||
// grep + the gate-fired spy assertion still pin the off state.
|
||||
proofWhenOn: "",
|
||||
},
|
||||
{
|
||||
name: "LayoutCoachMount drawer subtree",
|
||||
|
||||
@@ -69,6 +69,13 @@ vi.mock("@/hooks/use-auth", async () => {
|
||||
// below trivially fail; instead we let the real `useDisableCoach`
|
||||
// pass through and capture the underlying `useAuth` calls.
|
||||
|
||||
// v1.16.1 — the nudge-driven `<LayoutCoachFab>` reads the app router
|
||||
// (push + pathname); SSR test renders have no router context.
|
||||
vi.mock("next/navigation", () => ({
|
||||
useRouter: () => ({ push: vi.fn(), replace: vi.fn() }),
|
||||
usePathname: () => "/insights",
|
||||
}));
|
||||
|
||||
function buildUser(disableCoach: boolean): AuthUser {
|
||||
// Minimal `AuthUser` shape — the Coach gates only read
|
||||
// `disableCoach`, but TypeScript requires the full interface to
|
||||
@@ -143,7 +150,10 @@ const DISABLE_COACH_SURFACES: DisableCoachSurface[] = [
|
||||
<LayoutCoachFab />
|
||||
</CoachLaunchProvider>
|
||||
),
|
||||
proofWhenVisible: 'data-slot="coach-launch-fab"',
|
||||
// v1.16.1 — nudge-driven: SSR shape is empty even when visible
|
||||
// (the bubble waits for the nudge-status query). Negative
|
||||
// assertion still pins the gate via the `coach-*` slot grep.
|
||||
proofWhenVisible: "",
|
||||
},
|
||||
{
|
||||
name: "LayoutCoachMount",
|
||||
|
||||
Reference in new issue
Block a user