Skip to content

fix: reset per-set weights when updating exercise in ExerciseEditDialog#480

Merged
9thLevelSoftware merged 3 commits into
mainfrom
weight_save_fix
May 29, 2026
Merged

fix: reset per-set weights when updating exercise in ExerciseEditDialog#480
9thLevelSoftware merged 3 commits into
mainfrom
weight_save_fix

Conversation

@9thLevelSoftware

Copy link
Copy Markdown
Owner

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.

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.
Copilot AI review requested due to automatic review settings May 28, 2026 23:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@kilo-code-bot

kilo-code-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

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 setWeightsPerCableKg to an empty list when either the weight or number of sets changes, preventing stale per-set weight data from persisting after editing. The logic is sound and the PR description accurately explains the intent.

Files Reviewed (2 files)
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/ExerciseEditDialog.kt — clean addition
  • .github/workflows/ci-tests.yml — routine maintenance (action v4→v5, zulu→temurin)

Reviewed by laguna-m.1-20260312:free · 269,205 tokens

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@9thLevelSoftware 9thLevelSoftware merged commit 3d00d7c into main May 29, 2026
9 checks passed
@9thLevelSoftware 9thLevelSoftware deleted the weight_save_fix branch May 29, 2026 00:06
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.

[Bug] Weight not reflected in routine overview after saving in old school mode

2 participants