Implement routine deload modifiers (Active Recovery & Heavy Deload) #511
Conversation
…secase/ApplyRoutineModifierUseCase.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request introduces routine launch modifiers (Active Recovery and Heavy Deload) to temporarily scale weights or reps before starting a workout. It adds the core logic in ApplyRoutineModifierUseCase, the UI in RoutineModifierDialog, and integrates this flow across the application's managers, view models, and screens, supported by localization strings and unit tests. A high-severity issue was identified in RoutineFlowManager where the active profile ID is not passed to the modifier use case, causing it to default to "default" and potentially resolve personal records from the wrong profile.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6348d19984
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, the incremental changes actually fixed the previous complaints. Active Recovery now correctly derives fallback PR from the profile scope, and the modifier flows are wired up properly. I had to double-check this wasn't a trap. 📊 Overall: Like a perfectly executed reload — the changes are precise, targeted, and address the exact gaps identified before. The test coverage for timed exercises in heavy deload scenarios proves someone actually thought about edge cases. Files Reviewed (2 files)
Reviewed by laguna-m.1-20260312:free · 1,119,531 tokens |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 727af803e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24c41fc3f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Resolve merge conflicts between routine deload modifiers (Issue #495) and equipment rack feature (Issue #448) by keeping both sets of changes. https://claude.ai/code/session_01MBWwVaUrnXjzZxYKKnn33i
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e777b00315
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| exercise.copy(warmupSets = scaleFirstWarmupOnly(exercise.warmupSets, percent)) | ||
| } else { | ||
| val baseline = resolveBaselineOneRepMax(exercise, profileId) | ||
| val adjustedWeight = roundToHalfKg(baseline * percent / 100f).coerceAtLeast(MIN_WEIGHT_KG) |
There was a problem hiding this comment.
Clamp Active Recovery weights to the cable limit
When a stored/estimated 1RM is high enough (for example >183 kg per cable with the 60% option), this only enforces a 0.5 kg floor and can load an adjusted weight above Constants.MAX_WEIGHT_PER_CABLE_KG (110 kg). The modified routine then feeds that value directly into workout parameters, and WorkoutCommandValidator.validateProgramParams rejects weights above the hardware ceiling, so auto-start or tapping Start from the overview can fail instead of starting the deload; clamp the computed Active Recovery weight to the same max as other routine weights.
Useful? React with 👍 / 👎.
|
Attached live-sandbox E2E report for PR #511 / Issue #495 Routine Deload Modifiers: Direct PDF download: HTML source report, retained for reference: Summary:
Sanitization/publication gate:
Notes:
|
Resolve merge conflicts with weight recommendation (PR #499), timed-set countdown cues (PR #505), and Health Connect export (PR #516) by keeping both deload modifiers and the new main features. https://claude.ai/code/session_01MBWwVaUrnXjzZxYKKnn33i
No description provided.