Skip to content

Add reps support with Epley 1RM estimation#71

Open
jappeace-sloth wants to merge 1 commit intojappeace:masterfrom
jappeace-sloth:feature/reps-support
Open

Add reps support with Epley 1RM estimation#71
jappeace-sloth wants to merge 1 commit intojappeace:masterfrom
jappeace-sloth:feature/reps-support

Conversation

@jappeace-sloth
Copy link
Copy Markdown

Summary

  • Record reps alongside weight in PR history entries
  • Estimate 1RM using the Epley formula (weight * (1 + reps/30)) for multi-rep sets
  • Add reps text input on EnterPR screen with "Est. 1RM" display when reps > 1
  • Show "x N" suffix in history entries for multi-rep sets
  • Add ALTER TABLE migration for existing databases lacking the reps column
  • Pin pr-sync-api to feature/reps-support branch, thread reps through sync

Dependencies

Test plan

  • cabal build passes
  • cabal test passes (75 tests, including new parseReps and estimate1RM tests)
  • nix-build nix/ci.nix passes
  • CI passes on GitHub

🤖 Generated with Claude Code

Record reps alongside weight in PR history and estimate 1RM using
the Epley formula (weight * (1 + reps/30)) for multi-rep sets.

Storage:
- Add reps column (Int32) to PrHistoryT beam schema
- Add ALTER TABLE migration for existing databases lacking reps column
- Thread reps through saveRecord, loadExerciseHistory, getHistorySince,
  mergeHistoryEntry, insertHistory

UI (Views):
- Add reps text input (InputNumber, default 1) on EnterPR screen
- Show estimated 1RM when weight and reps > 1 are filled
- Display "x N" suffix in history entries when reps > 1
- New estimate1RM and parseReps functions

Sync:
- Thread reps through sync request/response mapping
- Include reps in mergeHistoryEntry dedup

Tests:
- Update all storage/sync test calls with reps parameter
- Add parseReps and estimate1RM unit tests (75 tests pass)

Pin pr-sync-api to feature/reps-support with historyReps field.

Prompt: implement reps support plan across pr-sync-api, megavid, prrrrrrrrr

Co-Authored-By: Claude Opus 4.6 <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