Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Merge remote-tracking branch 'pr/388'

Duarte Santos214f9ab4a705
diff --cc frontend/src/lib/history.js
index a7da8fe47,6f7f7792d..ddf082eff
--- a/frontend/src/lib/history.js
+++ b/frontend/src/lib/history.js
@@@ -910,9 -797,13 +912,13 @@@ export function rerampWarmups(rows, ste
for (let i = 0; i < firstWork; i++) {
if (out[i].done) { from = out[i].w || 0; continue }
const w = target > from
- ? Math.max(0, Math.min(target, Math.floor((from + (target - from) / 2) / step) * step))
+ ? Math.min(target, Math.max(0, floor, Math.floor((from + (target - from) / 2) / step) * step))
: target
- out[i] = { ...out[i], w }
+ // A per-side warm-up ramps the same bar for both limbs: set each side's weight and resync
+ // the aggregate, so the L/R rows and the row's own `w` agree. A straight row sets `w` alone.
+ out[i] = isSideSet(out[i])
+ ? syncSideAggregate({ ...out[i], sides: { L: { ...out[i].sides.L, w }, R: { ...out[i].sides.R, w } } })
+ : { ...out[i], w }
from = w
}
return out
diff --cc frontend/src/views/Workout.jsx
index 5339e4eea,adc771a8b..2960df53f
--- a/frontend/src/views/Workout.jsx
+++ b/frontend/src/views/Workout.jsx
@@@ -671,18 -563,13 +671,19 @@@ function ExerciseBlock({ entryIdx, comp
return <div key={i}>
{isFirstWarmup && <div className="setph">{t('Warm-up')}</div>}
{!warm && warmBefore && <div className="setsep" />}
- {perSide && isSideSet(s) ? (
+ {/* A pyramid's Max set: the reps are what you managed, not a number to hit. */}
+ {/* With the record to beat at this set's weight or heavier, from before this session. */}
+ {!warm && s.max && <div className="setph">{t('Max: as many reps as you can')}{(() => {
+ const rec = maxRecordAt(H.workouts, entry.id, s.w)
+ if (!rec) return null
+ return ' · ' + (rec.w > 0 ? tn('Record: {0} rep at {1}', 'Record: {0} reps at {1}', rec.r, fmtNum(rec.w) + ' ' + S.unit) : tn('Record: {0} rep', 'Record: {0} reps', rec.r))
+ })()}</div>}
- {!pairTail && swipeRow(s, i, perSide && !warm && isSideSet(s) ? (
- // Unilateral work set: the number sits beside a two-row L/R stack, each side logged
- // and ticked on its own (issue #60).
++ {!pairTail && swipeRow(s, i, perSide && isSideSet(s) ? (
+ // Unilateral set: the number sits beside a two-row L/R stack, each side logged and
+ // ticked on its own (issue #60). Warm-ups split the same way as the work sets they
- // ramp toward — their rows are side sets too — so the `!warm` exclusion is gone; a
- // warm-up side set has no drops/bursts, so sideExtras renders nothing under it.
++ // ramp toward, so a warm-up side set shows L/R too (#388).
<div ref={el => onSetRowRef?.(i, el)} className={'setrow-side' + (s.done ? ' done' : '')}>
- <button type="button" className="n" aria-label={t('Set {0}', phaseNum)} title={t('More')} onClick={() => openSetMenu(s, i)}>{phaseNum}</button>
+ <button type="button" className="n" aria-label={t('Set {0}', phaseNum)} aria-describedby={optsId} title={t('More')} onClick={() => openSetMenu(s, i)}>{phaseNum}</button>
<div className="side-rows">
{sideRow(s, i, 'L', col1, col2, col3)}
{sideExtras(s, i, 'L')}