Repository navigation
fix(workout): editing a warm-up's weight leaves the later warm-ups on their ramp - #442
Open
kurktchiev wants to merge 1 commit into
Open
kurktchiev wants to merge 1 commit into
kurktchiev wants to merge 1 commit into
Conversation
… their ramp cascadeWeight copied an edited load onto every later undone row of the same phase. That suited warm-ups when "Add warm-up set" cloned the row before it (86ac937). Since warm-ups ramp (0863aa7, 287550d), each rung halving the gap to the work weight, editing rung 1 of 60/90/105 flattened the ramp to 65/65/65 and every later rung had to be put back by hand. A warm-up edit now stays on its own row, whole-row and one-side alike. A work-set edit still carries through the later inherited work sets and never reaches into the ramp. The phase-only warm-up test flips to the new rule; two new tests cover the built ramp and the one-side case. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
kurktchiev
force-pushed
the
gh/warmup-edit-keeps-ramp
branch
from
October 7, 2026 17:25
7a9a5b2 to
c2a5207
Compare
crstnmac
added a commit
to crstnmac/openGym
that referenced
this pull request
Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Editing the weight of one warm-up set during a workout copies the new weight onto every later warm-up that isn't done yet. On an incline bench at 125 lb with three planned warm-ups (60 / 90 / 105), setting the first one to 65 turns the ramp into 65 / 65 / 65, and each later rung has to be put back by hand.
The copying is
cascadeWeightinlib/history.js, whichsetFieldandsetSideinviews/Workout.jsxcall after every weight edit. It carries an edit forward to the later rows of the same phase that are not done and not edited by hand. That made sense when "Add warm-up set" copied the row before it (86ac937). Since 0863aa7 and 287550d the warm-ups ramp toward the work weight, each rung at its own load, and the rule flattens them.cascadeWeightnow returns early when the edited row is a warm-up, and only work sets receive a cascade. The edited row is still marked as edited by hand. A work-set edit behaves as before. It carries through the later inherited work sets and never reaches back into the ramp.I ran the same edits on main and on this branch: barbell incline bench (0047), lb profile, 5 lb step,
{ sets: 4, reps: 8, weight: 125, warmupSets: 3 }throughbuildSets, then the edit the waysetFieldmakes it.One-side warm-ups follow the same rule. With two one-side warm-ups at 10 and 15 lb, setting the left side of the first to 5 used to set the left side of the second to 5 as well. It now stays at 15.
Tests:
history.test.js: two new tests, the built ramp above and the one-side case. The existing "cascadeWeight keeps phase-only warm-ups in their own lane" expected the old copying; it now expects the later warm-up to keep its load, and its name says so. All three fail on main. The file passes 188 tests.check-locales.mjs: 17 locales, 1,979 keys each.check-source-strings.mjs --strict: 1,555 strings. No strings change. The production build passes.No open PR gains a conflict from this branch.
🤖 Generated with Claude Code