feat: isolate planned deloads from progression

This commit is contained in:
tkyouw committed 2026-08-26 09:54:24 +02:00
1 parent 5314b342ff
commit 26579e4261
25 files changed
+137 -12

No files matched your search

+3 -1
View File
@@ -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)
+9
View File
@@ -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 => {