fix: reset per-set weights when updating exercise in ExerciseEditDialog#480
Conversation
Ensure `setWeightsPerCableKg` is reset to an empty list when updating an exercise. This prevents stale per-set weight data from persisting when global exercise parameters are modified within the edit dialog.
There was a problem hiding this comment.
Code Review
This pull request updates the ExerciseEditBottomSheet to reset setWeightsPerCableKg to an empty list when updating an exercise. The reviewer pointed out that unconditionally resetting this list will discard existing per-set weights even when unrelated parameters are edited, and suggested conditionally clearing it only if the weight or the number of sets has actually changed.
…tion/screen/ExerciseEditDialog.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee3420b60a
ℹ️ 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, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. The Fix: This PR correctly resets Files Reviewed (2 files)
Reviewed by laguna-m.1-20260312:free · 269,205 tokens |
Ensure
setWeightsPerCableKgis reset to an empty list when updating an exercise. This prevents stale per-set weight data from persisting when global exercise parameters are modified within the edit dialog.