github MBombeck/HealthLog v1.4.42
v1.4.42 — Knip enforcing, queryKey factory closed, iOS Workouts dedup, Withings off-response classification

2 hours ago

v1.4.41 closed the iOS BP/Weight 14 s perf paper-cut and the soft-delete reader-tier completeness story. v1.4.42 is the follow-up polish-and-iOS-readiness release: the knip CI gate flips to enforcing-mode, the long-tail queryKey factory migration closes the v1.4.40 audit-H1 contract for the settings / medications / admin / hooks surface, /api/dashboard/widgets 422 returns every Zod issue, Withings off-responses are classified into transient / reauth / persistent, the iOS HealthKit ingest gets a cross-source workout dedup helper, and a tree-hygiene wave consolidates 9 BERLIN_DAY_FORMATTER sites, the dashboard Suspense double-comment, doctor-report-data byte-escape, pr-detection-worker soft-delete filter, and the offhost-backup DR-intent comment.

Added

  • returnAllZodIssues(error, status?, meta?) shared helper — multi-issue Zod 422 envelope; first consumer is PUT /api/dashboard/widgets; 41 sibling routes documented for v1.4.43 rollout.
  • dedupeWorkoutBatch() write-time cross-source dedup — Apple Watch + Withings ScanWatch paired captures collapse to one row at write time. Name diverges from the read-time pickCanonicalWorkoutRows so auto-completion paths don't conflate write-time payload-internal dedup with read-time cross-batch dedup.
  • pnpm check-env CLI — pre-deploy env-var sanity check with the v1.4.40 AP-2 silent-disable pattern via allOrNone group marker. Renderer surfaces the satisfying anyOf alternative ([OK] APNS_KEY (satisfied by APNS_KEY_FILE)).
  • Withings off-response classifier(httpStatus, body) → { success | transient | reauth_required | persistent }; rate-limit (601) + contract-mismatch (293 / 294) responses no longer silently retry forever.
  • Nine new queryKey factory entries covering per-medication sub-keys, the Withings status read, paginated admin audit-log, and workouts-recent list.

Changed

  • Knip CI gate is now enforcing on main. Any new unused export/type fails the gate. Shadcn surface + zod-infer contract types scoped via knip.json ignore-block.
  • Long-tail queryKey factory migration closed — 40 settings / medications / admin / hooks call-site files migrated. ESLint rule + test-guard substitute extend in lockstep.
  • BERLIN_DAY_FORMATTER consolidated across nine sites (seven status helpers + bucket-series + bp-in-target).
  • Tile-strip Suspense placeholder gains min-h-[6rem] + cosmetic flex min-w-0 flex-col classes for byte-identical parity with the live TrendCard chrome.
  • apiError + returnAllZodIssues share a buildJsonErrorResponse builder so a future extension lands in one place.

Fixed

  • Withings rate-limit + contract-mismatch responses no longer silently retry forever. 601 / 293 / 294 now map to persistent; admin alert fires the first time.
  • pr-detection-worker soft-delete filter — closes the v1.4.41 senior-dev L1 carry-over. A soft-deleted PR can no longer block the next-best row from promotion.
  • offhost-backup.ts DR-intent comment — the DR snapshot deliberately includes soft-deleted rows; the inline comment documents the asymmetry vs the user-facing /api/export/full-backup.
  • src/lib/doctor-report-data.ts byte cleanliness — sanitiser regex rewritten to escape-sequence form; file becomes UTF-8 clean and future code reviews can read the diffs.
  • pnpm check-env catches the AP-2 silent-disable — the APNs group manifest entry shipped without allOrNone: true; adding the flag closes the gap the wave was conceived to close.

Operator notes

  • No migration, no env-var change, no API contract break for iOS v0.5.4.
  • pnpm check-env is the new pre-deploy gate; manifest at scripts/env-manifest.json.
  • Knip CI gate is enforcing on main — any new unused export/type fails the gate.
  • Withings persistent failures map to IntegrationState=error_transient so the next scheduled sync still runs; distinct audit-kind + admin-alert label.
  • Write-time workout dedup does not consult User.sourcePriorityJson — a customised user's preferred row may be dropped when paired with a higher-canonical-priority sibling within 90 s. Scope-narrow today; v1.4.43 closes via one indexed lookup.
  • pnpm test --run green at 4815 passing / 1 skipped. pnpm typecheck, pnpm lint, pnpm knip (no --include) all green.

Don't miss a new HealthLog release

NewReleases is sending notifications on new releases.