diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1cdff5f88..88175601c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,21 @@
## [Unreleased]
-## [1.15.3] — 2026-06-06 — cycle summary on the insights page
+## [1.15.4] — 2026-06-06 — cycle and insights polish
+
+### Added
+
+- **Your cycle ring in the health-scores strip.** With cycle tracking on, the Insights health-scores row now includes your cycle ring — current phase and day — alongside the other scores. It shows only when cycle tracking is enabled.
+
+### Changed
+
+- **A calmer cycle calendar and cards.** Predicted-period days are now a soft filled marker instead of a thin underline; the "what's happening now" card sits only under the ring (no duplicate above the calendar) and drops its own log button since logging is one tap away at the top; and the predictions and insights tabs lost their repeated "estimates / associations" footers (the caveat is stated once, where it matters).
+- **Tidier settings.** Section descriptions line up under their headings; the web-push enable action sits in the card header; and the standalone cycle-data export/delete actions are gone from the cycle settings (cycle data is already in the full export).
+- **Calendar tiles keep their size.** The mood and medication calendar tiles no longer balloon to several times the height of their neighbours when only a short window or a single medication is shown.
+
+### Fixed
+
+- **Per-score explanations load faster.** The dashboard's batch read now carries each score's deterministic explanation, so the score sheets show their "why" without an extra request.
### Added
diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml
index bf6491b75..36661381f 100644
--- a/docs/api/openapi.yaml
+++ b/docs/api/openapi.yaml
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: HealthLog API
- version: 1.15.3
+ version: 1.15.4
description: >-
Self-hosted personal-health-tracking PWA — public API surface for the iOS native client and external ingest.
diff --git a/messages/de.json b/messages/de.json
index b4de1c4bb..bed6128bc 100644
--- a/messages/de.json
+++ b/messages/de.json
@@ -4999,6 +4999,9 @@
"noActiveCycle": "Noch kein aktiver Zyklus",
"viewDetails": "Zyklus-Erkenntnisse ansehen"
},
+ "wellnessRing": {
+ "label": "Zyklus"
+ },
"disclaimer": "Diese Vorhersagen sind beschreibende Schätzungen aus deinen erfassten Daten, keine Verhütungsmethode und keine medizinische Beratung. Sie zeigen nie an, dass ungeschützter Geschlechtsverkehr sicher ist. Wende dich für Verhütung oder medizinische Entscheidungen an eine medizinische Fachperson.",
"title": "Dein Zyklus",
"subtitle": "Erfasse deine Periode und Symptome und sieh, was als Nächstes kommt.",
diff --git a/messages/en.json b/messages/en.json
index 65956ba5c..d9d9a08ba 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -4999,6 +4999,9 @@
"noActiveCycle": "No active cycle yet",
"viewDetails": "View cycle insights"
},
+ "wellnessRing": {
+ "label": "Cycle"
+ },
"disclaimer": "These predictions are descriptive estimates from your logged data, not a contraceptive method and not medical advice. They never indicate that it is safe to have unprotected sex. For contraception or any medical decision, consult a healthcare professional.",
"title": "Your cycle",
"subtitle": "Log your period and symptoms, see what comes next.",
diff --git a/messages/es.json b/messages/es.json
index 55eeb130d..2629b9c90 100644
--- a/messages/es.json
+++ b/messages/es.json
@@ -4999,6 +4999,9 @@
"noActiveCycle": "Aún no hay un ciclo activo",
"viewDetails": "Ver análisis del ciclo"
},
+ "wellnessRing": {
+ "label": "Ciclo"
+ },
"disclaimer": "Estas predicciones son estimaciones descriptivas a partir de tus datos registrados, no un método anticonceptivo ni un consejo médico. Nunca indican que sea seguro tener relaciones sin protección. Para anticoncepción o cualquier decisión médica, consulta a un profesional sanitario.",
"title": "Tu ciclo",
"subtitle": "Registra tu periodo y síntomas, y mira qué viene después.",
diff --git a/messages/fr.json b/messages/fr.json
index ee4f7309b..f352bd636 100644
--- a/messages/fr.json
+++ b/messages/fr.json
@@ -4999,6 +4999,9 @@
"noActiveCycle": "Aucun cycle actif pour l'instant",
"viewDetails": "Voir les analyses du cycle"
},
+ "wellnessRing": {
+ "label": "Cycle"
+ },
"disclaimer": "Ces prévisions sont des estimations descriptives issues de vos données enregistrées, ni une méthode de contraception ni un avis médical. Elles n'indiquent jamais qu'il est sûr d'avoir des rapports non protégés. Pour la contraception ou toute décision médicale, consultez un professionnel de santé.",
"title": "Ton cycle",
"subtitle": "Enregistre tes règles et symptômes, et vois ce qui arrive ensuite.",
diff --git a/messages/it.json b/messages/it.json
index 367a129d5..a9325f736 100644
--- a/messages/it.json
+++ b/messages/it.json
@@ -4999,6 +4999,9 @@
"noActiveCycle": "Nessun ciclo attivo ancora",
"viewDetails": "Vedi le analisi del ciclo"
},
+ "wellnessRing": {
+ "label": "Ciclo"
+ },
"disclaimer": "Queste previsioni sono stime descrittive basate sui tuoi dati registrati, non un metodo contraccettivo né un parere medico. Non indicano mai che sia sicuro avere rapporti non protetti. Per la contraccezione o qualsiasi decisione medica, consulta un professionista sanitario.",
"title": "Il tuo ciclo",
"subtitle": "Registra il ciclo e i sintomi e scopri cosa arriva dopo.",
diff --git a/messages/pl.json b/messages/pl.json
index 6e5754dce..1e6fe6c4a 100644
--- a/messages/pl.json
+++ b/messages/pl.json
@@ -4999,6 +4999,9 @@
"noActiveCycle": "Brak aktywnego cyklu",
"viewDetails": "Zobacz analizy cyklu"
},
+ "wellnessRing": {
+ "label": "Cykl"
+ },
"disclaimer": "Te prognozy to opisowe szacunki na podstawie zapisanych danych, a nie metoda antykoncepcji ani porada medyczna. Nigdy nie oznaczają, że współżycie bez zabezpieczenia jest bezpieczne. W sprawach antykoncepcji lub decyzji medycznych skonsultuj się z pracownikiem ochrony zdrowia.",
"title": "Twój cykl",
"subtitle": "Zapisuj miesiączkę i objawy oraz sprawdzaj, co dalej.",
diff --git a/package.json b/package.json
index 9d3adb397..af54c63f9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "healthlog",
- "version": "1.15.3",
+ "version": "1.15.4",
"description": "Self-hosted personal-health-tracking PWA with Withings integration, AI insights, and doctor-report PDF export.",
"license": "AGPL-3.0-only",
"homepage": "https://healthlog.dev",
diff --git a/src/app/api/insights/derived/batch/route.ts b/src/app/api/insights/derived/batch/route.ts
index 51d5802b9..b9330ff29 100644
--- a/src/app/api/insights/derived/batch/route.ts
+++ b/src/app/api/insights/derived/batch/route.ts
@@ -34,6 +34,8 @@ import {
isDerivedMetricId,
type DerivedMetricId,
} from "@/lib/insights/derived";
+import { resolveDeterministicAssessment } from "@/lib/insights/derived/derived-assessment";
+import { resolveServerLocale } from "@/lib/i18n/server-locale";
export const dynamic = "force-dynamic";
@@ -146,6 +148,35 @@ export const GET = apiHandler(async (request: NextRequest) => {
// four computes at a time against the shared pool, not seventeen.
const limit = pLimit(BATCH_CONCURRENCY);
const now = new Date();
+
+ // Attach the cheap DETERMINISTIC per-score assessment to the grid read so
+ // iOS paints the "Einschätzung" straight off the overview without a second
+ // per-id round-trip (the AI-warm prose stays lazy, served by the single
+ // route). `resolveDeterministicAssessment` is pure — no DB, no LLM — and
+ // null for non-assessable ids / non-`ok` status, so a non-score item still
+ // gets `assessment: null`. A best-effort grid extra must NEVER fail the
+ // whole batch, so each call is guarded → null on any unexpected shape.
+ const locale = await resolveServerLocale({
+ request,
+ userLocale: user.locale ?? null,
+ override: request.nextUrl.searchParams.get("locale"),
+ });
+ const assessmentLocale = locale === "de" ? "de" : "en";
+ const safeAssessment = (
+ metric: DerivedMetricId,
+ derived: Parameters[1],
+ ) => {
+ try {
+ return resolveDeterministicAssessment(
+ metric,
+ derived,
+ assessmentLocale,
+ now,
+ );
+ } catch {
+ return null;
+ }
+ };
const results = await Promise.all(
items.map((item) =>
limit(async () => {
@@ -167,11 +198,10 @@ export const GET = apiHandler(async (request: NextRequest) => {
provenance: derived.provenance,
reason:
derived.status === "insufficient" ? derived.reason : null,
- // The batch backs the dashboard GRID; per-score assessment text is
- // a detail-sheet concern served by the single-metric route. Always
- // null here so the wire shape matches `DerivedMetricResponse`
- // without paying the assessment cost on a 17-item grid read.
- assessment: null,
+ // Deterministic assessment only (cheap, pure). The AI-warm prose
+ // stays a single-route concern; here every assessable `ok` score
+ // carries its template "why" text, everything else stays null.
+ assessment: safeAssessment(item.metric, derived),
},
};
}),
diff --git a/src/app/insights/page.tsx b/src/app/insights/page.tsx
index db3a1a1ad..5018a9035 100644
--- a/src/app/insights/page.tsx
+++ b/src/app/insights/page.tsx
@@ -167,6 +167,19 @@ const CycleInsightSummaryCard = dynamic(
{ ssr: false },
);
+// v1.15.3 — the compact cycle RING, dropped into the wellness-score strip as a
+// gated sibling tile (NOT the summary teaser — that stays further down). Mounted
+// only for a cycle-tracking account, so its calendar read never fires otherwise.
+// Deferred behind `next/dynamic`; it renders nothing while resolving / on error /
+// when there is no active cycle, so it carries no loading placeholder.
+const CycleRingTile = dynamic(
+ () =>
+ import("@/components/cycle/cycle-ring-tile").then((mod) => ({
+ default: mod.CycleRingTile,
+ })),
+ { ssr: false },
+);
+
/**
* v1.4.25 W4d — Insights mother page.
*
@@ -376,6 +389,12 @@ export default function InsightsPage() {
isLoading={dashboardDerived.isLoading}
isError={dashboardDerived.isError}
refetch={dashboardDerived.refetch}
+ // v1.15.3 — the cycle ring rides the scores strip as a gated sibling
+ // tile, only for a cycle-tracking account, so its calendar read never
+ // fires otherwise (the same `/api/auth/me` gate the sidebar nav uses).
+ extraTile={
+ user?.cycleTrackingEnabled ? : undefined
+ }
/>
{flags.briefing && (
diff --git a/src/components/charts/compliance-heatmap.tsx b/src/components/charts/compliance-heatmap.tsx
index 2cf347f37..c6a23e071 100644
--- a/src/components/charts/compliance-heatmap.tsx
+++ b/src/components/charts/compliance-heatmap.tsx
@@ -24,6 +24,14 @@ const GAP = 3;
// below the touch-friendly 14 px square on narrow viewports. The
// stretch branch computes an adaptive size; both branches clamp here.
const CELL_FLOOR_PX = 14;
+// v1.15.3 — cell-ceiling for the stretch branch. With a short window (a
+// single medication / few covered weeks → only ~5 columns) the adaptive
+// `containerWidth / weeks` cell ballooned to fill a wide card, and since the
+// grid is square the SVG height (`7 * cellSize + 6 * GAP`) blew up to ~3× the
+// neighbouring tiles. Capping the cell keeps the grid dense + left-aligned
+// (extra width is whitespace) so the heatmap holds the tile-height rhythm:
+// height ≈ 18 + 7·22 + 6·3 = 190 px, in line with the surrounding tiles.
+const CELL_CEIL_PX = 22;
function getColor(data: DailyData): string {
if (data.expected === 0) return "var(--secondary)";
@@ -229,10 +237,13 @@ export function ComplianceHeatmap({
// narrows. Static (non-stretch) instances use the canonical 18 px.
const cellSize =
stretch && containerWidth > 0
- ? Math.max(
- CELL_FLOOR_PX,
- (containerWidth - labelWidth - Math.max(0, weeks - 1) * GAP) /
- Math.max(weeks, 1),
+ ? Math.min(
+ CELL_CEIL_PX,
+ Math.max(
+ CELL_FLOOR_PX,
+ (containerWidth - labelWidth - Math.max(0, weeks - 1) * GAP) /
+ Math.max(weeks, 1),
+ ),
)
: CELL_SIZE;
const step = cellSize + GAP;
@@ -253,7 +264,11 @@ export function ComplianceHeatmap({
- {/* Zone 3 — the user's OWN clustered symptoms for this phase. The
- compact variant under the wheel omits the chip row to stay light;
- the calendar-tab variant shows it. */}
- {!compact && chips.length > 0 ? (
+ {/* Zone 3 — the user's OWN clustered symptoms for this phase
+ ("you often notice this here"). */}
+ {chips.length > 0 ? (
{t("cycle.phaseEducation.commonHere")}
@@ -194,18 +185,6 @@ export function PhaseEducationCard({
) : null}
-
- {/* The "log today" nudge — opens the existing day-log sheet. */}
-
>
)}
diff --git a/src/components/cycle/predictions-panel.tsx b/src/components/cycle/predictions-panel.tsx
index 5dfd7b204..12752eb12 100644
--- a/src/components/cycle/predictions-panel.tsx
+++ b/src/components/cycle/predictions-panel.tsx
@@ -53,6 +53,10 @@ export interface PredictionsPanelProps {
history: CycleHistoryResponse | undefined;
/** Fallback disclaimer when no prediction carries one. */
fallbackDisclaimer?: string;
+ /** The active cycle goal — only AVOID_PREGNANCY surfaces the (deliberate)
+ * contraceptive-safety caveat here; every other goal drops the generic
+ * "predictions are estimates" line so it does not repeat under every graph. */
+ goal?: string;
}
export function PredictionsPanel({
@@ -60,10 +64,18 @@ export function PredictionsPanel({
rawChartMode,
history,
fallbackDisclaimer,
+ goal,
}: PredictionsPanelProps) {
const { t } = useTranslations();
- const disclaimer = prediction?.disclaimer ?? fallbackDisclaimer ?? "";
+ // Only the AVOID_PREGNANCY goal shows a disclaimer here: it surfaces the
+ // fertile window, so the stronger "not a contraceptive method" caveat is a
+ // deliberate medical safety note. For all other goals the generic
+ // estimate-caveat is suppressed (it already lives once with the data).
+ const disclaimer =
+ goal === "AVOID_PREGNANCY"
+ ? (prediction?.disclaimer ?? fallbackDisclaimer ?? "")
+ : "";
return (
diff --git a/src/components/cycle/use-cycle.ts b/src/components/cycle/use-cycle.ts
index 8b811c1b5..4a3441386 100644
--- a/src/components/cycle/use-cycle.ts
+++ b/src/components/cycle/use-cycle.ts
@@ -335,27 +335,6 @@ export function useDeleteDayLog() {
});
}
-/**
- * Hard-delete EVERY cycle row the user owns (day-logs, cycles, predictions,
- * the cycle audit trail, and the cycle reminder-delivery ledger rows). The
- * privacy "purge" the post-Dobbs threat model promises — distinct from the
- * per-row soft-delete. Invalidates the whole cycle prefix + the nav gate.
- */
-export function useDeleteAllCycleData() {
- const qc = useQueryClient();
- return useMutation({
- mutationFn: async () => {
- const res = await fetch("/api/cycle/all", { method: "DELETE" });
- if (!res.ok) throw new Error(`Request failed: ${res.status}`);
- return unwrap<{ purged: boolean }>(res);
- },
- onSuccess: () => {
- void invalidateKeys(qc, cycleDependentKeys);
- void qc.invalidateQueries({ queryKey: queryKeys.authMe() });
- },
- });
-}
-
export interface CyclePrefsPatch {
enabled?: boolean;
goal?: CycleProfileDTO["goal"];
diff --git a/src/components/insights/derived/wellness-scores.tsx b/src/components/insights/derived/wellness-scores.tsx
index d7e147803..2a04a4623 100644
--- a/src/components/insights/derived/wellness-scores.tsx
+++ b/src/components/insights/derived/wellness-scores.tsx
@@ -47,6 +47,16 @@ interface ScoreStripProps {
isError?: boolean;
/** Refetch the one shared batch query. Recovers both strips at once. */
refetch?: () => void;
+ /**
+ * An optional extra tile rendered as the LAST sibling inside the same scores
+ * grid (e.g. the gated cycle ring). It participates in the column-count math
+ * so it never leaves a dangling empty cell, and it keeps the strip mounted
+ * even when no wellness score has data (a cycle-only account still sees its
+ * dial). The caller owns the gating — the strip just slots whatever it gets.
+ * The element is expected to render `null` on its own when it has nothing to
+ * show, so the strip subtracts it from the count in that case.
+ */
+ extraTile?: React.ReactNode;
className?: string;
}
@@ -149,6 +159,7 @@ export function WellnessScores({
isLoading,
isError = false,
refetch,
+ extraTile,
className,
}: ScoreStripProps) {
const { t } = useTranslations();
@@ -310,7 +321,23 @@ export function WellnessScores({
);
}
- // Whole strip un-mounts when no score has data — never an empty section.
+ // The optional caller-supplied tile (e.g. the gated cycle ring) slots in as
+ // the last sibling. It is counted toward the grid column math so it never
+ // leaves a dangling cell, and its presence keeps the strip mounted even when
+ // no wellness score has data (a cycle-only account still sees its dial). The
+ // tile renders `null` on its own when it has nothing to show; the grid has
+ // no background, so a transient empty trailing cell shows nothing — never a
+ // "missing tile" frame.
+ if (extraTile != null) {
+ tiles.push(
+
+ {extraTile}
+
,
+ );
+ }
+
+ // Whole strip un-mounts when no score has data AND no extra tile — never an
+ // empty section.
if (tiles.length === 0) return null;
// v1.12.4 — the strip used a fixed `lg:grid-cols-5`, so the common case of
diff --git a/src/components/settings/_card-header.tsx b/src/components/settings/_card-header.tsx
index 1198dec7d..29d5bf0c1 100644
--- a/src/components/settings/_card-header.tsx
+++ b/src/components/settings/_card-header.tsx
@@ -66,22 +66,32 @@ export function SettingsCardHeader({
className,
}: SettingsCardHeaderProps) {
return (
-
-
-
-
-
- {title}
-
- {titleAccessory}
+
+
+ {/* Title + description share one column to the RIGHT of the icon, so the
+ description left-aligns with the title rather than slipping back under
+ the icon gutter. */}
+
+
+
+
+ {title}
+
+ {titleAccessory}
+
+ {status ? (
+
{status}
+ ) : null}
- {status ?
{status}
: null}
+ {description ? (
+
+ {description}
+
+ ) : null}
- {description ? (
-
- {description}
-
- ) : null}
);
}
diff --git a/src/components/settings/web-push-card.tsx b/src/components/settings/web-push-card.tsx
index ccf3a50e3..9e4491cfe 100644
--- a/src/components/settings/web-push-card.tsx
+++ b/src/components/settings/web-push-card.tsx
@@ -155,73 +155,80 @@ export function WebPushCard() {
}
}
+ // The primary action sits in the header row (right of the title) rather than
+ // bottom-left, so an inactive card does not waste a wide empty band before
+ // its enable button. The loading spinner rides the same slot; the
+ // unsupported / denied notices stay in the body.
+ const headerAction = loading ? (
+
+ ) : !isSupported || isDenied ? null : (
+