chore(release): v1.4.39.3 — dashboard slim/thick merge robustness and list-page precision

The post-deploy CI for v1.4.39.2 surfaced eight e2e failures across
chromium-desktop and chromium-mobile (chart-overlay-controls,
dashboard, charts-mobile, measurement-flow) that all routed through
two narrow regressions and one durable test-fixture gap.

### Fixed

- Dashboard slim/thick merge no longer blanks the tile strip when the
  slim slice resolves with an empty summaries record. The v1.4.39.2
  inline `slim?.summaries ?? thick?.summaries` short-circuited on
  JavaScript's truthy-empty-object even when thick carried the full
  payload. The merge moved to a pure `mergeSlimAndThickAnalytics`
  helper that uses object emptiness as the discriminator: populated
  slim still wins on overlapping fields (progressive-paint contract
  preserved), empty slim falls through to thick, both empty leaves
  the dashboard's data-floor gates to render the appropriate empty
  state. Eight new behaviour-level unit tests cover the edge cases.
- `MeasurementList` non-grouped rows now preserve decimal precision
  on both the desktop table and the mobile card grid. The v1.4.37 W7c
  collapsed-list view passed every value through `fmt.integer`, which
  kept the per-day step / activity aggregates correct but silently
  truncated single weight / body-fat / temperature readings — 78.4 kg
  rendered as "78 kg". Grouped rows (cumulative HK type day
  aggregates) stay on `fmt.integer` because their readings are
  integer-only; non-grouped rows now use `fmt.number` which honours
  up to three fraction digits without forcing a minimum.

### Changed

- Playwright route mocks for `/api/analytics` migrate from the
  literal `**/api/analytics` string glob to the regex form
  `/\/api\/analytics(\?|$)/` across every authenticated spec. The
  string glob does not match the sliced URL form
  `/api/analytics?slice=summaries` the v1.4.39.2 dashboard split
  fires alongside the thick request, so the slim request fell
  through to the real route on the seeded test user that returns
  empty summaries. Ten specs migrate: dashboard,
  chart-overlay-controls, measurement-flow, charts-mobile, a11y,
  v1427-responsive-sheet, v1427-coach-launch,
  v1427-measurements-add-param, v1427-insights-empty-state,
  onboarding-tour-passthrough. The regex form is the durable
  alignment with the v1.4.37 W-CI lesson that already swept
  `onboarding-flicker.spec.ts` and `mobile-viewport.spec.ts`.

### Notes

- No schema migration. Runtime + test-fixture-only changes.
- `pnpm test --run` green at 4662 / 4663 (1 long-standing skip).
- Full Playwright suite green at 116 passing / 36 skipped / 152 total
  on both `chromium-desktop` and `chromium-mobile` profiles, against
  the production Next.js build. Closes every failure from CI run
  26213226723.
This commit is contained in:
Marc-André Bombeck committed 2026-05-21 10:31:18 +02:00
1 parent d665a5db42
commit dbb5979a97
16 files changed
+426 -34

No files matched your search

@@ -544,7 +544,20 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
</Badge>
</TableCell>
<TableCell className="font-semibold tabular-nums">
{fmt.integer(m.value)} {m.unit}
{/* v1.4.39.3 — non-grouped rows render the
stored value with its native precision
(`fmt.number` honours up to 3 fraction
digits by default, drops trailing zeros)
so a 78.4 kg weight reading stops
truncating to "78". Grouped rows are
cumulative-type day aggregates (steps,
distance, etc.) and stay on `fmt.integer`
because the underlying readings are
integer-only by definition. */}
{isGrouped
? fmt.integer(m.value)
: fmt.number(m.value)}{" "}
{m.unit}
{isGrouped && (
<span className="text-muted-foreground ml-2 text-xs font-normal">
{t("measurements.dailyTotalCaption", {
@@ -683,7 +696,15 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
</Badge>
)}
<span className="font-semibold tabular-nums">
{fmt.integer(m.value)} {m.unit}
{/* v1.4.39.3 — mirror the desktop table:
grouped daily aggregates stay integer,
non-grouped single readings render with
their native decimal precision so
"78.4 kg" no longer truncates to "78". */}
{isGrouped
? fmt.integer(m.value)
: fmt.number(m.value)}{" "}
{m.unit}
</span>
{isGrouped && (
<span className="text-muted-foreground ml-1.5 text-[11px]">