mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
chore(format): prettier sweep across develop
Mostly table column normalisation under docs/audit/ + planning, object- literal expansion in src/lib/ai/coach/snapshot.ts after the W4 F6 Apple Health metric block landed, and small wrap/unwrap line adjustments in the device + APNs routes / tests touched across W3/W4/W5 sessions. No behavioural change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5dcd3954a0
commit
f1e6630958
70 files changed
+899
-660
No files matched your search
@@ -97,7 +97,10 @@ describe("<AdminShell>", () => {
|
||||
// missing from the nav even though the slug + page + i18n shipped.
|
||||
const navSlugs = new Set(ADMIN_SECTIONS.map((s) => s.slug));
|
||||
for (const slug of ADMIN_SECTION_SLUGS) {
|
||||
expect(navSlugs.has(slug), `ADMIN_SECTIONS missing nav entry for ${slug}`).toBe(true);
|
||||
expect(
|
||||
navSlugs.has(slug),
|
||||
`ADMIN_SECTIONS missing nav entry for ${slug}`,
|
||||
).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -124,7 +127,9 @@ describe("<AdminShell>", () => {
|
||||
// filesystem read isn't accidentally noop'd by a future tree-
|
||||
// shaker pass.
|
||||
expect(
|
||||
statSync(join(process.cwd(), "src/app/admin/[section]/page.tsx")).isFile(),
|
||||
statSync(
|
||||
join(process.cwd(), "src/app/admin/[section]/page.tsx"),
|
||||
).isFile(),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
@@ -109,7 +109,9 @@ export function nextResettableValue<T>(
|
||||
previous: T,
|
||||
incoming: T,
|
||||
): { reset: true; value: T } | { reset: false } {
|
||||
return Object.is(previous, incoming) ? { reset: false } : { reset: true, value: incoming };
|
||||
return Object.is(previous, incoming)
|
||||
? { reset: false }
|
||||
: { reset: true, value: incoming };
|
||||
}
|
||||
|
||||
export function CoachDrawer({
|
||||
|
||||
@@ -130,7 +130,7 @@ export function CoachSettingsSheet({
|
||||
<SheetContent
|
||||
side="right"
|
||||
data-slot="coach-settings-sheet"
|
||||
className="w-full p-0 sm:max-w-[420px] flex h-[100dvh] flex-col gap-0"
|
||||
className="flex h-[100dvh] w-full flex-col gap-0 p-0 sm:max-w-[420px]"
|
||||
>
|
||||
<SheetHeader className="border-border/70 border-b p-4 pr-12">
|
||||
<SheetTitle className="text-sm font-semibold">
|
||||
@@ -171,10 +171,7 @@ export function CoachSettingsSheet({
|
||||
<div className="flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto p-4">
|
||||
{/* Tone */}
|
||||
<div className="flex flex-col gap-2">
|
||||
<Label
|
||||
htmlFor="coach-prefs-tone"
|
||||
className="text-xs font-medium"
|
||||
>
|
||||
<Label htmlFor="coach-prefs-tone" className="text-xs font-medium">
|
||||
{t("insights.coach.settingsToneLabel")}
|
||||
</Label>
|
||||
<Select
|
||||
@@ -267,9 +264,7 @@ export function CoachSettingsSheet({
|
||||
id={id}
|
||||
data-slot={`coach-prefs-exclude-${metric}`}
|
||||
checked={checked}
|
||||
onCheckedChange={(next) =>
|
||||
toggleExclude(metric, next)
|
||||
}
|
||||
onCheckedChange={(next) => toggleExclude(metric, next)}
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
@@ -323,10 +318,7 @@ export function CoachSettingsSheet({
|
||||
data-slot="coach-prefs-save"
|
||||
>
|
||||
{save.isPending ? (
|
||||
<Loader2
|
||||
className="size-3.5 animate-spin"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<Loader2 className="size-3.5 animate-spin" aria-hidden="true" />
|
||||
) : null}
|
||||
{t("insights.coach.settingsSave")}
|
||||
</Button>
|
||||
|
||||
@@ -444,10 +444,7 @@ function CoachMessageFeedback({ messageId }: CoachMessageFeedbackProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
data-slot="coach-message-feedback"
|
||||
className="flex items-center gap-2"
|
||||
>
|
||||
<div data-slot="coach-message-feedback" className="flex items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
data-slot="coach-message-feedback-helpful"
|
||||
|
||||
@@ -94,9 +94,7 @@ describe("MeasurementList — APPLE_HEALTH badge", () => {
|
||||
// duplicate hand-entries on top of synced rows. Both branches must
|
||||
// carry the badge so the surface is honest at every viewport.
|
||||
const html = render("en");
|
||||
const matches = html.match(
|
||||
/data-testid="measurement-source-badge"/g,
|
||||
);
|
||||
const matches = html.match(/data-testid="measurement-source-badge"/g);
|
||||
expect(matches?.length ?? 0).toBe(2);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user