From d3d58a0c30b10ae3c1b537a3d06445ca756a441c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 5 Jun 2026 21:18:52 +0200 Subject: [PATCH] =?UTF-8?q?chore(release):=20v1.13.1=20=E2=80=94=20wellnes?= =?UTF-8?q?s=20rings=20fill=20to=20the=20actual=20score?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The score-ring's RadialBar swept the full circle for any value because the angular domain was only pinned on the PolarRadiusAxis (which governs radius, not sweep). Recharts then auto-scaled the angular domain to the single datum, so every ring read as 100%. Add a PolarAngleAxis with a fixed [0,100] number domain so the bar sweeps value-percent of the track. Affects the overview wellness tiles and the score-anatomy detail view. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 6 ++++++ docs/api/openapi.yaml | 2 +- package.json | 2 +- src/components/insights/derived/score-ring.tsx | 18 +++++++++++++++--- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2407e5d1..4476063e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +## [1.13.1] — 2026-06-05 — wellness rings show the real score + +### Fixed + +- **The wellness-score rings now fill to the actual score.** Each ring was sweeping a full circle regardless of its value, so every score looked like 100%. The ring now fills proportionally — a 74 fills roughly three-quarters of the circle — across the overview tiles and the score detail view. + ## [1.13.0] — 2026-06-05 — your own mood tags ### Added diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index c2a5a4fca..174c490b3 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.13.0 + version: 1.13.1 description: >- Self-hosted personal-health-tracking PWA — public API surface for the iOS native client and external ingest. diff --git a/package.json b/package.json index 76e9523e4..9c0991674 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "healthlog", - "version": "1.13.0", + "version": "1.13.1", "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/components/insights/derived/score-ring.tsx b/src/components/insights/derived/score-ring.tsx index 63b01bd27..260a92664 100644 --- a/src/components/insights/derived/score-ring.tsx +++ b/src/components/insights/derived/score-ring.tsx @@ -2,6 +2,7 @@ import { Label, + PolarAngleAxis, PolarRadiusAxis, RadialBar, RadialBarChart, @@ -114,9 +115,12 @@ export function ScoreRing({ }) : t("insights.derived.scoreRing.ariaProvisional"); - // RadialBar fills the arc proportionally to the bar's value against the - // PolarRadiusAxis [0,100] domain; the track spans a full clockwise circle - // from 12 o'clock, so a value of 74 fills 74% of the ring. + // The RadialBar's angular sweep is governed by the `` number + // domain [0,100] below — NOT the PolarRadiusAxis (which positions the bar + // radially + anchors the centred number). Without the angle axis Recharts + // auto-scales the angular domain to the single datum, so every ring filled a + // full circle regardless of its score; pinning the domain makes a value of + // 74 sweep 74% of the track (full clockwise circle from 12 o'clock). const data = [{ name: "score", value: hasScore ? clamped : 0, fill }]; const startAngle = 90; const endAngle = -270; @@ -144,6 +148,14 @@ export function ScoreRing({ outerRadius={outerRadius} barSize={dims.barSize} > + {/* Pins the value→angle scale so the bar sweeps `value`% of the + track instead of always filling the full circle. */} +