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.

feat: isolate planned deloads from progression

tkyouw26579e42612b
diff --git a/frontend/src/lib/finish-workout.js b/frontend/src/lib/finish-workout.js
index e1de54c7a..1151ed4ee 100644
--- a/frontend/src/lib/finish-workout.js
+++ b/frontend/src/lib/finish-workout.js
@@ -35,6 +35,7 @@ export function buildCompletedWorkout(active, { end = Date.now(), prs = [], snap
bw: active.bw,
entries,
prs,
+ ...(active.excludeFromProgression === true ? { excludeFromProgression: true } : {}),
...(sessionNote ? { note: sessionNote } : {}),
}
}
diff --git a/frontend/src/lib/finish-workout.test.js b/frontend/src/lib/finish-workout.test.js
index 8f8e2c529..3c6641acc 100644
--- a/frontend/src/lib/finish-workout.test.js
+++ b/frontend/src/lib/finish-workout.test.js
@@ -15,6 +15,18 @@ describe('completed workout boundary', () => {
})
})
+ it('persists progression exclusion only for a marked session', () => {
+ const active = {
+ id: 'active-1', d: '2026-08-08', start: 1000, routineId: 'routine-1', name: 'Deload', bw: 80,
+ excludeFromProgression: true,
+ entries: [{ id: '0025', sets: [{ done: true, w: 30, r: 8 }], target: { sets: 1, reps: 8 } }],
+ }
+ expect(buildCompletedWorkout(active, { end: 2000 }).excludeFromProgression).toBe(true)
+
+ const { excludeFromProgression, ...regular } = active
+ expect(buildCompletedWorkout(regular, { end: 2000 })).not.toHaveProperty('excludeFromProgression')
+ })
+
it('persists a muscle snapshot only when the caller supplies one', () => {
const active = {
id: 'active-1', d: '2026-08-08', start: 1000,
diff --git a/frontend/src/lib/history.js b/frontend/src/lib/history.js
index edac2772f..a2a5c9918 100644
--- a/frontend/src/lib/history.js
+++ b/frontend/src/lib/history.js
@@ -312,9 +312,11 @@ function buildWorkSets(S, cfg, options = {}) {
const n = Math.max(1, cfg.sets || 1)
const mode = modeOf(cfg)
const preferLast = !!options.preferLast
+ const useTarget = !!options.useTarget
const sets = []
- // Last time's set at the same position, falling back to its final set when the plan grew.
- const prevAt = i => (last ? (last.sets[i] || last.sets[last.sets.length - 1]) : null)
+ // A deload routine must use its own prescription instead of carrying regular-session values
+ // into the workout. Other planned sessions keep the existing history-first behaviour.
+ const prevAt = i => (!useTarget && last ? (last.sets[i] || last.sets[last.sets.length - 1]) : null)
if (mode === 'cardio') {
for (let i = 0; i < n; i++) {
@@ -339,7 +341,9 @@ function buildWorkSets(S, cfg, options = {}) {
const usable = prev && prev.r > 0 ? prev : null
// Planned sessions may use the confirmed working weight, while freestyle should reproduce
// the load of each matching set when that option is requested.
- const w = preferLast && usable ? usable.w : (conf && conf.w > 0 ? conf.w : (usable ? usable.w : cfg.weight))
+ const w = useTarget
+ ? cfg.weight
+ : preferLast && usable ? usable.w : (conf && conf.w > 0 ? conf.w : (usable ? usable.w : cfg.weight))
sets.push({ w, r: usable ? usable.r : cfg.reps, done: false })
}
return sets
diff --git a/frontend/src/lib/history.test.js b/frontend/src/lib/history.test.js
index 12eec2b90..f74c6a4f0 100644
--- a/frontend/src/lib/history.test.js
+++ b/frontend/src/lib/history.test.js
@@ -493,6 +493,14 @@ describe('buildSets', () => {
.toEqual([{ w: 60, r: 10, done: false }, { w: 62.5, r: 8, done: false }])
})
+ it('can use a deload target without carrying regular-session values into it', () => {
+ const S = { exWeights: { [LIFT]: { w: 75 } }, workouts: [{ d: '2026-01-01', entries: [{ id: LIFT, sets: [
+ { w: 75, r: 10, done: true }, { w: 75, r: 9, done: true }
+ ] }] }] }
+ expect(buildSets(S, { id: LIFT, sets: 2, reps: 12, weight: 40 }, { useTarget: true }))
+ .toEqual([{ w: 40, r: 12, done: false }, { w: 40, r: 12, done: false }])
+ })
+
})
describe('applyIntensifierPlan', () => {
diff --git a/frontend/src/lib/plan-share.js b/frontend/src/lib/plan-share.js
index 7c8275766..0d264789b 100644
--- a/frontend/src/lib/plan-share.js
+++ b/frontend/src/lib/plan-share.js
@@ -79,7 +79,10 @@ function cleanIntensifier(x) {
/** Build the shareable bundle: every routine, the week schedule, referenced customs. */
export function buildPlanBundle(S, name) {
const routines = (S.routines || []).map(r => ({
- id: r.id, name: r.name, emoji: r.emoji, ...(r.prog ? { prog: r.prog } : {}), ex: (r.ex || []).map(cleanEx)
+ id: r.id, name: r.name, emoji: r.emoji,
+ ...(r.prog ? { prog: r.prog } : {}),
+ ...(r.excludeFromProgression === true ? { excludeFromProgression: true } : {}),
+ ex: (r.ex || []).map(cleanEx)
}))
const usedIds = new Set(routines.flatMap(r => r.ex.map(e => e.id)))
const customEx = (S.customEx || [])
@@ -160,6 +163,7 @@ export function mergePlan(s, bundle, { schedule } = {}) {
name: r.name || t('Shared routine'),
emoji: r.emoji,
...(r.prog ? { prog: r.prog } : {}),
+ ...(r.excludeFromProgression === true ? { excludeFromProgression: true } : {}),
ex: (r.ex || []).map(e => ({ ...e, id: exIdMap[e.id] || e.id }))
})
})
diff --git a/frontend/src/lib/plan-share.test.js b/frontend/src/lib/plan-share.test.js
index ccb5bf885..36619e866 100644
--- a/frontend/src/lib/plan-share.test.js
+++ b/frontend/src/lib/plan-share.test.js
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
-import { buildPlanBundle, parsePlan } from './plan-share.js'
+import { buildPlanBundle, mergePlan, parsePlan } from './plan-share.js'
// There was no test file for plan sharing at all, which is how a whole prescription field
// went missing without anyone noticing.
@@ -24,6 +24,17 @@ describe('what survives a shared plan', () => {
expect(roundTrip({ warmupSets: 3 }).warmupSets).toBe(3)
})
+ it('carries progression exclusion on a routine through export and merge', () => {
+ const source = stateWith({})
+ source.routines[0].excludeFromProgression = true
+ const bundle = parsePlan(buildPlanBundle(source, 'Plan'))
+ const target = { routines: [], week: {}, customEx: [] }
+
+ expect(bundle.routines[0].excludeFromProgression).toBe(true)
+ mergePlan(target, bundle)
+ expect(target.routines[0].excludeFromProgression).toBe(true)
+ })
+
it('drops an intensifier it does not recognise rather than passing it on', () => {
expect(roundTrip({ intensifier: { type: 'nonsense', count: 3 } }).intensifier).toBeUndefined()
})
diff --git a/frontend/src/lib/progression.js b/frontend/src/lib/progression.js
index eb9681824..33c8859c5 100644
--- a/frontend/src/lib/progression.js
+++ b/frontend/src/lib/progression.js
@@ -134,6 +134,10 @@ export function readSession(entry, fallback) {
export function sessionsFor(S, exId, fallback) {
const out = []
;(S.workouts || []).forEach(w => {
+ // A planned deload remains a real workout for history and statistics, but it cannot become
+ // the baseline for the next regular prescription. The routine flag is copied onto the
+ // active session, then onto this completed workout, so later routine edits do not rewrite it.
+ if (w.excludeFromProgression === true) return
const entry = w.entries.find(e => e.id === exId)
if (entry && entry.sets.some(s => s.done && !isWarmupRow(s))) out.push({ d: w.d, ...readSession(entry, fallback) })
})
diff --git a/frontend/src/lib/progression.test.js b/frontend/src/lib/progression.test.js
index 7cc1c5188..86df172c6 100644
--- a/frontend/src/lib/progression.test.js
+++ b/frontend/src/lib/progression.test.js
@@ -374,6 +374,25 @@ describe('sessionsFor', () => {
expect(sessionsFor(S, LIFT).map(s => s.d)).toEqual(['2026-01-01'])
})
+ it('ignores marked deload workouts when it calculates the next regular target', () => {
+ const target = { sets: 3, reps: 5, weight: 60 }
+ const entry = (weight, reps) => ({
+ id: LIFT,
+ target: { ...target, weight },
+ sets: reps.map(r => ({ w: weight, r, done: true }))
+ })
+ const S = {
+ unit: 'kg',
+ workouts: [
+ { d: '2026-01-01', entries: [entry(60, [5, 5, 5])] },
+ { d: '2026-01-08', excludeFromProgression: true, entries: [entry(30, [8, 8])] }
+ ]
+ }
+
+ expect(sessionsFor(S, LIFT).map(s => s.d)).toEqual(['2026-01-01'])
+ expect(nextPrescription(S, { id: LIFT, ...target, prog: 'linear' }).weight).toBe(62.5)
+ })
+
it('reads a legacy entry that has no target without crashing', () => {
const S = { unit: 'kg', workouts: [{ d: '2026-01-01', entries: [{ id: LIFT, sets: [{ w: 60, r: 5, done: true }] }] }] }
expect(sessionsFor(S, LIFT)).toHaveLength(1)
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js
index 91a4a63a8..10eac76ac 100644
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@ -27,7 +27,7 @@ describe('Brazilian Portuguese locale', () => {
.sort(byCodeUnit)
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(291)
+ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(294)
expect(inherited).toHaveLength(449)
// If this fails, review the changed keys and wording before accepting a new hash. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 8c911556c..9b352543b 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -537,6 +537,9 @@ export default {
'Step (seconds)': 'Schritt (Sekunden)',
'Reps from': 'Wdh. ab',
'No automatic progression': 'Keine automatische Progression',
+ '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.',
'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.js
index b1ea117af..17ff5b201 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Incremento (segundos)',
'Reps from': 'Reps desde',
'No automatic progression': 'Sin progresión automática',
+ '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.',
'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.js
index 387bf2564..6211afc8a 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Palier (secondes)',
'Reps from': 'Reps à partir de',
'No automatic progression': 'Pas de progression automatique',
+ '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.',
'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.js
index 09038df9c..049a024ce 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'स्टेप (सेकंड)',
'Reps from': 'रेप्स से',
'No automatic progression': 'कोई स्वचालित प्रोग्रेशन नहीं',
+ 'Exclude from automatic progression': 'स्वचालित प्रोग्रेशन से बाहर रखें',
+ 'Use for planned deloads. Workouts stay in history and statistics.': 'योजनाबद्ध डीलोड के लिए उपयोग करें। वर्कआउट इतिहास और आँकड़ों में रहते हैं।',
+ 'The next regular target continues from the last included workout.': 'अगला सामान्य लक्ष्य अंतिम शामिल वर्कआउट से जारी रहता है।',
'Linear progression': 'रैखिक प्रोग्रेशन',
'Greyskull LP': 'Greyskull LP',
'Double progression': 'डबल प्रोग्रेशन',
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index 1c53c34ac..a9a819217 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Incremento (secondi)',
'Reps from': 'Rip. da',
'No automatic progression': 'Nessuna progressione automatica',
+ '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.',
'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.js
index 170f6d375..2c2287e2c 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': '증가폭 (초)',
'Reps from': '최소 횟수',
'No automatic progression': '자동 증가 없음',
+ 'Exclude from automatic progression': '자동 증가에서 제외',
+ 'Use for planned deloads. Workouts stay in history and statistics.': '계획된 디로딩에 사용합니다. 운동은 기록과 통계에 남습니다.',
+ 'The next regular target continues from the last included workout.': '다음 일반 목표는 마지막으로 포함된 운동에서 이어집니다.',
'Linear progression': '선형 증가',
'Greyskull LP': 'Greyskull LP',
'Double progression': '이중 점증',
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index b914fbc37..cca40360f 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Skok (sekundy)',
'Reps from': 'Powt. od',
'No automatic progression': 'Bez automatycznej progresji',
+ '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.',
'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.js
index 11022ba6b..177cab5f4 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -59,6 +59,9 @@ export const PT_BR_OVERRIDES = {
'Create one or load the starter plan.': 'Crie uma ou carregue o plano inicial.',
'Load starter plan (Push / Pull / Legs)': 'Carregar plano inicial (Push / Pull / Legs)',
'No exercises yet — add your first one.': 'Ainda não há exercícios — adicione o primeiro.',
+ '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.',
'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.js
index d14ccb131..dfc7292a8 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Incremento (segundos)',
'Reps from': 'Reps a partir de',
'No automatic progression': 'Sem progressão automática',
+ '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.',
'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.js
index 1e260d196..695a5505d 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Шаг (секунды)',
'Reps from': 'Повт. от',
'No automatic progression': 'Без автопрогрессии',
+ 'Exclude from automatic progression': 'Исключить из автоматической прогрессии',
+ 'Use for planned deloads. Workouts stay in history and statistics.': 'Используйте для плановых разгрузок. Тренировки остаются в истории и статистике.',
+ 'The next regular target continues from the last included workout.': 'Следующая обычная цель продолжает прогрессию от последней учтённой тренировки.',
'Linear progression': 'Линейная прогрессия',
'Greyskull LP': 'Greyskull LP',
'Double progression': 'Двойная прогрессия',
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 79b312557..2287c1ae4 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': 'Artış (saniye)',
'Reps from': 'Tekrar en az',
'No automatic progression': 'Otomatik ilerleme yok',
+ '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.',
'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.js
index 533434d66..c764c772d 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -519,6 +519,9 @@ export default {
'Step (seconds)': '加量(秒)',
'Reps from': '次数下限',
'No automatic progression': '不自动进阶',
+ 'Exclude from automatic progression': '不计入自动进阶',
+ 'Use for planned deloads. Workouts stay in history and statistics.': '用于计划性减载。训练仍保留在历史记录和统计中。',
+ 'The next regular target continues from the last included workout.': '下一个常规目标从上一次计入的训练继续。',
'Linear progression': '线性进阶',
'Greyskull LP': 'Greyskull LP',
'Double progression': '双重进阶',
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index 00ad49f9c..4c2885968 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -1028,14 +1028,19 @@ export function beginWorkout(routineId, bw) {
// The prescription is applied as the session is built, so you walk up to the bar with the
// right weight already on the screen instead of being told about it afterwards. `plan` is
// kept on the entry purely so the workout can explain the number it chose.
+ const excluded = r?.excludeFromProgression === true
const entries = (r ? r.ex : []).map(cfg => {
- const plan = nextPrescription(st, cfg, r)
+ const plan = excluded ? { policy: 'off', kind: 'off' } : nextPrescription(st, cfg, r)
const step = defaultIncrement(cfg.id, st.unit)
- const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step }), plan, step), cfg)
+ const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step, useTarget: excluded }), plan, step), cfg)
return { id: cfg.id, sg: cfg.sg, target: { ...cfg }, plan, sets }
})
update(s => {
- s.active = { id: uid(), d: todayISO(), start: Date.now(), routineId, name: r ? r.name : t('Freestyle'), bw: bw || null, cur: 0, entries }
+ s.active = {
+ id: uid(), d: todayISO(), start: Date.now(), routineId,
+ name: r ? r.name : t('Freestyle'), bw: bw || null, cur: 0, entries,
+ ...(excluded ? { excludeFromProgression: true } : {})
+ }
})
useUI.getState().stopRest()
nav('/workout')
diff --git a/frontend/src/views/RoutineEdit.jsx b/frontend/src/views/RoutineEdit.jsx
index a8c492c4d..0b82408ba 100644
--- a/frontend/src/views/RoutineEdit.jsx
+++ b/frontend/src/views/RoutineEdit.jsx
@@ -10,7 +10,7 @@ import { Thumb } from '../components/Media.jsx'
import { glyphPicker, exercisePicker, exConfigSheet, confirmSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { glyphOf } from '../lib/glyphs.js'
-import { Button, SelectRow } from '../components/ui.jsx'
+import { Button, Row, SelectRow, Switch } from '../components/ui.jsx'
import { POLICIES_FOR, POLICY_NAME, POLICY_DESC } from '../lib/progression.js'
import BodyMap from '../components/BodyMap.jsx'
import { loadOfRoutine, rankOf, MUSCLE_NAME } from '../lib/muscles.js'
@@ -58,9 +58,19 @@ 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.')}>
+ <Switch checked={r.excludeFromProgression === true} onChange={v => update(s => {
+ const routine = s.routines.find(x => x.id === id)
+ if (v) routine.excludeFromProgression = true
+ else delete routine.excludeFromProgression
+ })} />
+ </Row>
</div>
<div className="small dim" style={{ margin: '-10px 2px 16px' }}>
- {t('Applies to every exercise in this routine that does not set its own rule.')}
+ {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.')}
</div>
{missingCount > 0 && <div className="card" style={{ marginBottom: 16, borderColor: 'var(--orange)' }}>
diff --git a/mcp/src/tools.js b/mcp/src/tools.js
index edf77c573..d615b8569 100644
--- a/mcp/src/tools.js
+++ b/mcp/src/tools.js
@@ -82,7 +82,8 @@ export const listRoutines = {
emoji: r.emoji || null,
exercise_count: (r.ex || []).length,
superset_groups: [...new Set((r.ex || []).map(e => e.sg).filter(Boolean))].length || 0,
- policy: r.policy || 'off'
+ policy: r.policy || 'off',
+ exclude_from_progression: r.excludeFromProgression === true
}))
}
}
@@ -104,6 +105,7 @@ export const getRoutine = {
emoji: r.emoji || null,
policy: r.policy || 'off',
policy_name: policyName(r.policy || 'off'),
+ exclude_from_progression: r.excludeFromProgression === true,
unit: S.unit || 'kg',
exercises: (r.ex || []).map((cfg, i) => {
const ex = exOr(cfg.id)
diff --git a/mcp/test/tools.test.js b/mcp/test/tools.test.js
index 17f2c708b..08cee4e1b 100644
--- a/mcp/test/tools.test.js
+++ b/mcp/test/tools.test.js
@@ -70,6 +70,15 @@ describe('list_routines', () => {
})
})
+ test('reports progression exclusion in routine summaries and details', () => {
+ S.routines[0].excludeFromProgression = true
+ const summary = call('list_routines').routines.find(r => r.id === S.routines[0].id)
+ const detail = call('get_routine', { routine_id: S.routines[0].id })
+
+ expect(summary.exclude_from_progression).toBe(true)
+ expect(detail.exclude_from_progression).toBe(true)
+ })
+
test('list_routines entries line up with get_routine (no id drift)', () => {
const list = call('list_routines').routines
list.forEach(summary => {