Skip to content

Sleep data #55

@ali5ter

Description

@ali5ter

Background

The WW app shows sleep data (duration, quality) alongside food and activity tracking. Sleep is increasingly linked to weight management and appetite regulation, so surfacing it in wwlog would provide useful context alongside food and activity data.

Desired behaviour

  • Log tab — Show sleep duration and quality for each day in the per-day detail view
  • Insights tab — Sleep trend across the date range (avg duration, nights with/without data); correlation note alongside points data (e.g. nights with <7h sleep vs over-budget days)
  • --report — Sleep summary in SUMMARY block; per-day sleep column in DAILY POINTS table

API investigation needed

The my-day endpoint does not currently expose sleep data — the today object only contains pointsDetails and trackedFoods. A separate WW API endpoint likely exists for sleep logs (possibly sourced via the same Terra API integration used for activity). Needs discovery — check network traffic in the WW app to identify the endpoint and response shape.

Acceptance criteria

  • Identify the WW API endpoint that returns sleep data
  • Add sleep fetch to the API client
  • Surface sleep data in Log tab detail view
  • Surface sleep trend/summary in Insights tab
  • Add to --report output

🤖 Generated with Claude Code on behalf of Alister

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions