Skip to content

Personal: interactive muscle map driven by logged workouts - #47

Merged
baba-dev merged 1 commit into
mainfrom
claude/magical-gauss-tayovm
Nov 19, 2026
Merged

baba-dev merged 1 commit into
mainfrom
claude/magical-gauss-tayovm

Conversation

@baba-dev

Copy link
Copy Markdown
Owner

Summary

Makes the Personal muscle map (/me/body) interactive and driven by real training, building on P1-A (#44) and P1-B (#46).

  • Planned (default): declared activities plus allowed club visits, as before.
  • Logged: the user's own completed workouts over 7, 28 or 90 days. Per muscle: weighted set-equivalents, when it was last worked, and which exercises contributed most.
  • Preview: choose any activity and see which muscles it trains (a lens, not history).
  • All switching is instant and client-side; the three periods come from one server query.

Workout exercise names are free text, so exercise-catalog.ts maps keywords to muscles (word-boundary match, longest keyword wins, so "romanian deadlift" is not a plain deadlift and "leg curl" is not a biceps curl). Names it cannot place are shown to the user as not counted, never guessed. Details and limits: docs/P1_MUSCLE_EXPLORER.md.

Coordination with Codex's work

  • No Prisma change and no new route, so it cannot collide with the P1-C Health Connect schema/migration branch.
  • Imports P1-B code (getOverview, assertWellnessEnabled, assertWellnessAdult) but edits none of it. Touches only my own body-map files, /me/body, one doc line in DESIGN.md, and my existing integration test file (so ci.yml is untouched).
  • Checked against feat/personal-p1c-android-health-connect (6 commits at time of writing): zero overlapping files.

Privacy

Reads only the signed-in user's rows. Nothing flows to clubs or leaderboards. Logged mode reuses P1-B's gate, so it is off unless PERSONAL_WELLNESS_ENABLED=true and the user is a clear adult; when off, "Logged" is disabled and the page says why. Descriptive only: no recovery score, readiness or health claim.

Verified locally

  • format:check, lint (0 errors), typecheck, 207 unit tests (9 new) and 8 integration tests (2 new) pass on a disposable PostgreSQL 16, with P1-B's migrations applied.
  • New integration cases: explorer is dark when the flag is off and for a minor; maps only the signed-in user's workouts (another user's 10 pull-ups never counted); window boundaries (a 40-day-old session appears only in the 90-day view).
  • Ran the app in a phone-size browser with a seeded history and checked the numbers by hand against the seed (e.g. quadriceps over 90 days = 3 + 3 + 4 timed-set equivalents = 10). Also checked the flag-off state. No console errors.

Not verified

  • Only the dark theme was exercised at runtime (the app defaults to dark).
  • The activity-to-muscle and exercise-to-muscle mappings are my own plausible first pass, not validated sports science; please review exercise-catalog.ts.
  • Set-equivalents are a descriptive volume count, not a validated training-load model.
  • The catalogue covers common lifts and cardio only; unusual names land in "not counted". A user-editable mapping is a possible follow-up.

Generated by Claude Code

- Planned / Logged / Preview modes and 7, 28 or 90 day periods on /me/body.
- Exercise catalogue maps free-text workout names to muscles; unplaceable
  names are reported to the user, never guessed.
- Logged data reuses P1-B's wellness gate and adult rule; own rows only.
- No schema change; imports P1-B code but edits none of it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018caQbyr5kMzA8YcRwCNrt8
@baba-dev
baba-dev marked this pull request as ready for review November 19, 2026 07:33
@baba-dev
baba-dev merged commit 4694fb6 into main Nov 19, 2026
3 checks passed
@baba-dev
baba-dev deleted the claude/magical-gauss-tayovm branch November 19, 2026 07:33
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.

2 participants