Skip to content

Add active energy metric and a simple weekly verdict tile#3

Merged
isAdamBailey merged 1 commit into
mainfrom
feature/active-energy-metric
Jul 3, 2026
Merged

Add active energy metric and a simple weekly verdict tile#3
isAdamBailey merged 1 commit into
mainfrom
feature/active-energy-metric

Conversation

@isAdamBailey

Copy link
Copy Markdown
Owner

Summary

  • Pull active energy burned (calories from movement) from Google Health as a second progress signal alongside weight, since exercise can improve while the scale doesn't move.
  • Replace the grid of raw numbers on the dashboard with a single, glanceable "Better / Worse / Steady this week" tile: better if weight is down or energy is up, worse only if weight is up and energy didn't pick up the slack. BMI/category are still available via the chart's metric toggle.
  • Saving a weight entry now triggers a background Google sync so new data (including active energy) shows up without a manual "Sync now".
  • Add a "Reconnect" banner on the dashboard for when Google's test-app refresh token expires (every 7 days until the app is published) or is revoked.
  • Fix a timezone bug in the weekly-grouping composable: date-only strings (like active energy's day field) were parsed as UTC midnight, which could shift into the wrong local week for negative-UTC-offset timezones.

Test plan

  • go build ./..., go test ./..., golangci-lint run ./... all pass in backend/
  • npm run lint, npx vue-tsc --noEmit, npm run test, npm run build all pass in frontend/
  • Verified live: ran migrations against a real Postgres, logged in via magic link through Mailpit, created a weight entry, and hit the new /api/active-energy endpoint end-to-end
  • Manually verify the dashboard UI in a browser (Active energy chart toggle, verdict tile, reconnect banner) — no browser automation tool was available in this session

🤖 Generated with Claude Code

Weight alone doesn't reward exercise, so pull active energy burned from
Google Health as a second signal and distill it plus the weight trend into
a single "Better/Worse/Steady this week" tile instead of a grid of raw
numbers. Weight entries now trigger a background Google sync, and a
reconnect banner surfaces when the (7-day, unpublished-app) refresh token
expires.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@isAdamBailey
isAdamBailey merged commit b05ff4c into main Jul 3, 2026
5 checks passed
@isAdamBailey
isAdamBailey deleted the feature/active-energy-metric branch July 3, 2026 18:55
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