style: apply prettier 3.9.1 formatting

Mechanical reflow from the prettier 3.9.1 bump; no behaviour change.
This commit is contained in:
Marc-André Bombeck committed 2026-06-28 19:26:16 +02:00
1 parent 6329540ade
commit 0f2b548138
90 files changed
+123 -406

No files matched your search

+1 -5
View File
@@ -279,11 +279,7 @@ export function useAuthActionLabels(): Record<string, string> {
* mirroring the convention established by `useAuthActionLabels`.
*/
export type AuthProvider =
| "password"
| "passkey"
| "api_token"
| "withings"
| "unknown";
"password" | "passkey" | "api_token" | "withings" | "unknown";
export function providerForAction(action: string): AuthProvider {
if (
+3 -6
View File
@@ -494,8 +494,7 @@ export function resolveVerticalMarkerPositions(
export function resolveAnnotationPositions(
annotations:
| Array<{ date: string; label: string; color: string }>
| undefined,
Array<{ date: string; label: string; color: string }> | undefined,
chartData: Array<{ timestamp: number }> | undefined,
): ResolvedAnnotation[] {
if (!annotations || !chartData || chartData.length === 0) return [];
@@ -2021,8 +2020,7 @@ export function HealthChart({
// current ↔ compare values come from the SAME
// payload object.
const hoverPoint = payload[0]?.payload as
| ChartDataPoint
| undefined;
ChartDataPoint | undefined;
for (const item of payload) {
if (typeof item.value !== "number") continue;
const dataKey = String(item.dataKey ?? "");
@@ -2047,8 +2045,7 @@ export function HealthChart({
const compareValue =
effectiveCompareBaseline !== "none" && hoverPoint
? (hoverPoint[`${dataKey}_compare`] as
| number
| undefined)
number | undefined)
: undefined;
if (
effectiveCompareBaseline !== "none" &&
+1 -2
View File
@@ -840,8 +840,7 @@ export function MoodChart({
const dateLabel = ts ? tzFmt.date(new Date(ts)) : "";
const rows: RichTooltipRow[] = [];
const hoverPoint = payload[0]?.payload as
| ChartDataPoint
| undefined;
ChartDataPoint | undefined;
for (const item of payload) {
if (typeof item.value !== "number") continue;
const dataKey = String(item.dataKey ?? "");
@@ -19,14 +19,7 @@ import { cn } from "@/lib/utils";
*/
export type CyclePhaseCrosstabDisplay =
| "hours"
| "steps"
| "bpm"
| "ms"
| "kg"
| "celsius"
| "glucose"
| "mood";
"hours" | "steps" | "bpm" | "ms" | "kg" | "celsius" | "glucose" | "mood";
export type CyclePhaseCrosstabConfidence = "low" | "medium" | "high";
+2 -9
View File
@@ -10,17 +10,10 @@ export type CyclePhase = "MENSTRUAL" | "FOLLICULAR" | "OVULATORY" | "LUTEAL";
export type FlowLevel = "NONE" | "SPOTTING" | "LIGHT" | "MEDIUM" | "HEAVY";
export type OvulationTest =
| "NEGATIVE"
| "POSITIVE_LH_SURGE"
| "ESTROGEN_SURGE"
| "INDETERMINATE";
"NEGATIVE" | "POSITIVE_LH_SURGE" | "ESTROGEN_SURGE" | "INDETERMINATE";
export type CervicalMucus =
| "DRY"
| "STICKY"
| "CREAMY"
| "WATERY"
| "EGG_WHITE";
"DRY" | "STICKY" | "CREAMY" | "WATERY" | "EGG_WHITE";
export type CycleGoal =
| "GENERAL_HEALTH"
@@ -27,10 +27,7 @@ import { MedicationIntakeQuickAdd } from "@/components/dashboard/medication-inta
import { useTranslations } from "@/lib/i18n/context";
export type QuickEntryDialog =
| "measurement"
| "mood"
| "medicationIntake"
| null;
"measurement" | "mood" | "medicationIntake" | null;
/**
* v1.11.3 F3 — guard the quick-entry sheets against an accidental
+1 -4
View File
@@ -13,10 +13,7 @@ export type IllnessType =
| "OTHER";
export type IllnessLifecycle =
| "ACUTE"
| "CHRONIC_ONGOING"
| "RECURRING"
| "FLARE";
"ACUTE" | "CHRONIC_ONGOING" | "RECURRING" | "FLARE";
export interface IllnessSymptomSelection {
key: string;
@@ -36,11 +36,7 @@
/** Lifecycle of one answered question's adopt offer. */
export type GuidedAdoption =
| "pending"
| "adopted"
| "duplicate"
| "declined"
| "failed";
"pending" | "adopted" | "duplicate" | "declined" | "failed";
export interface GuidedOutcome {
/** Index of the question in the session snapshot (progress label). */
@@ -1046,8 +1046,7 @@ interface ChatBubbleProps {
* bubble falls back to that so the card survives reload.
*/
suggestedAction?:
| import("@/lib/ai/coach/suggest-action").CoachSuggestedAction
| null;
import("@/lib/ai/coach/suggest-action").CoachSuggestedAction | null;
providerType?: string | null;
inProgress?: boolean;
errorCode?: string | null;
@@ -72,8 +72,7 @@ export function GlucoseClinicalPanel() {
if (!clinical) return null;
const byContext = query.data?.glucoseByContext as
| Record<string, DataSummary>
| undefined;
Record<string, DataSummary> | undefined;
const formatGlucoseValue = (mgdl: number): string => {
const v = convertGlucose(mgdl, glucoseUnit);
@@ -47,11 +47,7 @@ export type HealthScoreBand = "green" | "yellow" | "red";
* client doesn't pull a heavy analytics import for one string union).
*/
export type HealthScoreComponentSource =
| "manual"
| "withings"
| "appleHealth"
| "mixed"
| "none";
"manual" | "withings" | "appleHealth" | "mixed" | "none";
export interface HealthScoreCardComponent {
value: number | null;
+1 -5
View File
@@ -23,11 +23,7 @@ import type { DailyBriefing as DailyBriefingPayload } from "@/lib/ai/schema";
* `insights.derived.composite.READINESS.component.{key}` labels.
*/
export type ReadinessContributorKey =
| "rhr"
| "hrv"
| "sleep"
| "respiratory"
| "mood";
"rhr" | "hrv" | "sleep" | "respiratory" | "mood";
/**
* Insights redesign hero strip.
@@ -86,12 +86,7 @@ export interface InsightsTabStripProps {
* mounts / no regenerate) falls back to the prior unconditional success.
*/
regenerateOutcome?:
| "fresh"
| "empty"
| "rate-limited"
| "timeout"
| "no-provider"
| null;
"fresh" | "empty" | "rate-limited" | "timeout" | "no-provider" | null;
/**
* v1.4.27 F19 — analytics + event-driven availability inputs the
* gating helper reads. When omitted the strip falls back to its
@@ -21,13 +21,7 @@ import type { MoodInfluenceConfidence } from "./mood-tag-influence";
*/
export type MoodFactorCrosstabDisplay =
| "hours"
| "score"
| "steps"
| "bpm"
| "ms"
| "kg"
| "mmHg";
"hours" | "score" | "steps" | "bpm" | "ms" | "kg" | "mmHg";
export type MoodFactorCrosstabMode = "sameDay" | "nextDay";
export interface MoodFactorMetricCrosstabRow {
@@ -18,10 +18,7 @@ import { useTranslations } from "@/lib/i18n/context";
*/
export type MoodStabilityBand =
| "verySteady"
| "steady"
| "variable"
| "veryVariable";
"verySteady" | "steady" | "variable" | "veryVariable";
export interface MoodStabilityData {
score: number;
@@ -118,8 +118,7 @@ export function MoodTimeOfDayChart({
labelStyle={{ color: "var(--dracula-fg)" }}
formatter={(_value, _name, item) => {
const payload = item?.payload as
| { avgScore: number | null; count: number }
| undefined;
{ avgScore: number | null; count: number } | undefined;
if (!payload || payload.avgScore == null) {
return [t("insights.mood.weekdayNoData"), ""];
}
@@ -125,8 +125,7 @@ export function MoodWeekdayChart({ weekday }: { weekday: MoodWeekdayRow[] }) {
labelStyle={{ color: "var(--dracula-fg)" }}
formatter={(_value, _name, item) => {
const payload = item?.payload as
| { avgScore: number | null; count: number }
| undefined;
{ avgScore: number | null; count: number } | undefined;
if (!payload || payload.avgScore == null) {
return [t("insights.mood.weekdayNoData"), ""];
}
@@ -217,8 +217,7 @@ function RationaleCard({
}: {
rationale: InsightRecommendationRationale;
metricSource:
| { type: string; timeRange: string; summary: string }
| undefined;
{ type: string; timeRange: string; summary: string } | undefined;
referenceId: string | undefined;
confidence: number | undefined;
locale: Locale;
@@ -147,11 +147,7 @@ export function nextAdvisorPollInterval(
* means only the transient 503 surface (provider chain unavailable).
*/
export type AdvisorFetchOutcome =
| "fresh"
| "empty"
| "rate-limited"
| "timeout"
| "no-provider";
"fresh" | "empty" | "rate-limited" | "timeout" | "no-provider";
interface AdvisorFetchResult {
payload: InsightAdvisorPayload | null;
+1 -2
View File
@@ -188,8 +188,7 @@ export function LabBiomarkerChart({
content={(props) => {
const active = props.active ?? false;
const payload = props.payload as
| ReadonlyArray<{ payload?: ChartPoint }>
| undefined;
ReadonlyArray<{ payload?: ChartPoint }> | undefined;
const point = payload?.[0]?.payload;
if (!active || !point) {
return <RichChartTooltip active={false} rows={[]} />;
@@ -133,8 +133,7 @@ describe("runRecordIntake — shared C1 failure toast + C2 Undo", () => {
const [message, opts] = vi.mocked(toast.success).mock.calls[0];
expect(message).toBe("medications.intakeToastTaken:Mounjaro");
const action = opts?.action as
| { label: string; onClick: (e: never) => void }
| undefined;
{ label: string; onClick: (e: never) => void } | undefined;
expect(action?.label).toBe("medications.intakeUndo");
// Firing the action calls undoIntake with the just-created event id.
@@ -98,10 +98,7 @@ export interface TableMedication {
}
export type MedicationTableSortColumn =
| "name"
| "nextDue"
| "compliance"
| "stock";
"name" | "nextDue" | "compliance" | "stock";
export interface MedicationTableSort {
column: MedicationTableSortColumn;
@@ -144,9 +144,7 @@ export function ScheduleTimesEditor({
...(s.scheduleType
? {
scheduleType: s.scheduleType as
| "SCHEDULED"
| "PRN"
| "CYCLIC",
"SCHEDULED" | "PRN" | "CYCLIC",
}
: {}),
...(typeof s.cyclicOnWeeks === "number"
@@ -107,9 +107,7 @@ export function GraceRow({
...(s.scheduleType
? {
scheduleType: s.scheduleType as
| "SCHEDULED"
| "PRN"
| "CYCLIC",
"SCHEDULED" | "PRN" | "CYCLIC",
}
: {}),
...(typeof s.cyclicOnWeeks === "number"
+1 -5
View File
@@ -25,11 +25,7 @@ import type { LucideIcon } from "lucide-react";
import { cn } from "@/lib/utils";
export type SettingsInfoTileTone =
| "info"
| "warning"
| "success"
| "primary"
| "neutral";
"info" | "warning" | "success" | "primary" | "neutral";
const TONE_SURFACE: Record<SettingsInfoTileTone, string> = {
info: "border-info/40 bg-info/10",
@@ -47,8 +47,7 @@ export function resolveInitialTimezone(
* provided error text (which has no key) rides `text` verbatim.
*/
export type StatusMessage =
| { key: string; params?: Record<string, string | number> }
| { text: string };
{ key: string; params?: Record<string, string | number> } | { text: string };
export function statusText(
msg: StatusMessage,
@@ -45,11 +45,7 @@ import { cn } from "@/lib/utils";
* - disconnected → user clicked Disconnect; "Not connected" copy.
*/
export type IntegrationPillState =
| "connected"
| "warning"
| "error"
| "parked"
| "disconnected";
"connected" | "warning" | "error" | "parked" | "disconnected";
interface IntegrationStatusPillProps {
state: IntegrationPillState;
@@ -52,8 +52,7 @@ const WITHINGS_OAUTH_ERROR_KEYS: Record<string, string> = {
};
type WithingsOauthOutcome =
| { kind: "connected" }
| { kind: "error"; reason: string };
{ kind: "connected" } | { kind: "error"; reason: string };
/**
* The OAuth providers whose callbacks redirect back to the settings page with a
@@ -23,12 +23,7 @@ import { useTranslations } from "@/lib/i18n/context";
export const INTEGRATION_DOCS_BASE = "https://docs.healthlog.dev/integrations";
export type IntegrationDocsProvider =
| "whoop"
| "withings"
| "fitbit"
| "polar"
| "oura"
| "nightscout";
"whoop" | "withings" | "fitbit" | "polar" | "oura" | "nightscout";
export function integrationDocsHref(provider: IntegrationDocsProvider): string {
return `${INTEGRATION_DOCS_BASE}/${provider}`;
@@ -19,18 +19,9 @@ import { queryKeys } from "@/lib/query-keys";
// IntegrationStatusPill now owns state + last-sync presentation, and
// the actionable error message is shown inline above the action row.
export type IntegrationKey =
| "withings"
| "whoop"
| "fitbit"
| "moodlog"
| "polar"
| "oura";
"withings" | "whoop" | "fitbit" | "moodlog" | "polar" | "oura";
export type IntegrationState =
| "connected"
| "error_transient"
| "error_reauth"
| "disconnected"
| "parked";
"connected" | "error_transient" | "error_reauth" | "disconnected" | "parked";
export interface IntegrationStatusViewModel {
integration: IntegrationKey;
@@ -41,10 +41,7 @@ import { apiGet, apiPost } from "@/lib/api/api-fetch";
type ChannelType = "TELEGRAM" | "NTFY" | "WEB_PUSH" | "APNS";
type ChannelState =
| "active"
| "auto_disabled"
| "manually_disabled"
| "sending_paused";
"active" | "auto_disabled" | "manually_disabled" | "sending_paused";
interface ChannelStatus {
id: string;