warm-ups: keep them out of volume, and make the ramp follow the weight
Three defects, all of them latent before v1.2.10 and live the moment a routine started planning warm-ups by default. workoutVolume counted warm-up rows. It was the only consumer that did — onerm, muscles, recovery and progression all filter them — while the config sheet tells users in so many words that warm-ups are "left out of volume, records and progression", and a comment in this very file asserts it. Three planned warm-ups on a 3x5 at 100kg reported 2562.5 instead of 1500, and that number is written into the finished workout, so it would have stayed wrong forever. The ramp aimed at last session's weight. buildSets prepends the warm-ups and applyPrescription rewrites work rows only, by design — so nothing ever re-derived the ramp once progression moved the target. Deload 100 -> 50 produced warm-ups of 50 and 75 under work sets of 50: the second "warm-up" heavier than everything it was warming up for. applyPrescription now finishes by re-ramping, which is where the invariant cannot be forgotten, rather than at the two call sites where it already was. A logged warm-up keeps its weight and becomes what the next one ramps from — it happened, and rewriting performed work is data loss. insertWarmupRow's early return was unclamped. Once a warm-up sat above the work weight, every warm-up added after it inherited that number. The clamp guarded only the other branch. A hand-edited row stays as typed; what stops is the inheritance.
This commit is contained in:
1 parent
8104539932
commit
287550df6c
5 files changed
+129
-8
No files matched your search
@@ -1014,7 +1014,8 @@ export function beginWorkout(routineId, bw) {
|
||||
// kept on the entry purely so the workout can explain the number it chose.
|
||||
const entries = (r ? r.ex : []).map(cfg => {
|
||||
const plan = nextPrescription(st, cfg, r)
|
||||
const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step: defaultIncrement(cfg.id, st.unit) }), plan), cfg)
|
||||
const step = defaultIncrement(cfg.id, st.unit)
|
||||
const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step }), plan, step), cfg)
|
||||
return { id: cfg.id, sg: cfg.sg, target: { ...cfg }, plan, sets }
|
||||
})
|
||||
update(s => {
|
||||
|
||||
Reference in new issue
Block a user