diff --git a/frontend/src/views/Workout.jsx b/frontend/src/views/Workout.jsx index 3dda366..a3322c1 100644 --- a/frontend/src/views/Workout.jsx +++ b/frontend/src/views/Workout.jsx @@ -79,13 +79,21 @@ function ExerciseBlock({ entryIdx, compact, onToggle, onField, onAddSet, onRemov const col3 = mode === 'reps' ? { f: 'rir', step: 0.5, dec: true, hd: t('RIR') } : null // Uses the shared stepper markup so a set row picks up the same control styling // as every other +/- field in the app. - const cell = (s, i, col, cls) => ( -
- - onField(i, col.f, v)} /> - -
- ) + const cell = (s, i, col, cls) => { + // Logging RIR is the last thing you do for a set — it means you just finished it, so it + // checks the set off by itself instead of making you tap Done separately. Only fires once + // (guarded by !s.done) so editing RIR on an already-done set doesn't re-trigger the beep/ + // rest timer, and never applies to weight/reps, which you can set before you've lifted. + const markDoneFromRir = () => { if (col.f === 'rir' && !s.done) onToggle(i) } + const set = v => { onField(i, col.f, v); markDoneFromRir() } + return ( +
+ + + +
+ ) + } return <>