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.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Follow-up to !140: "weighted tricep dips" is a bench dip and stays plain load
Duarte Santos1954ab9aaa8b
diff --git a/frontend/src/lib/structuralBalance.js b/frontend/src/lib/structuralBalance.jsindex 61a25a98d..e4de854d0 100644--- a/frontend/src/lib/structuralBalance.js+++ b/frontend/src/lib/structuralBalance.js@@ -29,9 +29,12 @@ const isAssistedEntry = entry => isAssisted(entry?.id ? { id: entry.id } : entry// as the belt alone, +20 kg for 5 would score a 23 kg pull-up. Bench dips and push-ups keep the// feet down and stay out, as does everything else on 'weighted' (a plate held for a crunch).const LIFTER_MOVEMENT = /\b(pull[- ]?ups?|chin[- ]?ups?|muscle[- ]?ups?|dips?)\b/i+// Bench dips whose name does not say so: "weighted tricep dips" (1755) is done seated off the+// edge of a bench, legs out in front, by its own instructions.+const BENCH_DIP_IDS = new Set(['1755'])const beltOnLifter = id => {const ex = EXIDX[id]- return ex?.eq === 'weighted' && LIFTER_MOVEMENT.test(ex.n) && !/\bbench/i.test(ex.n)+ return ex?.eq === 'weighted' && LIFTER_MOVEMENT.test(ex.n) && !/\bbench/i.test(ex.n) && !BENCH_DIP_IDS.has(id)}// What one completed set actually moved, in kg. On a bodyweight-configured entry `w` holds onlydiff --git a/frontend/src/lib/structuralBalance.test.js b/frontend/src/lib/structuralBalance.test.jsindex f16121d2b..c72314be0 100644--- a/frontend/src/lib/structuralBalance.test.js+++ b/frontend/src/lib/structuralBalance.test.js@@ -395,13 +395,14 @@ describe('a belt on a pull-up or a dip counts the lifter too', () => {})it('does the same for the other belt variants of pull-ups, chin-ups, muscle-ups and dips', () => {- for (const id of ['0841', '2987', '3290', '3286', '3313', '1755', '1767']) {+ for (const id of ['0841', '2987', '3290', '3286', '3313', '1767']) {expect(resolveCurrent(bw80([[id, 10, 1]]), [id], 80).estKg).toBeCloseTo(90)}})it('leaves bench dips, push-ups and the rest of the weighted catalogue as plain load', () => {- for (const id of ['0830', '1754', '1310', '0852', '0832']) {+ // 1755 "weighted tricep dips" is a bench dip by its instructions, though its name does not say so.+ for (const id of ['0830', '1754', '1755', '1310', '0852', '0832']) {expect(resolveCurrent(bw80([[id, 10, 1]]), [id], 80).estKg).toBeCloseTo(10)}})