Skip to content

Add daily health summaries aggregated from HealthRecord #32

Open

Description

@johnnyhuy

Part of #6.

Slice: aggregate the top-level HealthRecord values parsed in #30 into one summary per calendar day, so the export pipeline produces usable daily totals instead of a flat record list.

Scope:

  • A Foundation-only DailyHealthSummary value type in the core package (Codable, Equatable, Sendable).
  • Daily totals for steps, active and basal energy (kcal), and distance (metres), using the normalised values already on HealthRecord.
  • Daily heart rate average from samples, resting heart rate (latest sample of the day), body mass (latest sample of the day), and total sleep duration from sleep analysis records.
  • A HealthExport.dailySummaries(calendar:) entry point that groups records by start-of-day and returns summaries sorted by day.
  • Unit tests covering grouping, totals, averages, latest-value picks, empty input, and records without dates.

Left out on purpose: CSV or JSON file writing, and feeding summaries into recommendations. Those stay on #6 for later slices.

Activity

  1. johnnyhuy commented on Nov 8, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-32-daily-health-summaries @ f74c050

  2. johnnyhuy commented on Nov 8, 2026

    @johnnyhuy
    ContributorAuthor

    Status: implementation is in PR #33 and fully verified. Local lint, build, and test pass, and all CI checks are green after re-running one flaky Mobile e2e job. Waiting on human review and approval on PR #33 before merge. Parent epic #6 stays open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentclaimed by the BetterFit work loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions