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
Routine: the switch under Progression is called Deload routine and says what it does, and the progression choice is explained under it (#294)
Duarte Santos6a10b13c7ce5
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.jsindex 09b676314..03d02609c 100644--- a/frontend/src/lib/pt-br-locale.test.js+++ b/frontend/src/lib/pt-br-locale.test.js@@ -27,11 +27,11 @@ describe('Brazilian Portuguese locale', () => {.sort(byCodeUnit)const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(679)- expect(inherited).toHaveLength(678)+ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(680)+ expect(inherited).toHaveLength(680)// If this fails, review the changed keys and wording before accepting a new hash. From// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('452435ba59c6b477a6d6ff3eead25b7d3355d40dd5e29d7fbfca16debaf37015')+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('c047dadd0f7070905a992f4afd8848225bbbeeb983116f6988a55a702eccaa43')})test('does not leak European Portuguese UI terms', () => {diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.jsindex 6fcfe45c4..eb4d17600 100644--- a/frontend/src/locales/de.js+++ b/frontend/src/locales/de.js@@ -633,6 +633,9 @@ export default {'Exclude from automatic progression': 'Von der automatischen Progression ausschließen','Use for planned deloads. Workouts stay in history and statistics.': 'Für geplante Deloads. Workouts bleiben im Verlauf und in den Statistiken.','The next regular target continues from the last included workout.': 'Das nächste reguläre Ziel setzt beim letzten einbezogenen Workout fort.',+ 'Deload routine': 'Deload-Routine',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Ihre Workouts zählen nicht für die Progression. Sie bleiben im Verlauf und in den Statistiken.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Eine Deload-Routine startet mit den hier eingestellten Werten, die Progression oben gilt für sie nicht.','Linear progression': 'Lineare Progression','Greyskull LP': 'Greyskull LP','Double progression': 'Doppelte Progression',diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.jsindex c1a62d3af..8604b7c3d 100644--- a/frontend/src/locales/es.js+++ b/frontend/src/locales/es.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Excluir de la progresión automática','Use for planned deloads. Workouts stay in history and statistics.': 'Úsalo para descargas planificadas. Los entrenamientos permanecen en el historial y las estadísticas.','The next regular target continues from the last included workout.': 'El siguiente objetivo normal continúa desde el último entrenamiento incluido.',+ 'Deload routine': 'Rutina de descarga',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Sus entrenamientos no cuentan para la progresión. Siguen apareciendo en el historial y las estadísticas.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Una rutina de descarga empieza con los valores fijados aquí, así que la progresión de arriba no se le aplica.','Linear progression': 'Progresión lineal','Greyskull LP': 'Greyskull LP','Double progression': 'Progresión doble',diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.jsindex 30e769d70..0e219ef8a 100644--- a/frontend/src/locales/fr.js+++ b/frontend/src/locales/fr.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Exclure de la progression automatique','Use for planned deloads. Workouts stay in history and statistics.': 'À utiliser pour les semaines de décharge planifiées. Les séances restent dans l’historique et les statistiques.','The next regular target continues from the last included workout.': 'Le prochain objectif normal continue à partir de la dernière séance incluse.',+ 'Deload routine': 'Routine de décharge',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Ses séances ne comptent pas pour la progression. Elles restent dans l’historique et les statistiques.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Une routine de décharge démarre avec les valeurs définies ici, la progression ci-dessus ne s’y applique donc pas.','Linear progression': 'Progression linéaire','Greyskull LP': 'Greyskull LP','Double progression': 'Double progression',diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.jsindex 5b984d1a5..e2657def8 100644--- a/frontend/src/locales/hi.js+++ b/frontend/src/locales/hi.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'स्वचालित प्रोग्रेशन से बाहर रखें','Use for planned deloads. Workouts stay in history and statistics.': 'योजनाबद्ध डीलोड के लिए उपयोग करें। वर्कआउट इतिहास और आँकड़ों में रहते हैं।','The next regular target continues from the last included workout.': 'अगला सामान्य लक्ष्य अंतिम शामिल वर्कआउट से जारी रहता है।',+ 'Deload routine': 'डीलोड रूटीन',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'इसके वर्कआउट प्रोग्रेशन में नहीं गिने जाते। वे इतिहास और आँकड़ों में दिखते रहते हैं।',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'डीलोड रूटीन यहाँ तय किए गए आँकड़ों से शुरू होता है, इसलिए ऊपर वाला प्रोग्रेशन उस पर लागू नहीं होता।','Linear progression': 'रैखिक प्रोग्रेशन','Greyskull LP': 'Greyskull LP','Double progression': 'डबल प्रोग्रेशन',diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.jsindex a2beb1bb4..a3f11b8b7 100644--- a/frontend/src/locales/hu.js+++ b/frontend/src/locales/hu.js@@ -786,6 +786,9 @@ export default {'Exclude from automatic progression': 'Kihagyás az automatikus progresszióból','Use for planned deloads. Workouts stay in history and statistics.': 'Tervezett deloadhoz. Az edzések megmaradnak az előzményekben és a statisztikában.','The next regular target continues from the last included workout.': 'A következő normál cél az utolsó beszámított edzéstől folytatódik.',+ 'Deload routine': 'Deload rutin',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Az edzései nem számítanak bele a progresszióba. Az előzményekben és a statisztikában továbbra is megjelennek.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'A deload rutin az itt beállított értékekkel indul, így a fenti progresszió nem vonatkozik rá.','Open progression settings': 'Progresszió beállításainak megnyitása','Hevy is rate-limiting requests — wait a minute and try again': 'A Hevy korlátozza a kéréseket — várj egy percet, és próbáld újra',// --- log a past workout ---diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.jsindex e52480d67..ef545591f 100644--- a/frontend/src/locales/it.js+++ b/frontend/src/locales/it.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Escludi dalla progressione automatica','Use for planned deloads. Workouts stay in history and statistics.': 'Usa per gli scarichi programmati. Gli allenamenti restano nella cronologia e nelle statistiche.','The next regular target continues from the last included workout.': 'Il prossimo obiettivo normale continua dall’ultimo allenamento incluso.',+ 'Deload routine': 'Routine di scarico',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'I suoi allenamenti non contano per la progressione. Restano nella cronologia e nelle statistiche.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Una routine di scarico parte dai valori impostati qui, quindi la progressione qui sopra non si applica.','Linear progression': 'Progressione lineare','Greyskull LP': 'Greyskull LP','Double progression': 'Doppia progressione',diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.jsindex 07e3053b7..9e1f9efae 100644--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': '자동 증가에서 제외','Use for planned deloads. Workouts stay in history and statistics.': '계획된 디로딩에 사용합니다. 운동은 기록과 통계에 남습니다.','The next regular target continues from the last included workout.': '다음 일반 목표는 마지막으로 포함된 운동에서 이어집니다.',+ 'Deload routine': '디로딩 루틴',+ 'Its workouts do not count toward progression. They still show in history and statistics.': '이 루틴의 운동은 점진적 증가에 반영되지 않습니다. 기록과 통계에는 계속 표시됩니다.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': '디로딩 루틴은 여기서 정한 수치로 시작하므로 위의 점진적 증가가 적용되지 않습니다.','Linear progression': '선형 증가','Greyskull LP': 'Greyskull LP','Double progression': '이중 점증',diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.jsindex 6b5c00184..410368264 100644--- a/frontend/src/locales/pl.js+++ b/frontend/src/locales/pl.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Wyklucz z automatycznej progresji','Use for planned deloads. Workouts stay in history and statistics.': 'Użyj dla planowanych deloadów. Treningi pozostają w historii i statystykach.','The next regular target continues from the last included workout.': 'Następny zwykły cel bazuje na ostatnim uwzględnionym treningu.',+ 'Deload routine': 'Plan deloadowy',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Treningi z tego planu nie wliczają się do progresji. Nadal są widoczne w historii i statystykach.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Plan deloadowy zaczyna się od ustawionych tutaj wartości, więc progresja powyżej go nie dotyczy.','Linear progression': 'Progresja liniowa','Greyskull LP': 'Greyskull LP','Double progression': 'Podwójna progresja',diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.jsindex 54b70d992..e9264df16 100644--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@ -82,6 +82,7 @@ export const PT_BR_OVERRIDES = {'Exclude from automatic progression': 'Excluir da progressão automática','Use for planned deloads. Workouts stay in history and statistics.': 'Use para deloads planejados. Os treinos permanecem no histórico e nas estatísticas.','The next regular target continues from the last included workout.': 'A próxima meta normal continua a partir do último treino incluído.',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Os treinos dela não contam para a progressão. Continuam aparecendo no histórico e nas estatísticas.','Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Toque no botão de vínculo de um exercício para combiná-lo em um superset com o exercício acima — eles serão feitos em sequência.','Delete routine?': 'Excluir rotina?','Delete routine': 'Excluir rotina',diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.jsindex 704aea13d..45beb81e9 100644--- a/frontend/src/locales/pt.js+++ b/frontend/src/locales/pt.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Excluir da progressão automática','Use for planned deloads. Workouts stay in history and statistics.': 'Use para deloads planeados. Os treinos permanecem no histórico e nas estatísticas.','The next regular target continues from the last included workout.': 'O próximo objetivo normal continua a partir do último treino incluído.',+ 'Deload routine': 'Rotina de deload',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Os seus treinos não contam para a progressão. Continuam a aparecer no histórico e nas estatísticas.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Uma rotina de deload começa com os valores definidos aqui, por isso a progressão acima não se aplica a ela.','Linear progression': 'Progressão linear','Greyskull LP': 'Greyskull LP','Double progression': 'Progressão dupla',diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.jsindex 8fd5fe98e..8d01d3101 100644--- a/frontend/src/locales/ru.js+++ b/frontend/src/locales/ru.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Исключить из автоматической прогрессии','Use for planned deloads. Workouts stay in history and statistics.': 'Используйте для плановых разгрузок. Тренировки остаются в истории и статистике.','The next regular target continues from the last included workout.': 'Следующая обычная цель продолжает прогрессию от последней учтённой тренировки.',+ 'Deload routine': 'Разгрузочная программа',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Её тренировки не учитываются в прогрессии. Они по-прежнему видны в истории и статистике.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Разгрузочная программа начинается с заданных здесь значений, поэтому прогрессия выше к ней не применяется.','Linear progression': 'Линейная прогрессия','Greyskull LP': 'Greyskull LP','Double progression': 'Двойная прогрессия',diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.jsindex 443110b97..b768b7a4e 100644--- a/frontend/src/locales/th.js+++ b/frontend/src/locales/th.js@@ -794,6 +794,9 @@ export default {'Exclude from automatic progression': 'ไม่รวมในการเพิ่มน้ำหนักอัตโนมัติ','Use for planned deloads. Workouts stay in history and statistics.': 'ใช้สำหรับดีโหลดที่วางแผนไว้ การฝึกยังอยู่ในประวัติและสถิติ','The next regular target continues from the last included workout.': 'เป้าหมายปกติครั้งถัดไปจะต่อจากการฝึกล่าสุดที่นับรวม',+ 'Deload routine': 'รูทีนดีโหลด',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'การฝึกของรูทีนนี้ไม่นับรวมในการเพิ่มระดับ แต่ยังแสดงในประวัติและสถิติ',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'รูทีนดีโหลดเริ่มจากค่าที่ตั้งไว้ที่นี่ การเพิ่มระดับด้านบนจึงไม่มีผลกับรูทีนนี้','Open progression settings': 'เปิดการตั้งค่าการเพิ่มน้ำหนัก','Hevy is rate-limiting requests — wait a minute and try again': 'Hevy จำกัดจำนวนคำขอ — รอสักครู่แล้วลองอีกครั้ง',// --- log a past workout ---diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.jsindex 2514ec33a..f40daf16a 100644--- a/frontend/src/locales/tr.js+++ b/frontend/src/locales/tr.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': 'Otomatik ilerlemeden hariç tut','Use for planned deloads. Workouts stay in history and statistics.': 'Planlı deloadlar için kullanın. Antrenmanlar geçmişte ve istatistiklerde kalır.','The next regular target continues from the last included workout.': 'Sonraki normal hedef, dahil edilen son antrenmandan devam eder.',+ 'Deload routine': 'Deload rutini',+ 'Its workouts do not count toward progression. They still show in history and statistics.': 'Antrenmanları ilerlemeye sayılmaz. Geçmişte ve istatistiklerde görünmeye devam eder.',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': 'Deload rutini burada belirlenen değerlerle başlar, bu yüzden yukarıdaki ilerleme ona uygulanmaz.','Linear progression': 'Doğrusal ilerleme','Greyskull LP': 'Greyskull LP','Double progression': 'Çift ilerleme',diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.jsindex 7fbe94fe8..bd8068053 100644--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@ -614,6 +614,9 @@ export default {'Exclude from automatic progression': '不计入自动进阶','Use for planned deloads. Workouts stay in history and statistics.': '用于计划性减载。训练仍保留在历史记录和统计中。','The next regular target continues from the last included workout.': '下一个常规目标从上一次计入的训练继续。',+ 'Deload routine': '减载训练日',+ 'Its workouts do not count toward progression. They still show in history and statistics.': '它的训练不计入进阶,但仍会显示在历史记录和统计中。',+ 'A deload routine opens at the numbers set here, so the progression above does not apply to it.': '减载训练日按这里设定的数值开始,因此上面的进阶方式对它不适用。','Linear progression': '线性进阶','Greyskull LP': 'Greyskull LP','Double progression': '双重进阶',diff --git a/frontend/src/views/RoutineEdit.jsx b/frontend/src/views/RoutineEdit.jsxindex b6b18d103..3f1d8cee7 100644--- a/frontend/src/views/RoutineEdit.jsx+++ b/frontend/src/views/RoutineEdit.jsx@@ -359,8 +359,13 @@ export default function RoutineEdit() {<SelectRow icon="chartLine" title={t('Progression')} sheetTitle={t('Progression')}value={r.prog || 'linear'} onChange={v => update(s => { s.routines.find(x => x.id === id).prog = v })}options={POLICIES_FOR.reps.map(p => ({ value: p, label: t(POLICY_NAME[p]), subtitle: t(POLICY_DESC[p]) }))} />- <Row icon="pause" iconTint="var(--orange)" title={t('Exclude from automatic progression')}- subtitle={t('Use for planned deloads. Workouts stay in history and statistics.')}>+ {/* Two controls that read alike and are not (issue #294). Progression picks how this+ routine's own targets move, and "No automatic progression" keeps them where they are.+ This switch decides whether the routine's workouts count at all: a deload routine's+ sessions open at its own numbers and are never the baseline the next regular session+ progresses from (session-start.js, history.js entryExcluded). */}+ <Row icon="pause" iconTint="var(--orange)" title={t('Deload routine')}+ subtitle={t('Its workouts do not count toward progression. They still show in history and statistics.')}><Switch checked={r.excludeFromProgression === true} onChange={v => update(s => {const routine = s.routines.find(x => x.id === id)if (v) routine.excludeFromProgression = true@@ -370,8 +375,8 @@ export default function RoutineEdit() {</div><div className="small dim" style={{ margin: '-10px 2px 16px' }}>{r.excludeFromProgression- ? t('The next regular target continues from the last included workout.')- : t('Applies to every exercise in this routine that does not set its own rule.')}+ ? t('A deload routine opens at the numbers set here, so the progression above does not apply to it.') + ' ' + t('The next regular target continues from the last included workout.')+ : t(POLICY_DESC[r.prog || 'linear'] || POLICY_DESC.linear) + ' ' + t('Applies to every exercise in this routine that does not set its own rule.')}</div>{missingCount > 0 && <div className="card" style={{ marginBottom: 16, borderColor: 'var(--orange)' }}>diff --git a/frontend/src/views/RoutineEdit.progression.test.jsx b/frontend/src/views/RoutineEdit.progression.test.jsxnew file mode 100644index 000000000..ba1c3d3e5--- /dev/null+++ b/frontend/src/views/RoutineEdit.progression.test.jsx@@ -0,0 +1,78 @@+// @vitest-environment happy-dom+// Issue #294: "Progression" (with its "No automatic progression" choice) and the switch below it+// read like two settings for the same thing. They are not, and the screen now says how.+import React, { act } from 'react'+import { createRoot } from 'react-dom/client'+import { MemoryRouter, Route, Routes } from 'react-router-dom'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import RoutineEdit from './RoutineEdit.jsx'+import { DEF, useStore } from '../store/useStore.js'+import { POLICY_DESC } from '../lib/progression.js'++vi.mock('../lib/api.js', () => ({ api: vi.fn(() => Promise.resolve({})) }))+vi.mock('../sheets.jsx', () => ({ glyphPicker: vi.fn(), exercisePicker: vi.fn(), exConfigSheet: vi.fn(), confirmSheet: vi.fn() }))+vi.mock('../components/Media.jsx', () => ({ Thumb: () => null }))+vi.mock('../components/BodyMap.jsx', () => ({ default: () => null }))++globalThis.IS_REACT_ACT_ENVIRONMENT = true+const clone = value => JSON.parse(JSON.stringify(value))++let root+let container++function renderRoutine(routine) {+ const S = clone(DEF)+ S.routines = [{ id: 'r1', name: 'Push', emoji: 'dumbbell', ex: [], ...routine }]+ useStore.setState({ S, user: null })+ container = document.createElement('div')+ document.body.appendChild(container)+ root = createRoot(container)+ act(() => root.render(+ <MemoryRouter initialEntries={['/routine/r1']}>+ <Routes><Route path="/routine/:id" element={<RoutineEdit />} /></Routes>+ </MemoryRouter>+ ))+}++const rowTitled = title => [...container.querySelectorAll('.lrow')].find(r => r.querySelector('.lrow-t')?.textContent === title)+const note = () => container.querySelector('.sect-b + .small.dim').textContent++beforeEach(() => { localStorage.clear() })+afterEach(() => {+ if (root) act(() => root.unmount())+ if (container) container.remove()+ root = null+ container = null+})++describe('routine progression wording (#294)', () => {+ it('names the switch for what it is: a deload routine, whose workouts do not count', () => {+ renderRoutine({})+ expect(rowTitled('Exclude from automatic progression')).toBeUndefined()+ const row = rowTitled('Deload routine')+ expect(row).toBeTruthy()+ expect(row.querySelector('.lrow-s').textContent).toBe('Its workouts do not count toward progression. They still show in history and statistics.')+ })++ it('says under the section what the chosen progression does, "no automatic progression" included', () => {+ renderRoutine({ prog: 'off' })+ expect(note()).toBe(POLICY_DESC.off + ' Applies to every exercise in this routine that does not set its own rule.')+ act(() => root.unmount())+ container.remove()+ renderRoutine({})+ expect(note().startsWith(POLICY_DESC.linear)).toBe(true)+ })++ it('once it is a deload routine, says the progression choice does not apply to it', () => {+ renderRoutine({ excludeFromProgression: true })+ expect(note()).toBe('A deload routine opens at the numbers set here, so the progression above does not apply to it. The next regular target continues from the last included workout.')+ })++ it('the switch still writes the same routine flag the session builder reads', () => {+ renderRoutine({})+ act(() => rowTitled('Deload routine').querySelector('[role="switch"]').click())+ expect(useStore.getState().S.routines[0].excludeFromProgression).toBe(true)+ act(() => rowTitled('Deload routine').querySelector('[role="switch"]').click())+ expect(useStore.getState().S.routines[0].excludeFromProgression).toBeUndefined()+ })+})