Skip to content

feat(health): Overall Health dashboard + wearable Stats tabs (v0.0.94)#32

Merged
rwlove merged 1 commit into
mainfrom
feat/health-dashboard
Jun 7, 2026
Merged

feat(health): Overall Health dashboard + wearable Stats tabs (v0.0.94)#32
rwlove merged 1 commit into
mainfrom
feat/health-dashboard

Conversation

@rwlove

@rwlove rwlove commented Jun 7, 2026

Copy link
Copy Markdown
Owner

What

A whole-body Health view fed by the Android Health Connect metrics ingested in v0.0.93, plus per-metric Stats tabs. Hybrid layout: a dedicated Health page for the overview, the four detail views as Stats tabs, with dashboard tiles deep-linking into them.

Health page (/health/) — new top-nav

One-page dashboard pulling from every source PUMP tracks — body weight, strength training, and wearable metrics — as summary tiles (latest value + trend delta + sparkline), each deep-linking to its Stats tab.

New Stats tabs

  • Steps — daily bars + 7-day rolling average + today/avg/best tiles
  • Heart Rate — resting-HR trend line with a daily min–max band + avg
  • Sleep — stacked stages (deep/light/REM/awake) + duration + tiles
  • Cardio — session-minutes bars + recent-sessions table

All four lazy-init on shown.bs.tab, respect the global period selector, and are deep-link targets (/stats/#tab-steps).

How

  • internal/web/healthstats.go type-asserts the store to store.HealthStore and aggregates raw health_record rows into compact daily/nightly/session series (models.HealthStats). Degrades to empty states when there's no HealthStore (split-frontend mode).
  • internal/web/public/js/health-charts.js — Chart.js renderers + dashboard sparklines, matching the existing weight-chart.js / stats.js conventions and the COLOR theme. Look-and-feel is identical to the existing tabs (same panel cards, page-tab-btn tabs, Chart.js 4.4.1).
  • New /health/ route in both RegisterRoutes and startRouter; nav entry in header.html.

Notes

  • No schema change — reads the v8 health_record table. Pure UI/read. Releases as pump-v0.0.94.
  • Existing strength-stats screenshots are unchanged (those tabs weren't touched); added new screenshots for the Health page + the four wearable tabs.
  • Verified locally against a seeded Postgres (6 weeks of steps/HR/sleep/cardio + weight + sets): all pages render 200, tiles/charts populate, empty states behave, deep-links activate the right tab.

🤖 Generated with Claude Code

Adds a whole-body Health view fed by the Android Health Connect metrics
ingested in v0.0.93, plus per-metric Stats tabs.

- Health page (/health/): new top-nav dashboard pulling from every source
  PUMP tracks — body weight, strength training, and wearable metrics — as
  summary tiles (latest value + trend delta + sparkline) that deep-link into
  the matching Stats tab. New route in both RegisterRoutes and startRouter;
  nav entry in header.html.
- Stats tabs: Steps (daily bars + 7-day avg), Heart Rate (resting trend with
  daily min–max band), Sleep (stacked stages + duration), Cardio (session
  bars + recent-sessions table). Lazy-init on shown.bs.tab, respect the
  global period selector, and are deep-link targets (/stats/#tab-steps).
- Aggregation: internal/web/healthstats.go type-asserts the store to
  store.HealthStore and collapses raw health_record rows into compact daily/
  nightly/session series (models.HealthStats). Degrades to empty states when
  no HealthStore (split-frontend mode).
- internal/web/public/js/health-charts.js: Chart.js renderers + dashboard
  sparklines, matching the existing weight-chart.js / stats.js conventions
  and the COLOR theme.
- README: documented the Health page + /api/health ingest; added screenshots
  (Overall Health + Steps/Heart Rate/Sleep/Cardio tabs).

No schema change (reads the v8 health_record table). UI only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rwlove rwlove merged commit c3db8cf into main Jun 7, 2026
4 checks passed
@rwlove rwlove deleted the feat/health-dashboard branch June 7, 2026 15:25
rwlove added a commit to rwlove/home-ops that referenced this pull request Jun 7, 2026
Health dashboard + wearable Stats tabs (Steps/HR/Sleep/Cardio) for the
Android Health Connect metrics. UI-only; no schema change. See rwlove/PUMP#32.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant