diff --git a/api/coach/core/schemas.js b/api/coach/core/schemas.js
index 9779e73..163b457 100644
--- a/api/coach/core/schemas.js
+++ b/api/coach/core/schemas.js
@@ -59,6 +59,11 @@ const EX_SCHEMA = {
required: ['id', 'sets']
};
+// `week` and `routines[].id` are required, not optional: the week is the only thing that says
+// which day trains which routine, and it points at a routine by id. A schema that leaves either
+// out lets a small local model answer with routines that have no id and a week naming "r1" —
+// grammar-valid, and something validate.js can only ever reject ("the week schedules 0 days but
+// 3 were asked for"), through the repair round and out as a failed job.
export const CREATE_SCHEMA = {
type: 'object',
properties: {
@@ -67,15 +72,22 @@ export const CREATE_SCHEMA = {
summary: STR,
basedOn: STR,
week: { type: 'object' },
+ // The caps are the validator's own (MAX_ROUTINES, MAX_EX_PER_ROUTINE), stated here as well
+ // because "1-7 routines, each 3-12 exercises" in create.md is only a request. A small model
+ // that starts repeating itself does not stop at a request: qwen2.5:3b walks the library id by
+ // id, three sets of eight apiece, until it hits the output limit — twelve minutes for an
+ // answer that arrives cut in half and cannot be parsed. maxItems ends that run at seven
+ // routines instead.
routines: {
type: 'array',
+ maxItems: 7,
items: {
type: 'object',
properties: {
id: STR, name: STR, emoji: STR, prog: STR, why: STR,
- ex: { type: 'array', items: EX_SCHEMA }
+ ex: { type: 'array', maxItems: 20, items: EX_SCHEMA }
},
- required: ['name', 'ex']
+ required: ['id', 'name', 'ex']
}
},
customEx: {
@@ -83,7 +95,7 @@ export const CREATE_SCHEMA = {
items: { type: 'object', properties: { id: STR, n: STR, bp: STR, desc: STR }, required: ['id', 'n'] }
}
},
- required: ['coach_contract', 'routines']
+ required: ['coach_contract', 'week', 'routines']
};
export const DEBRIEF_SCHEMA = {
diff --git a/api/test/prompt-split.test.js b/api/test/prompt-split.test.js
index 1b0072b..deb80c3 100644
--- a/api/test/prompt-split.test.js
+++ b/api/test/prompt-split.test.js
@@ -4,6 +4,7 @@ import { buildPrompt, buildPromptParts, taskOf } from '../coach/core/prompt.js';
import { SCHEMAS } from '../coach/core/schemas.js';
import { build, FULL_DETAIL_SESSIONS } from '../coach/core/payload.js';
import { chatCompletionsSpec } from '../coach/core/adapters/openai.js';
+import { validatePlan } from '../coach/core/validate.js';
const S = (workouts = []) => ({
lang: 'en', unit: 'kg', routines: [{ id: 'r1', name: 'A', ex: [{ id: '0001', sets: 3, reps: 8 }] }],
@@ -48,6 +49,32 @@ test('every task has a flat schema — no $ref, no anyOf/oneOf (llama.cpp gramma
assert.equal(taskOf('create', { refine: 'x' }), 'refine');
});
+test('the create schema requires what the week resolves through: a routine id, and a week', () => {
+ // A schema handed to a grammar-constrained decoder is the only thing standing between a small
+ // local model and an answer the validator can only reject. These two fields are where that
+ // showed: llama3.2:3b and qwen2.5:3b both answer with routines that carry no `id` and a week
+ // naming what they put in `name`, which costs a job and a repair round to find out.
+ assert.ok(SCHEMAS.create.properties.routines.items.required.includes('id'));
+ assert.ok(SCHEMAS.create.required.includes('week'));
+ assert.equal(SCHEMAS.refine, SCHEMAS.create); // refine reuses it, same guarantee
+
+ const noId = {
+ coach_contract: 1,
+ routines: [{ name: 'r1', ex: [{ id: '0001', sets: 3, reps: 8 }] }],
+ week: { 1: 'r1' }
+ };
+ const checked = validatePlan(noId, { daysPerWeek: 1 });
+ assert.ok(!checked.ok);
+ assert.ok(checked.errors.some(e => e.includes('week[1] points at "r1"')));
+});
+
+test('the create schema caps the two arrays the validator caps, so a repeating model stops', () => {
+ // validate.js slices at MAX_ROUTINES / MAX_EX_PER_ROUTINE; a model that never stops emitting
+ // otherwise runs to the output limit first and the answer arrives truncated and unparseable.
+ assert.equal(SCHEMAS.create.properties.routines.maxItems, 7);
+ assert.equal(SCHEMAS.create.properties.routines.items.properties.ex.maxItems, 20);
+});
+
test('older sessions in a review window are compacted, the recent ones keep full sets', () => {
const many = Array.from({ length: FULL_DETAIL_SESSIONS + 4 }, (_, i) => workout('2026-08-' + String(i + 1).padStart(2, '0')));
const p = build(S(many), { handle: 'h1', kind: 'review' });
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index c9d70aa..9a49fad 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -26,6 +26,7 @@ import Workout from './views/Workout.jsx'
import Stats from './views/Stats.jsx'
import History from './views/History.jsx'
import Library from './views/Library.jsx'
+import Muscles from './views/Muscles.jsx'
import Settings from './views/Settings.jsx'
import Admin from './views/Admin.jsx'
import CoachChat from './views/CoachChat.jsx'
@@ -123,6 +124,7 @@ function Shell() {
} />
} />
} />
+ } />
} />
{/* The Coach screens gate themselves on the instance config; the routes exist
unconditionally so a deep link from a notification lands somewhere sane
diff --git a/frontend/src/components/BodyMap.test.jsx b/frontend/src/components/BodyMap.test.jsx
index 1cc2b43..cc328bb 100644
--- a/frontend/src/components/BodyMap.test.jsx
+++ b/frontend/src/components/BodyMap.test.jsx
@@ -1,7 +1,7 @@
// @vitest-environment happy-dom
import React, { act } from 'react'
import { createRoot } from 'react-dom/client'
-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
+import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
import BodyMap, { BodyMapLegend } from './BodyMap.jsx'
globalThis.IS_REACT_ACT_ENVIRONMENT = true
@@ -9,6 +9,14 @@ globalThis.IS_REACT_ACT_ENVIRONMENT = true
let container
let root
+// BodyMap fetches its ~90 KB of geometry with a dynamic import on first render, and the
+// waitFor below allows one second for it. That is ample once the module is in the ESM
+// registry and not always ample when it is not: on a loaded CI runner the first map render
+// in this file paid the cold import and timed out, while every later test passed on the
+// component's warm CACHE. Import it here so the wait covers rendering, not module loading,
+// and the file stops depending on how fast the machine is.
+beforeAll(() => import('../lib/body-paths.js'))
+
beforeEach(() => {
container = document.createElement('div')
document.body.appendChild(container)
diff --git a/frontend/src/components/MuscleExplorer.jsx b/frontend/src/components/MuscleExplorer.jsx
new file mode 100644
index 0000000..e0cdfb6
--- /dev/null
+++ b/frontend/src/components/MuscleExplorer.jsx
@@ -0,0 +1,97 @@
+import { useMemo, useState } from 'react'
+import { useStore } from '../store/useStore.js'
+import { BODYPARTS, allExercises, equipmentOf, matchExercise } from '../lib/exercises.js'
+import { activeProfile, exAvailable } from '../lib/equipment.js'
+import { bestWeightFor } from '../lib/history.js'
+import { fmtNum } from '../lib/format.js'
+import { MUSCLES, MUSCLE_NAME, musclesOf } from '../lib/muscles.js'
+import { t, exerciseNameFor } from '../lib/i18n.js'
+import BodyMap from './BodyMap.jsx'
+import { Thumb } from './Media.jsx'
+import Icon from './Icon.jsx'
+import { Button } from './ui.jsx'
+import { tappable } from '../lib/use-sheet-keyboard.js'
+
+// One explorer for the Library and every catalogue picker. Supplying `onPick` turns
+// a result into a selection; without it the explorer behaves like the normal Library.
+export default function MuscleExplorer({ onPick, onDetail, onPlan }) {
+ const S = useStore(s => s.S)
+ const [selected, setSelected] = useState(null)
+ const [q, setQ] = useState('')
+ const [bp, setBp] = useState('')
+ const [eq, setEq] = useState('')
+ const [shown, setShown] = useState(40)
+ const [showAll, setShowAll] = useState(false) // ignore the active equipment profile for this session
+ // Same rule as the Library and the picker: the active equipment profile narrows the catalogue
+ // (and the per-muscle counts) unless the user asks for everything.
+ const profile = activeProfile(S)
+ const catalog = useMemo(() => {
+ const all = allExercises(S)
+ return (profile && !showAll) ? all.filter(e => exAvailable(S, e)) : all
+ }, [S.customEx, S.equipFilterOn, S.activeEquipId, S.equipProfiles, showAll])
+ const counts = useMemo(() => Object.fromEntries(MUSCLES.map(m => [m,
+ catalog.filter(e => musclesOf(e)[m]).length
+ ])), [catalog])
+ const pick = muscle => { setSelected(muscle === selected ? null : muscle); setEq(''); setShown(40) }
+ const targeted = selected ? catalog.filter(e => musclesOf(e)[selected]) : []
+ const base = targeted.filter(e => (!bp || e.bp === bp) && matchExercise(e, q))
+ const eqOpts = equipmentOf(base)
+ const eqOn = eqOpts.includes(eq) ? eq : ''
+ const exercises = eqOn ? base.filter(e => e.eq === eqOn) : base
+ const choose = ex => onPick ? onPick(ex) : onDetail(ex)
+
+ return <>
+ {profile &&
+
+ {showAll ? t('Showing all equipment') : t('Showing what you have in "{0}"', profile.name)}
+
+
}
+
+
+
+ {MUSCLES.map(m => )}
+
+
+
+ {!selected && onPick &&
{t('Choose a muscle to see exercises that train it.')}
}
+
+ {selected && <>
+
+
{t('Exercises for {0}', t(MUSCLE_NAME[selected]))}
+ {exercises.length > shown && <>>}
+ >}
+ >
+}
diff --git a/frontend/src/components/TabBar.jsx b/frontend/src/components/TabBar.jsx
index 156d4d7..d54e31c 100644
--- a/frontend/src/components/TabBar.jsx
+++ b/frontend/src/components/TabBar.jsx
@@ -13,7 +13,7 @@ export default function TabBar({ onStart }) {
const isGuest = useStore(s => s.isGuest())
if (!user && !isGuest) return null
const cur = loc.pathname.split('/')[1] || 'home'
- const on = k => cur === k || (cur === 'history' && k === 'stats') || (cur === 'settings' && k === 'home')
+ const on = k => cur === k || (cur === 'history' && k === 'stats') || (cur === 'settings' && k === 'home') || (cur === 'muscles' && k === 'library')
const startWorkout = () => {
if (!S.active) {
diff --git a/frontend/src/components/TimerFlash.jsx b/frontend/src/components/TimerFlash.jsx
index f620237..42efa31 100644
--- a/frontend/src/components/TimerFlash.jsx
+++ b/frontend/src/components/TimerFlash.jsx
@@ -1,8 +1,22 @@
+import { useEffect } from 'react'
import { useUI } from '../store/useUI.js'
-// A new key restarts the CSS sequence even when two timers finish close together.
-// The layer never catches taps and ends transparent, so it can safely stay mounted.
+// Flips the app's real light/dark theme on and off twice (~2.4s) instead of laying an
+// opaque black/white rectangle over the screen — the alert reads as the app itself
+// blinking, and it always settles back on whatever theme the user actually had.
export default function TimerFlash() {
const id = useUI(s => s.timerFlashId)
- return id ? : null
+ useEffect(() => {
+ if (!id) return
+ const de = document.documentElement
+ const original = de.dataset.theme
+ const opposite = original === 'light' ? 'dark' : 'light'
+ const steps = [opposite, original, opposite, original]
+ const timers = steps.map((theme, i) => setTimeout(() => { de.dataset.theme = theme }, i * 600))
+ return () => {
+ timers.forEach(clearTimeout)
+ de.dataset.theme = original
+ }
+ }, [id])
+ return null
}
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 9963d97..f53aee0 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -262,7 +262,7 @@ h4.sec{
display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;
}
.lrow.lrow-stack-value .lrow-m{grid-column:1;grid-row:1}
-.lrow.lrow-stack-value .lrow-v{grid-column:1;grid-row:2;text-align:left}
+.lrow.lrow-stack-value .lrow-v{grid-column:1;grid-row:2;width:100%;max-width:none;text-align:left}
.lrow.lrow-stack-value .lrow-c{grid-column:2;grid-row:1 / span 2;align-self:center}
/* an (i) before a row's control: painted small and dim so the control stays the loud thing,
but with a finger-sized target like everything else — the padding is the hit area and the
@@ -438,6 +438,7 @@ h4.sec{
}
.chip:active{background:var(--surface-2)}
.chip.on{background:var(--acc);color:var(--on-acc);font-weight:500}
+.chip.on .dim{color:color-mix(in srgb,var(--on-acc) 62%,transparent)}
/* =========================== CONTROLS ==================================== */
@@ -802,19 +803,6 @@ h4.sec{
.glyph-cell:active{transform:scale(.92)}
.glyph-cell.on{background:var(--acc);color:var(--on-acc)}
-/* --- opt-in timer completion flash ---
- Four deliberate pulses over 2.4s stay below three flashes per second. Transparent
- gaps keep the black and white pulses visually distinct. */
-.timer-flash{
- position:fixed;inset:0;z-index:1000;pointer-events:none;opacity:0;
- animation:timer-flash-four 2.4s linear both;
-}
-@keyframes timer-flash-four{
- 0%,20%,28%,48%,56%,76%,84%,100%{opacity:0}
- 4%,16%,60%,72%{background:#000;opacity:1}
- 32%,44%,88%,96%{background:#fff;opacity:1}
-}
-
/* --- big weight readout --- */
.bwstep{display:flex;align-items:center;justify-content:center;gap:18px;margin:14px 0 6px}
.bw-pm{
@@ -1010,6 +998,18 @@ h4.sec{
.ss-ex{position:relative}
.ss-amp{text-align:center;font-size:15px;font-weight:600;color:var(--acc);margin:14px 0 8px}
+/* --- workout list view: every unit stacked, the current one outlined --- */
+.workout-list{display:grid;gap:14px}
+.wl-unit{
+ border-radius:var(--r-lg);padding:14px 14px 4px;
+ background:var(--surface-2);
+}
+.wl-unit.cur{box-shadow:inset 0 0 0 1.5px var(--acc-line)}
+.wl-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
+@media (max-width:400px){
+ .wl-unit{padding:10px 8px 2px}
+}
+
/* --- home: today's session row --- */
.today-row{
display:flex;align-items:center;justify-content:space-between;gap:10px;
diff --git a/frontend/src/lib/finish-workout.js b/frontend/src/lib/finish-workout.js
index 1151ed4..cd2d827 100644
--- a/frontend/src/lib/finish-workout.js
+++ b/frontend/src/lib/finish-workout.js
@@ -1,11 +1,13 @@
// The persisted boundary for a finished session. Keep this pure so compatibility tests can
// exercise the exact shape the UI writes without mounting React or mutating store state.
+import { bestWeightForEntry } from './history.js'
+
export function buildCompletedWorkout(active, { end = Date.now(), prs = [], snapshotFor } = {}) {
const entries = (active?.entries || []).map(entry => {
const completed = {
id: entry.id,
sets: entry.sets,
- topW: entry.topW || null,
+ topW: bestWeightForEntry(entry) || null,
target: entry.target || null,
}
const snapshot = typeof snapshotFor === 'function' ? snapshotFor(entry) : null
diff --git a/frontend/src/lib/finish-workout.test.js b/frontend/src/lib/finish-workout.test.js
index 3c6641a..434d195 100644
--- a/frontend/src/lib/finish-workout.test.js
+++ b/frontend/src/lib/finish-workout.test.js
@@ -15,6 +15,36 @@ describe('completed workout boundary', () => {
})
})
+ it('derives topW from the highest completed non-warm-up work set, not stale entry data', () => {
+ const active = {
+ id: 'active-1', d: '2026-08-08', start: 1000,
+ entries: [{
+ id: '0025', topW: 80, target: { mode: 'reps', sets: 2, reps: 8 },
+ sets: [
+ { phase: 'warmup', done: true, w: 120, r: 8 },
+ { done: true, w: 75, r: 8 },
+ { done: true, w: 85, r: 7 },
+ { done: false, w: 100, r: 8 },
+ ],
+ }],
+ }
+
+ expect(buildCompletedWorkout(active).entries[0].topW).toBe(85)
+ expect(buildCompletedWorkout({
+ ...active,
+ entries: [{ ...active.entries[0], topW: 120 }],
+ }).entries[0].topW).toBe(85)
+ })
+
+ it('keeps a legacy topW when old completed rows have no usable weight', () => {
+ const active = {
+ id: 'active-1', d: '2026-08-08', start: 1000,
+ entries: [{ id: '0025', topW: 60, sets: [{ done: true, r: 8 }] }],
+ }
+
+ expect(buildCompletedWorkout(active).entries[0].topW).toBe(60)
+ })
+
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,
diff --git a/frontend/src/lib/history.js b/frontend/src/lib/history.js
index a44751e..bde541a 100644
--- a/frontend/src/lib/history.js
+++ b/frontend/src/lib/history.js
@@ -626,20 +626,24 @@ export function bestWeightForEntry(entry = {}) {
? entry.sets.filter(s => phaseForSet(s) === 'work')
: []
const repsRows = metricRowsForEntry(entry, 'reps')
- if (!repsRows.length) {
- return workRows.reduce((best, set) => {
- if (set?.done !== true || isWarmupRow(set)) return best
- const weight = Number(set.w)
- return Number.isFinite(weight) && weight > best ? weight : best
- }, 0)
- }
-
+ // Reps rows are the authoritative load metric for a mixed entry. Otherwise use every
+ // completed work row (timed holds can carry an added load too).
+ const completedRows = repsRows.length
+ ? repsRows
+ : workRows.filter(set => set?.done === true && !isWarmupRow(set))
let best = 0
- repsRows.forEach(set => {
+ let hasUsableWeight = false
+ completedRows.forEach(set => {
const weight = Number(set?.w)
- if (Number.isFinite(weight) && weight > best) best = weight
+ if (!Number.isFinite(weight)) return
+ hasUsableWeight = true
+ if (weight > best) best = weight
})
+ // A real completed row, including an explicit zero for an unloaded bodyweight set, always
+ // wins. A manual topW is only useful for old records whose rows did not carry a usable load.
+ if (hasUsableWeight) return best
+
const parentMode = modeForSet({}, target)
const hasNonRepsWorkRow = workRows.some(set => modeForSet(set, target) !== 'reps')
const hasWarmupRow = Array.isArray(entry.sets) && entry.sets.some(isWarmupRow)
diff --git a/frontend/src/lib/history.test.js b/frontend/src/lib/history.test.js
index ccd7fa2..a49ca44 100644
--- a/frontend/src/lib/history.test.js
+++ b/frontend/src/lib/history.test.js
@@ -501,6 +501,72 @@ describe('buildSets', () => {
.toEqual([{ w: 40, r: 12, done: false }, { w: 40, r: 12, done: false }])
})
+ it('uses the current routine target instead of another routine\'s bodyweight history', () => {
+ const S = {
+ exWeights: {},
+ workouts: [{
+ d: '2026-01-01',
+ routineId: 'routine-a',
+ entries: [{
+ id: BW,
+ target: { sets: 2, reps: 15, weight: 0, bodyweight: true },
+ sets: [{ w: 0, r: 15, done: true }, { w: 0, r: 15, done: true }]
+ }]
+ }]
+ }
+ const cfg = { id: BW, sets: 4, reps: 8, weight: 0, bodyweight: true, prog: 'off' }
+
+ expect(buildSets(S, cfg, { useTarget: true })).toEqual([
+ { w: 0, r: 8, done: false },
+ { w: 0, r: 8, done: false },
+ { w: 0, r: 8, done: false },
+ { w: 0, r: 8, done: false }
+ ])
+
+ const reverseS = {
+ exWeights: {},
+ workouts: [{
+ d: '2026-01-02',
+ routineId: 'routine-b',
+ entries: [{
+ id: BW,
+ target: { sets: 4, reps: 8, weight: 0, bodyweight: true },
+ sets: [
+ { w: 0, r: 8, done: true }, { w: 0, r: 8, done: true },
+ { w: 0, r: 8, done: true }, { w: 0, r: 8, done: true }
+ ]
+ }]
+ }]
+ }
+ expect(buildSets(reverseS, { ...cfg, sets: 2, reps: 15 }, { useTarget: true })).toEqual([
+ { w: 0, r: 15, done: false },
+ { w: 0, r: 15, done: false }
+ ])
+ })
+
+ it('preserves configured load, reps, duration and cardio targets when history is present', () => {
+ const repsS = {
+ exWeights: { [LIFT]: { w: 75 } },
+ workouts: [{ d: '2026-01-01', entries: [{ id: LIFT, sets: [{ w: 75, r: 15, done: true }] }] }]
+ }
+ expect(buildSets(repsS, { id: LIFT, sets: 2, reps: 8, weight: 40 }, { useTarget: true }))
+ .toEqual([{ w: 40, r: 8, done: false }, { w: 40, r: 8, done: false }])
+
+ const timedS = {
+ exWeights: {},
+ workouts: [{ d: '2026-01-02', entries: [{ id: LIFT, target: { mode: 'time' }, sets: [{ sec: 90, w: 20, done: true }] }] }]
+ }
+ expect(buildSets(timedS, { id: LIFT, mode: 'time', sets: 2, sec: 30, weight: 5 }, { useTarget: true }))
+ .toEqual([{ sec: 30, w: 5, done: false }, { sec: 30, w: 5, done: false }])
+
+ const cardioS = {
+ exWeights: {},
+ workouts: [{ d: '2026-01-03', entries: [{ id: CARDIO, sets: [{ min: 45, speed: 10, done: true }] }] }]
+ }
+ expect(buildSets(cardioS, { id: CARDIO, sets: 2, min: 20, speed: 8 }, { useTarget: true }))
+ .toEqual([{ min: 20, speed: 8, done: false }, { min: 20, speed: 8, done: false }])
+ })
+
})
describe('applyIntensifierPlan', () => {
diff --git a/frontend/src/lib/progression.js b/frontend/src/lib/progression.js
index 9b33cbd..48f36cc 100644
--- a/frontend/src/lib/progression.js
+++ b/frontend/src/lib/progression.js
@@ -61,6 +61,11 @@ export function defaultIncrement(exId, unit) {
if (unit === 'lb') return heavy ? 10 : 5
return heavy ? 5 : 2.5
}
+// Resolve the load step for reps-mode weight controls and progression. Timed exercises use
+// `inc` for seconds, so their optional weight column must not call this helper.
+export function weightIncrement(cfg, unit) {
+ return cfg && cfg.inc > 0 ? cfg.inc : defaultIncrement(cfg?.id, unit)
+}
export const DEFAULT_SEC_INCREMENT = 5
// Where adding another set of push-ups stops being progress and starts being a way to spend
// an evening. Past this the honest advice is load or a harder variation (issue #33).
@@ -76,18 +81,28 @@ export function policyFor(cfg, routine, mode) {
}
const round1 = v => Math.round(v * 10) / 10
-// Snap to a loadable multiple of the step.
-function snap(v, step) {
+// Snap to a loadable multiple of the step. Manual weight controls use this same normalization
+// so fractional increments produce the same number as automatic progression.
+export function snapWeight(v, step) {
if (!(step > 0)) return round1(v)
return round1(Math.round(v / step) * step)
}
+// A tap moves by one step. Snapping to the grid keeps the number identical to what progression
+// would prescribe (61.3 → 62.5 with a 1.25 step, not 62.55) — but only when the current value
+// already sits on that grid; from 62.5 with a 5 kg step a tap gives 67.5, not 70.
+export function stepWeight(value, step, direction) {
+ const v = Number(value) || 0
+ const onGrid = step > 0 && Math.abs(v - Math.round(v / step) * step) <= 0.1
+ const next = v + direction * step
+ return Math.max(0, onGrid ? snapWeight(next, step) : round1(next))
+}
// Back off by DELOAD_FACTOR, landing on something you can actually load. Rounding to the
// nearest step keeps the cut close to the intended 10 %, but on small weights the nearest
// step can be the weight you started from — so a deload that did not actually reduce
// anything takes one step down instead. Never goes below a single step.
function deloadTo(cur, step) {
- let next = snap(cur * DELOAD_FACTOR, step)
- if (next >= cur) next = snap(cur - step, step)
+ let next = snapWeight(cur * DELOAD_FACTOR, step)
+ if (next >= cur) next = snapWeight(cur - step, step)
return Math.max(step, next)
}
@@ -145,11 +160,15 @@ export function sessionsFor(S, exId, fallback) {
return out
}
-// How many sessions in a row ended in a miss, counting back from the most recent.
+// How many sessions in a row ended in a miss, counting back from the most recent. A change of
+// weight starts a new streak, so there won't be a perpetual stall.
+// Rationale: deload should reflect the failures in sessions with weight that earned it.
+// Not the lighter weight that follows.
export function stallCount(sessions) {
let n = 0
for (let i = sessions.length - 1; i >= 0; i--) {
if (sessions[i].ok) break
+ if (i < sessions.length -1 && sessions[i].weight !== sessions[i+1].weight) break
n++
}
return n
@@ -167,7 +186,9 @@ export function nextPrescription(S, cfg, routine) {
const mode = modeOf(cfg)
const policy = policyFor(cfg, routine, mode)
const unit = S.unit || 'kg'
- const inc = cfg.inc > 0 ? cfg.inc : (mode === 'time' ? DEFAULT_SEC_INCREMENT : defaultIncrement(cfg.id, unit))
+ const inc = mode === 'time'
+ ? (cfg.inc > 0 ? cfg.inc : DEFAULT_SEC_INCREMENT)
+ : weightIncrement(cfg, unit)
if (policy === 'off') return { policy, kind: 'off' }
const sessions = sessionsFor(S, cfg.id, cfg).filter(s => s.mode === mode)
@@ -218,7 +239,7 @@ export function nextPrescription(S, cfg, routine) {
const range = normalizeRepRange(cfg.reps || last.goal || 10, cfg.repsMin, repStep(cfg))
const top = range.reps
const bottom = range.repsMin
- if (last.ok) return { policy, kind: 'up', weight: snap(w + inc, inc), reps: bottom, why: ['Top of the rep range in every set — {0} {1} more, back to {2} reps.', inc, unit, bottom] }
+ if (last.ok) return { policy, kind: 'up', weight: snapWeight(w + inc, inc), reps: bottom, why: ['Top of the rep range in every set — {0} {1} more, back to {2} reps.', inc, unit, bottom] }
if (stalls >= deloadAt) {
const dw = deloadTo(w, inc)
return { policy, kind: 'deload', weight: dw, reps: bottom, why: ['Stalled {0} sessions — deload to {1} {2}.', stalls, dw, unit] }
@@ -234,7 +255,7 @@ export function nextPrescription(S, cfg, routine) {
const dbl = policy === 'greyskull' && last.goal > 0 && last.amrap >= last.goal * 2
const step = dbl ? inc * 2 : inc
return {
- policy, kind: 'up', weight: snap(w + step, inc),
+ policy, kind: 'up', weight: snapWeight(w + step, inc),
why: dbl
? ['Last set hit {0} reps — twice the target, so take a double jump of {1} {2}.', last.amrap, step, unit]
: ['Every rep last time — {0} {1} more.', step, unit]
diff --git a/frontend/src/lib/progression.test.js b/frontend/src/lib/progression.test.js
index be56e79..98c46e6 100644
--- a/frontend/src/lib/progression.test.js
+++ b/frontend/src/lib/progression.test.js
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import {
readSession, sessionsFor, stallCount, nextPrescription, applyPrescription,
- policyFor, defaultIncrement, POLICIES_FOR, DELOAD_AFTER, MAX_BW_SETS
+ policyFor, defaultIncrement, weightIncrement, POLICIES_FOR, DELOAD_AFTER, MAX_BW_SETS
} from './progression.js'
import { EXDB } from './exercises.js'
@@ -103,6 +103,14 @@ describe('defaultIncrement', () => {
})
})
+describe('weightIncrement', () => {
+ it('uses a positive exercise override and otherwise the exercise/unit default', () => {
+ expect(weightIncrement({ id: LIFT, inc: 1 }, 'kg')).toBe(1)
+ expect(weightIncrement({ id: LIFT }, 'kg')).toBe(2.5)
+ expect(weightIncrement({ id: HEAVY, inc: 0 }, 'kg')).toBe(5)
+ })
+})
+
describe('linear progression', () => {
const cfg = { id: LIFT, sets: 3, reps: 5, weight: 60, prog: 'linear' }
@@ -142,6 +150,19 @@ describe('linear progression', () => {
expect(p.kind).toBe('hold')
})
+ it('a deload starts a new streak, so one miss at the new weight does not deload again', () => {
+ // Three misses at 60 kg earn a deload.
+ const stalled = [[60, 4, 4, 4], [60, 4, 4, 4], [60, 4, 4, 4]]
+ const deload = nextPrescription(hist(LIFT, stalled), cfg)
+ expect(deload.kind).toBe('deload')
+
+ // A bad day at the lighter weight is the first miss of a new run, not the fourth of the old
+ // one. A deload is owed a fresh set of attempts, not an immediate second cut.
+ const next = nextPrescription(hist(LIFT, [...stalled, [deload.weight, 4, 4, 4]]), cfg)
+ expect(next.kind).toBe('hold')
+ expect(next.weight).toBe(deload.weight)
+ })
+
it('never deloads below one increment, however light the lift already is', () => {
const p = nextPrescription(hist(LIFT, [[2.5, 1, 1, 1], [2.5, 1, 1, 1], [2.5, 1, 1, 1]]), cfg)
expect(p.kind).toBe('deload')
@@ -292,6 +313,22 @@ describe('double progression', () => {
expect(p.reps).toBe(8)
})
+ it('does not deload again when the deload was performed exactly as prescribed', () => {
+ const target = { sets: 3, reps: 12 }
+ // Three sessions stuck mid-range where every set misses the top, so a deload falls due (see DELOAD_POLICY)
+ const stalled = [[40, 9, 9, 9], [40, 9, 9, 9], [40, 9, 9, 9]]
+ const deload = nextPrescription(hist(LIFT, stalled, target), cfg)
+ expect(deload.kind).toBe('deload')
+
+ // Training exactly what it asked for: its weight, its reps, every set checked off.
+ const asPrescribed = [deload.weight, ...Array(target.sets).fill(deload.reps)]
+ const next = nextPrescription(hist(LIFT, [...stalled, asPrescribed], target), cfg)
+
+ // Complying with the app's own prescription must not be scored as another failure.
+ expect(next.kind).not.toBe('deload')
+ expect(next.weight).toBeGreaterThanOrEqual(deload.weight)
+ })
+
it('keeps the weight and asks for one more rep while inside the range', () => {
const p = nextPrescription(hist(LIFT, [[40, 10, 9, 9]], { sets: 3, reps: 12 }), cfg)
expect(p.kind).toBe('hold')
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js
index 2e75329..2e82c54 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(603)
- expect(inherited).toHaveLength(565)
+ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(612)
+ expect(inherited).toHaveLength(583)
// 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('e6addc025574b25e392121fe543012a189116d8cb9c91fe5e96caeb3c3e450f2')
+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('c7ddbc412a3e758704289b4414372f2cbc0e26be4c0a0d95676cb3316ecae85a')
})
test('does not leak European Portuguese UI terms', () => {
@@ -49,6 +49,6 @@ describe('Brazilian Portuguese locale', () => {
expect(ptBR['resistance band']).toBe('faixa elástica')
expect(ptBR.soleus).toBe('sóleo')
expect(ptBR.Unpair).toBe('Desvincular')
- expect(ptBR['Starter plan loaded — Mon Push · Wed Pull · Fri Legs']).toContain('Seg Push · Qua Pull')
+ expect(ptBR['Choose starter plan']).toBe('Escolha um plano inicial')
})
})
diff --git a/frontend/src/lib/routines.js b/frontend/src/lib/routines.js
new file mode 100644
index 0000000..7613b30
--- /dev/null
+++ b/frontend/src/lib/routines.js
@@ -0,0 +1,12 @@
+import { uid } from './format.js'
+
+/**
+ * Create a deep copy of a routine with a new id and a "(Copy)" suffix.
+ * All exercises and their configuration are preserved independently.
+ */
+export function copyRoutine(routine, suffix = 'Copy') {
+ const copy = structuredClone(routine)
+ copy.id = uid()
+ copy.name = routine.name + ' (' + suffix + ')'
+ return copy
+}
diff --git a/frontend/src/lib/routines.test.js b/frontend/src/lib/routines.test.js
new file mode 100644
index 0000000..8c6912b
--- /dev/null
+++ b/frontend/src/lib/routines.test.js
@@ -0,0 +1,79 @@
+import { describe, it, expect } from 'vitest'
+import { copyRoutine } from './routines.js'
+
+const routine = {
+ id: 'r1',
+ name: 'Push Day',
+ emoji: 'arm',
+ prog: 'linear',
+ ex: [
+ { id: 'ex1', sets: 3, reps: 10, weight: 60, sg: 'sg1' },
+ { id: 'ex2', sets: 4, reps: 8, weight: 80, sg: 'sg1' },
+ { id: 'ex3', sets: 3, reps: 12, weight: 20 }
+ ]
+}
+
+describe('copyRoutine', () => {
+ it('returns a new routine with a different id', () => {
+ const copy = copyRoutine(routine)
+ expect(copy.id).not.toBe(routine.id)
+ expect(copy.id).toBeTruthy()
+ })
+
+ it('appends "(Copy)" to the name by default', () => {
+ const copy = copyRoutine(routine)
+ expect(copy.name).toBe('Push Day (Copy)')
+ })
+
+ it('uses a custom suffix when provided', () => {
+ const copy = copyRoutine(routine, 'Kopie')
+ expect(copy.name).toBe('Push Day (Kopie)')
+ })
+
+ it('deep-copies all exercises with their configuration', () => {
+ const copy = copyRoutine(routine)
+ expect(copy.ex).toHaveLength(3)
+ expect(copy.ex[0]).toEqual(routine.ex[0])
+ expect(copy.ex[1]).toEqual(routine.ex[1])
+ expect(copy.ex[2]).toEqual(routine.ex[2])
+ })
+
+ it('preserves exercise ids (references to the global library)', () => {
+ const copy = copyRoutine(routine)
+ expect(copy.ex[0].id).toBe('ex1')
+ expect(copy.ex[1].id).toBe('ex2')
+ expect(copy.ex[2].id).toBe('ex3')
+ })
+
+ it('preserves superset groupings', () => {
+ const copy = copyRoutine(routine)
+ expect(copy.ex[0].sg).toBe('sg1')
+ expect(copy.ex[1].sg).toBe('sg1')
+ expect(copy.ex[2].sg).toBeUndefined()
+ })
+
+ it('preserves the emoji and progression settings', () => {
+ const copy = copyRoutine(routine)
+ expect(copy.emoji).toBe('arm')
+ expect(copy.prog).toBe('linear')
+ })
+
+ it('produces an independent copy — mutating it does not affect the original', () => {
+ const copy = copyRoutine(routine)
+ copy.name = 'Modified'
+ copy.ex[0].weight = 999
+ copy.ex.push({ id: 'ex4', sets: 5, reps: 5 })
+
+ expect(routine.name).toBe('Push Day')
+ expect(routine.ex[0].weight).toBe(60)
+ expect(routine.ex).toHaveLength(3)
+ })
+
+ it('handles a routine with no exercises', () => {
+ const empty = { id: 'r2', name: 'Empty', emoji: 'dumbbell', ex: [] }
+ const copy = copyRoutine(empty)
+ expect(copy.ex).toEqual([])
+ expect(copy.name).toBe('Empty (Copy)')
+ expect(copy.id).not.toBe('r2')
+ })
+})
diff --git a/frontend/src/lib/session-start.js b/frontend/src/lib/session-start.js
index 5ca9f50..cf3dd1b 100644
--- a/frontend/src/lib/session-start.js
+++ b/frontend/src/lib/session-start.js
@@ -14,7 +14,7 @@ export function buildSessionEntries(st, r) {
const entries = (r ? r.ex : []).map(cfg => {
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, useTarget: excluded }), plan, step), cfg)
+ const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step, useTarget: plan.kind === 'off' }), plan, step), cfg)
return { id: cfg.id, sg: cfg.sg, target: { ...cfg }, plan, sets }
})
return { entries, excluded }
diff --git a/frontend/src/lib/starter.js b/frontend/src/lib/starter.js
index 33d38b8..e8ba704 100644
--- a/frontend/src/lib/starter.js
+++ b/frontend/src/lib/starter.js
@@ -1,13 +1,68 @@
-// The Push/Pull/Legs starter plan. Shared by the "Load starter plan" action in Settings
-// and by the demo build, which seeds a history on top of exactly these routines.
+// The starter-plan catalog. Training data only: the chooser's plan names and descriptions are
+// written as string literals inside t() calls in sheets.jsx, because check-source-strings.mjs
+// only finds them there — copy parked in here would silently ship English in every language.
+//
+// A routine is [key, name, emoji, [[exerciseId, sets, reps], …]]. The key is what a plan's
+// schedule points at, so a weekday never depends on the position of a routine in the array.
+// Names stay canonical English — they become ordinary user routines, which are not translated.
import { uid } from './format.js'
-const SPEC = [
- ['Push Day', 'barbell', [['0025', 4, 8], ['0047', 3, 10], ['0426', 3, 10], ['0334', 3, 12], ['0241', 3, 12], ['0251', 3, 10]]],
- ['Pull Day', 'pullup', [['2330', 4, 10], ['0027', 4, 8], ['1323', 3, 10], ['0031', 3, 10], ['0313', 3, 12]]],
- ['Leg Day', 'legs', [['0043', 4, 8], ['0085', 3, 10], ['0739', 3, 12], ['0585', 3, 12], ['0586', 3, 12], ['0605', 4, 15]]]
+const PPL = [
+ ['push', 'Push Day', 'barbell', [['0025', 4, 8], ['0047', 3, 10], ['0426', 3, 10], ['0334', 3, 12], ['0241', 3, 12], ['0251', 3, 10]]],
+ ['pull', 'Pull Day', 'pullup', [['2330', 4, 10], ['0027', 4, 8], ['1323', 3, 10], ['0031', 3, 10], ['0313', 3, 12]]],
+ ['legs', 'Leg Day', 'legs', [['0043', 4, 8], ['0085', 3, 10], ['0739', 3, 12], ['0585', 3, 12], ['0586', 3, 12], ['0605', 4, 15]]]
]
-// Fresh routine objects (new ids) — [push, pull, legs].
-export const starterRoutines = () =>
- SPEC.map(([name, emoji, list]) => ({ id: uid(), name, emoji, ex: list.map(([id, sets, reps]) => ({ id, sets, reps, weight: 0 })) }))
+const UPPER_LOWER = [
+ ['upper-a', 'Upper A', 'barbell', [['0025', 3, 8], ['2330', 3, 10], ['0047', 2, 10], ['1323', 2, 10], ['0334', 2, 12], ['0241', 2, 12], ['0031', 2, 12]]],
+ ['lower-a', 'Lower A', 'legs', [['0043', 3, 8], ['0085', 3, 8], ['0739', 2, 10], ['0586', 2, 12], ['0605', 3, 15]]],
+ ['upper-b', 'Upper B', 'barbell', [['0047', 3, 8], ['0027', 3, 8], ['0426', 2, 10], ['2330', 2, 10], ['0334', 2, 12], ['0241', 2, 12], ['0313', 2, 12]]],
+ ['lower-b', 'Lower B', 'legs', [['0739', 3, 10], ['0085', 2, 10], ['0585', 2, 12], ['0586', 3, 12], ['0605', 3, 15]]]
+]
+
+const FULL_BODY = [
+ ['fb-a', 'Full Body A', 'figureStrength', [['0043', 3, 8], ['0025', 3, 8], ['2330', 3, 10], ['0586', 3, 12], ['0334', 2, 12], ['0031', 2, 12]]],
+ ['fb-b', 'Full Body B', 'figureStrength', [['0085', 3, 8], ['0047', 3, 10], ['1323', 3, 10], ['0585', 3, 12], ['0334', 2, 12], ['0241', 2, 12]]],
+ ['fb-c', 'Full Body C', 'figureStrength', [['0739', 3, 10], ['0025', 2, 10], ['0027', 3, 10], ['0426', 2, 10], ['0586', 3, 12], ['0605', 3, 15]]]
+]
+
+const FIVE_BY_FIVE = [
+ ['5x5-a', '5×5 A', 'barbell', [['0043', 5, 5], ['0025', 5, 5], ['0027', 5, 5]]],
+ ['5x5-b', '5×5 B', 'barbell', [['0085', 5, 5], ['0426', 5, 5], ['2330', 5, 5]]],
+ ['5x5-c', '5×5 C', 'barbell', [['0739', 5, 5], ['0047', 5, 5], ['1323', 5, 5]]]
+]
+
+// [weekday, routineKey] — weekday is a DAYN index, so 1 is Monday. Fixed weeks only: every
+// plan repeats the same seven days, which is all the weekly plan model can represent.
+const PLANS = {
+ ppl: { routines: PPL, schedule: [[1, 'push'], [3, 'pull'], [5, 'legs']] },
+ 'upper-lower': { routines: UPPER_LOWER, schedule: [[1, 'upper-a'], [2, 'lower-a'], [4, 'upper-b'], [5, 'lower-b']] },
+ 'full-body': { routines: FULL_BODY, schedule: [[1, 'fb-a'], [3, 'fb-b'], [5, 'fb-c']] },
+ '5x5': { routines: FIVE_BY_FIVE, schedule: [[1, '5x5-a'], [3, '5x5-b'], [5, '5x5-c']] }
+}
+
+const build = routines =>
+ routines.map(([, name, emoji, list]) => ({ id: uid(), name, emoji, ex: list.map(([id, sets, reps]) => ({ id, sets, reps, weight: 0 })) }))
+
+// Fresh routine objects (new ids) — [push, pull, legs]. The demo build seeds a history on
+// top of exactly these three, so this entry point keeps its shape.
+export const starterRoutines = () => build(PPL)
+
+// [{ id, days }] for the chooser. The day count is read off the schedule rather than stored
+// beside it, so the two can never disagree.
+export const starterPlanOptions = () =>
+ Object.entries(PLANS).map(([id, { schedule }]) => ({ id, days: schedule.length }))
+
+// The weekdays a plan would claim, or null for an unknown id.
+export const starterPlanDays = id => PLANS[id]?.schedule.map(([day]) => day) ?? null
+
+// Fresh routines plus the weekdays to put them on, or null for an unknown id — a caller that
+// treats null as "change nothing" can never half-apply a plan.
+export const buildStarterPlan = id => {
+ const plan = PLANS[id]
+ if (!plan) return null
+ const routines = build(plan.routines)
+ // key → the id just minted for it, so the schedule below names its routine
+ const byKey = Object.fromEntries(plan.routines.map(([key], i) => [key, routines[i].id]))
+ return { routines, schedule: plan.schedule.map(([day, key]) => ({ day, routineId: byKey[key] })) }
+}
diff --git a/frontend/src/lib/starter.test.js b/frontend/src/lib/starter.test.js
new file mode 100644
index 0000000..804c021
--- /dev/null
+++ b/frontend/src/lib/starter.test.js
@@ -0,0 +1,104 @@
+import { describe, expect, it } from 'vitest'
+import { EXIDX } from './exercises.js'
+import { buildStarterPlan, starterPlanDays, starterPlanOptions, starterRoutines } from './starter.js'
+
+// The approved prescription, written out again rather than imported: a test that reads the
+// same table as the code would pass no matter what that table said. [weekday, name, sets].
+const APPROVED = {
+ ppl: [
+ [1, 'Push Day', [['0025', 4, 8], ['0047', 3, 10], ['0426', 3, 10], ['0334', 3, 12], ['0241', 3, 12], ['0251', 3, 10]]],
+ [3, 'Pull Day', [['2330', 4, 10], ['0027', 4, 8], ['1323', 3, 10], ['0031', 3, 10], ['0313', 3, 12]]],
+ [5, 'Leg Day', [['0043', 4, 8], ['0085', 3, 10], ['0739', 3, 12], ['0585', 3, 12], ['0586', 3, 12], ['0605', 4, 15]]],
+ ],
+ 'upper-lower': [
+ [1, 'Upper A', [['0025', 3, 8], ['2330', 3, 10], ['0047', 2, 10], ['1323', 2, 10], ['0334', 2, 12], ['0241', 2, 12], ['0031', 2, 12]]],
+ [2, 'Lower A', [['0043', 3, 8], ['0085', 3, 8], ['0739', 2, 10], ['0586', 2, 12], ['0605', 3, 15]]],
+ [4, 'Upper B', [['0047', 3, 8], ['0027', 3, 8], ['0426', 2, 10], ['2330', 2, 10], ['0334', 2, 12], ['0241', 2, 12], ['0313', 2, 12]]],
+ [5, 'Lower B', [['0739', 3, 10], ['0085', 2, 10], ['0585', 2, 12], ['0586', 3, 12], ['0605', 3, 15]]],
+ ],
+ 'full-body': [
+ [1, 'Full Body A', [['0043', 3, 8], ['0025', 3, 8], ['2330', 3, 10], ['0586', 3, 12], ['0334', 2, 12], ['0031', 2, 12]]],
+ [3, 'Full Body B', [['0085', 3, 8], ['0047', 3, 10], ['1323', 3, 10], ['0585', 3, 12], ['0334', 2, 12], ['0241', 2, 12]]],
+ [5, 'Full Body C', [['0739', 3, 10], ['0025', 2, 10], ['0027', 3, 10], ['0426', 2, 10], ['0586', 3, 12], ['0605', 3, 15]]],
+ ],
+ '5x5': [
+ [1, '5×5 A', [['0043', 5, 5], ['0025', 5, 5], ['0027', 5, 5]]],
+ [3, '5×5 B', [['0085', 5, 5], ['0426', 5, 5], ['2330', 5, 5]]],
+ [5, '5×5 C', [['0739', 5, 5], ['0047', 5, 5], ['1323', 5, 5]]],
+ ],
+}
+
+const shape = r => r.ex.map(e => [e.id, e.sets, e.reps])
+
+describe('starter plan catalog', () => {
+ it('offers exactly the four plans, with the day count read off the schedule', () => {
+ expect(starterPlanOptions()).toEqual([
+ { id: 'ppl', days: 3 }, { id: 'upper-lower', days: 4 },
+ { id: 'full-body', days: 3 }, { id: '5x5', days: 3 },
+ ])
+ for (const { id, days } of starterPlanOptions()) expect(starterPlanDays(id)).toHaveLength(days)
+ })
+
+ it('changes nothing for an unknown plan id', () => {
+ expect(buildStarterPlan('nope')).toBeNull()
+ expect(buildStarterPlan(undefined)).toBeNull()
+ // A click handler wired straight to a loader would hand the event in as the plan.
+ expect(buildStarterPlan({ type: 'click' })).toBeNull()
+ expect(starterPlanDays('nope')).toBeNull()
+ })
+})
+
+describe.each(Object.keys(APPROVED))('%s', planId => {
+ const approved = APPROVED[planId]
+
+ it('builds the approved exercises, sets and reps in order', () => {
+ const { routines } = buildStarterPlan(planId)
+ expect(routines.map(r => r.name)).toEqual(approved.map(([, name]) => name))
+ routines.forEach((r, i) => expect(shape(r)).toEqual(approved[i][2]))
+ })
+
+ it('puts each routine on its approved weekday, by identity not position', () => {
+ const { routines, schedule } = buildStarterPlan(planId)
+ const nameOf = Object.fromEntries(routines.map(r => [r.id, r.name]))
+ expect(schedule.map(({ day, routineId }) => [day, nameOf[routineId]]))
+ .toEqual(approved.map(([day, name]) => [day, name]))
+ })
+
+ it('references only real exercises and starts every one at weight 0', () => {
+ for (const r of buildStarterPlan(planId).routines) {
+ for (const e of r.ex) {
+ expect(EXIDX[e.id], e.id).toBeTruthy()
+ expect(e.sets).toBeGreaterThan(0)
+ expect(e.reps).toBeGreaterThan(0)
+ expect(e.weight).toBe(0)
+ }
+ }
+ })
+
+ it('mints fresh ids and independent objects on every build', () => {
+ const first = buildStarterPlan(planId)
+ const second = buildStarterPlan(planId)
+ const ids = first.routines.map(r => r.id)
+ expect(new Set(ids).size).toBe(ids.length)
+ expect(second.routines.some(r => ids.includes(r.id))).toBe(false)
+ expect(first.routines[0].ex[0]).not.toBe(second.routines[0].ex[0])
+ // and the static definition survives a caller mutating what it got back
+ first.routines[0].ex[0].sets = 99
+ expect(buildStarterPlan(planId).routines[0].ex[0].sets).toBe(approved[0][2][0][1])
+ })
+})
+
+describe('starterRoutines (the demo build entry point)', () => {
+ it('still returns push, pull and legs unchanged', () => {
+ const routines = starterRoutines()
+ expect(routines.map(r => r.name)).toEqual(['Push Day', 'Pull Day', 'Leg Day'])
+ routines.forEach((r, i) => expect(shape(r)).toEqual(APPROVED.ppl[i][2]))
+ expect(routines.map(r => r.emoji)).toEqual(['barbell', 'pullup', 'legs'])
+ })
+
+ it('mints fresh ids on every invocation', () => {
+ const first = starterRoutines().map(r => r.id)
+ const second = starterRoutines().map(r => r.id)
+ expect(new Set([...first, ...second]).size).toBe(6)
+ })
+})
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 2874b21..ff55561 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -24,6 +24,13 @@ export default {
'Resume': 'Weiter',
'Stats': 'Statistik',
'Exercises': 'Übungen',
+ 'By muscle': 'Nach Muskel',
+ 'Explore muscles': 'Muskeln entdecken',
+ 'Choose a muscle to see exercises that train it.': 'Wähle einen Muskel, um Übungen zu sehen, die ihn trainieren.',
+ 'Exercises for {0}': 'Übungen für {0}',
+ 'Clear selection': 'Auswahl aufheben',
+ 'Primary target': 'Hauptmuskel',
+ 'Also trains': 'Trainiert auch',
'History': 'Verlauf',
'Settings': 'Einstellungen',
'Freestyle': 'Freies Training',
@@ -210,8 +217,22 @@ export default {
'{0} — in progress': '{0} — läuft',
'Resume ▶': 'Weiter ▶',
'Welcome!': 'Willkommen!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Richte deinen Wochenplan ein — oder lade einen fertigen Push-/Pull-/Beine-Plan.',
- 'Load starter plan (PPL)': 'Starterplan laden (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Richte deinen Wochenplan ein — oder lade einen fertigen Starterplan.',
+ 'Load starter plan': 'Starterplan laden',
+ 'Choose starter plan': 'Starterplan wählen',
+ '{0} days per week': '{0} Tage pro Woche',
+ '{0} loaded': '{0} geladen',
+ 'Load {0}?': '{0} laden?',
+ 'Load plan': 'Plan laden',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Der neue Plan kommt auf {0}. Deine Routinen bleiben alle erhalten — nur diese Tage im Wochenplan ändern sich.',
+ 'Push / Pull / Legs': 'Push / Pull / Beine',
+ 'Push, pull and legs each get their own day.': 'Drücken, Ziehen und Beine an je eigenen Tagen.',
+ 'Upper / Lower': 'Oberkörper / Unterkörper',
+ 'Upper body twice, lower body twice.': 'Oberkörper zweimal, Unterkörper zweimal.',
+ 'Full Body': 'Ganzkörper',
+ 'Three sessions, the whole body each time.': 'Drei Einheiten, jedes Mal der ganze Körper.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Fünf Sätze à fünf bei den großen Langhantelübungen.',
'Build my own plan': 'Eigenen Plan erstellen',
'{0} week streak': '{0} Wochen in Folge',
'this week': 'diese Woche',
@@ -238,7 +259,6 @@ export default {
'Week schedule': 'Wochenplan',
'No routines yet.': 'Noch keine Routinen.',
'Create one or load the starter plan.': 'Erstelle eine oder lade den Starterplan.',
- 'Load starter plan (Push / Pull / Legs)': 'Starterplan laden (Push / Pull / Beine)',
// --- routine edit ---
'Superset with exercise above': 'Supersatz mit der Übung darüber',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Notiz (optional) — Hinweise zur Belastung, z. B. „nur die Stange, dann pro Satz +1 Scheibe pro Seite“, was immer du dir merken willst',
@@ -247,11 +267,12 @@ export default {
'Delete routine?': 'Routine löschen?',
'“{0}” and its exercises will be removed.': '„{0}“ und ihre Übungen werden entfernt.',
'Delete routine': 'Routine löschen',
+ 'Copy routine': 'Routine kopieren',
+ 'Copy': 'Kopie',
// --- library / history ---
'{0} exercises with animations': '{0} Übungen mit Animationen',
'Search…': 'Suchen…',
'No workouts yet.': 'Noch keine Trainings.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Starterplan geladen — Mo Push · Mi Pull · Fr Beine',
// --- login / account ---
'Enter a name': 'Gib einen Namen ein',
'Profile created — data from this device moved into it': 'Profil erstellt — Daten von diesem Gerät wurden übernommen',
@@ -412,6 +433,12 @@ export default {
'Minimize': 'Verkleinern',
'Expand': 'Vergrössern',
'Exercise animations': 'Übungs-Animationen',
+ 'Workout view': 'Trainingsansicht',
+ 'Cards': 'Karten',
+ 'List': 'Liste',
+ 'Current': 'Aktuell',
+ 'Set current': 'Als aktuell markieren',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Verschieben, Tauschen und Entfernen unten wirken auf die als {0} markierte Übung.',
'Full': 'Gross',
'Small': 'Klein',
'Hidden': 'Versteckt',
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 0c4f8f0..f481b5d 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Seguir',
'Stats': 'Progreso',
'Exercises': 'Ejercicios',
+ 'By muscle': 'Por músculo',
+ 'Explore muscles': 'Explorar músculos',
+ 'Choose a muscle to see exercises that train it.': 'Elige un músculo para ver los ejercicios que lo entrenan.',
+ 'Exercises for {0}': 'Ejercicios para {0}',
+ 'Clear selection': 'Borrar selección',
+ 'Primary target': 'Músculo principal',
+ 'Also trains': 'También trabaja',
'History': 'Historial',
'Settings': 'Ajustes',
'Freestyle': 'Libre',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — en curso',
'Resume ▶': 'Seguir ▶',
'Welcome!': '¡Bienvenido!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configura tu rutina semanal para empezar — o carga un plan Push / Pull / Piernas ya hecho.',
- 'Load starter plan (PPL)': 'Cargar plan inicial (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Configura tu rutina semanal para empezar — o carga un plan inicial ya hecho.',
+ 'Load starter plan': 'Cargar plan inicial',
+ 'Choose starter plan': 'Elige un plan inicial',
+ '{0} days per week': '{0} días por semana',
+ '{0} loaded': '{0} cargado',
+ 'Load {0}?': '¿Cargar {0}?',
+ 'Load plan': 'Cargar plan',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'El nuevo plan se programará en {0}. Tus rutinas se conservan — solo cambian esos días del plan semanal.',
+ 'Push / Pull / Legs': 'Push / Pull / Piernas',
+ 'Push, pull and legs each get their own day.': 'Empuje, tirón y piernas, cada uno en su día.',
+ 'Upper / Lower': 'Superior / Inferior',
+ 'Upper body twice, lower body twice.': 'Tren superior dos veces, tren inferior dos veces.',
+ 'Full Body': 'Cuerpo completo',
+ 'Three sessions, the whole body each time.': 'Tres sesiones, todo el cuerpo en cada una.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Cinco series de cinco en los básicos con barra.',
'Build my own plan': 'Crear mi propio plan',
'{0} week streak': 'racha de {0} semanas',
'this week': 'esta semana',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Horario semanal',
'No routines yet.': 'Aún no hay rutinas.',
'Create one or load the starter plan.': 'Crea una o carga el plan inicial.',
- 'Load starter plan (Push / Pull / Legs)': 'Cargar plan inicial (Push / Pull / Piernas)',
'Superset with exercise above': 'Superserie con el ejercicio de arriba',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Nota (opcional) — indicaciones de carga, ej. «solo barra y +1 disco por lado en cada serie», lo que quieras recordar',
'No exercises yet — add your first one.': 'Aún no hay ejercicios — añade el primero.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': '¿Eliminar rutina?',
'“{0}” and its exercises will be removed.': '«{0}» y sus ejercicios se eliminarán.',
'Delete routine': 'Eliminar rutina',
+ 'Copy routine': 'Copiar rutina',
+ 'Copy': 'Copia',
'{0} exercises with animations': '{0} ejercicios con animaciones',
'Search…': 'Buscar…',
'No workouts yet.': 'Aún no hay entrenamientos.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plan inicial cargado — Lun Push · Mié Pull · Vie Piernas',
'Enter a name': 'Introduce un nombre',
'Profile created — data from this device moved into it': 'Perfil creado — los datos de este dispositivo se han movido a él',
'Profile created — data moved into it': 'Perfil creado — datos movidos a él',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Minimizar',
'Expand': 'Ampliar',
'Exercise animations': 'Animaciones de los ejercicios',
+ 'Workout view': 'Vista del entrenamiento',
+ 'Cards': 'Tarjetas',
+ 'List': 'Lista',
+ 'Current': 'Actual',
+ 'Set current': 'Marcar actual',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Mover, cambiar y eliminar actúan sobre el ejercicio marcado como {0}.',
'Full': 'Completa',
'Small': 'Pequeña',
'Hidden': 'Oculta',
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 49dd9db..578b41d 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Reprendre',
'Stats': 'Stats',
'Exercises': 'Exercices',
+ 'By muscle': 'Par muscle',
+ 'Explore muscles': 'Explorer les muscles',
+ 'Choose a muscle to see exercises that train it.': 'Choisissez un muscle pour voir les exercices qui le sollicitent.',
+ 'Exercises for {0}': 'Exercices pour {0}',
+ 'Clear selection': 'Effacer la sélection',
+ 'Primary target': 'Cible principale',
+ 'Also trains': 'Sollicite aussi',
'History': 'Historique',
'Settings': 'Réglages',
'Freestyle': 'Libre',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — en cours',
'Resume ▶': 'Reprendre ▶',
'Welcome!': 'Bienvenue !',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configure ta routine hebdo pour commencer — ou charge un plan Push / Pull / Jambes tout prêt.',
- 'Load starter plan (PPL)': 'Charger le plan de départ (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Configure ta routine hebdo pour commencer — ou charge un plan de départ tout prêt.',
+ 'Load starter plan': 'Charger un plan de départ',
+ 'Choose starter plan': 'Choisis un plan de départ',
+ '{0} days per week': '{0} jours par semaine',
+ '{0} loaded': '{0} chargé',
+ 'Load {0}?': 'Charger {0} ?',
+ 'Load plan': 'Charger le plan',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Le nouveau plan sera placé sur {0}. Tes routines sont toutes conservées — seuls ces jours du plan hebdo changent.',
+ 'Push / Pull / Legs': 'Push / Pull / Jambes',
+ 'Push, pull and legs each get their own day.': 'Poussée, tirage et jambes, chacun son jour.',
+ 'Upper / Lower': 'Haut / Bas',
+ 'Upper body twice, lower body twice.': 'Haut du corps deux fois, bas du corps deux fois.',
+ 'Full Body': 'Corps entier',
+ 'Three sessions, the whole body each time.': 'Trois séances, tout le corps à chaque fois.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Cinq séries de cinq sur les gros mouvements à la barre.',
'Build my own plan': 'Créer mon propre plan',
'{0} week streak': 'série de {0} semaines',
'this week': 'cette semaine',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Planning de la semaine',
'No routines yet.': 'Aucune routine pour l’instant.',
'Create one or load the starter plan.': 'Crées-en une ou charge le plan de départ.',
- 'Load starter plan (Push / Pull / Legs)': 'Charger le plan de départ (Push / Pull / Jambes)',
'Superset with exercise above': "Superset avec l'exercice au-dessus",
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Note (optionnelle) — indications de charge, ex. « barre seule puis +1 disque par côté à chaque série », tout ce que tu veux te rappeler',
'No exercises yet — add your first one.': 'Aucun exercice — ajoute le premier.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'Supprimer la routine ?',
'“{0}” and its exercises will be removed.': '« {0} » et ses exercices seront supprimés.',
'Delete routine': 'Supprimer la routine',
+ 'Copy routine': 'Copier la routine',
+ 'Copy': 'Copie',
'{0} exercises with animations': '{0} exercices avec animations',
'Search…': 'Rechercher…',
'No workouts yet.': 'Aucune séance pour l’instant.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plan de départ chargé — Lun Push · Mer Pull · Ven Jambes',
'Enter a name': 'Entre un nom',
'Profile created — data from this device moved into it': 'Profil créé — les données de cet appareil y ont été transférées',
'Profile created — data moved into it': 'Profil créé — données transférées',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Réduire',
'Expand': 'Agrandir',
'Exercise animations': 'Animations des exercices',
+ 'Workout view': 'Vue de l’entraînement',
+ 'Cards': 'Cartes',
+ 'List': 'Liste',
+ 'Current': 'En cours',
+ 'Set current': 'Marquer comme en cours',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Déplacer, échanger et supprimer ci-dessous s’appliquent à l’exercice marqué {0}.',
'Full': 'Grande',
'Small': 'Petite',
'Hidden': 'Masquée',
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index ea3cc2d..540dc07 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'जारी रखें',
'Stats': 'आँकड़े',
'Exercises': 'व्यायाम',
+ 'By muscle': 'मांसपेशी से',
+ 'Explore muscles': 'मांसपेशियाँ खोजें',
+ 'Choose a muscle to see exercises that train it.': 'उस मांसपेशी को प्रशिक्षित करने वाले व्यायाम देखने के लिए एक मांसपेशी चुनें।',
+ 'Exercises for {0}': '{0} के लिए व्यायाम',
+ 'Clear selection': 'चयन साफ़ करें',
+ 'Primary target': 'मुख्य लक्ष्य',
+ 'Also trains': 'यह भी प्रशिक्षित करता है',
'History': 'इतिहास',
'Settings': 'सेटिंग्स',
'Freestyle': 'फ्रीस्टाइल',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — चल रहा है',
'Resume ▶': 'जारी रखें ▶',
'Welcome!': 'स्वागत है!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'शुरू करने के लिए अपना साप्ताहिक रूटीन बनाएँ — या बना-बनाया पुश / पुल / लेग्स प्लान लोड करें।',
- 'Load starter plan (PPL)': 'स्टार्टर प्लान लोड करें (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'शुरू करने के लिए अपना साप्ताहिक रूटीन बनाएँ — या बना-बनाया स्टार्टर प्लान लोड करें।',
+ 'Load starter plan': 'स्टार्टर प्लान लोड करें',
+ 'Choose starter plan': 'स्टार्टर प्लान चुनें',
+ '{0} days per week': 'हफ़्ते में {0} दिन',
+ '{0} loaded': '{0} लोड हुआ',
+ 'Load {0}?': '{0} लोड करें?',
+ 'Load plan': 'प्लान लोड करें',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'नया प्लान {0} पर लगेगा। आपकी सभी रूटीन बनी रहेंगी — साप्ताहिक प्लान में सिर्फ़ ये दिन बदलेंगे।',
+ 'Push / Pull / Legs': 'पुश / पुल / लेग्स',
+ 'Push, pull and legs each get their own day.': 'पुश, पुल और लेग्स, हर एक का अपना दिन।',
+ 'Upper / Lower': 'ऊपरी / निचला',
+ 'Upper body twice, lower body twice.': 'ऊपरी शरीर दो बार, निचला शरीर दो बार।',
+ 'Full Body': 'फ़ुल बॉडी',
+ 'Three sessions, the whole body each time.': 'तीन सेशन, हर बार पूरा शरीर।',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'मुख्य बारबेल लिफ़्ट पर पाँच सेट, पाँच रेप।',
'Build my own plan': 'अपनी योजना बनाएँ',
'{0} week streak': '{0} हफ़्तों की स्ट्रीक',
'this week': 'इस हफ़्ते',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'हफ़्ते का कार्यक्रम',
'No routines yet.': 'अभी कोई रूटीन नहीं।',
'Create one or load the starter plan.': 'एक बनाएँ या स्टार्टर प्लान लोड करें।',
- 'Load starter plan (Push / Pull / Legs)': 'स्टार्टर प्लान लोड करें (पुश / पुल / लेग्स)',
'Superset with exercise above': 'ऊपर वाले व्यायाम के साथ सुपरसेट',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'नोट (वैकल्पिक) — लोडिंग संकेत, जैसे "सिर्फ़ खाली बार, फिर हर सेट में हर तरफ़ +1 प्लेट", जो भी याद रखना चाहें',
'No exercises yet — add your first one.': 'अभी कोई व्यायाम नहीं — पहला जोड़ें।',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'रूटीन हटाएँ?',
'“{0}” and its exercises will be removed.': '"{0}" और उसके व्यायाम हटा दिए जाएँगे।',
'Delete routine': 'रूटीन हटाएँ',
+ 'Copy routine': 'रूटीन कॉपी करें',
+ 'Copy': 'कॉपी',
'{0} exercises with animations': 'एनिमेशन के साथ {0} व्यायाम',
'Search…': 'खोजें…',
'No workouts yet.': 'अभी कोई वर्कआउट नहीं।',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'स्टार्टर प्लान लोड हुआ — सोम पुश · बुध पुल · शुक्र लेग्स',
'Enter a name': 'नाम दर्ज करें',
'Profile created — data from this device moved into it': 'प्रोफ़ाइल बनी — इस डिवाइस का डेटा उसमें चला गया',
'Profile created — data moved into it': 'प्रोफ़ाइल बनी — डेटा स्थानांतरित',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'छोटा करें',
'Expand': 'बड़ा करें',
'Exercise animations': 'व्यायाम एनिमेशन',
+ 'Workout view': 'वर्कआउट दृश्य',
+ 'Cards': 'कार्ड',
+ 'List': 'सूची',
+ 'Current': 'वर्तमान',
+ 'Set current': 'वर्तमान के रूप में चिह्नित करें',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'नीचे दिए गए मूव, स्वैप और रिमूव {0} के रूप में चिह्नित व्यायाम पर लागू होते हैं।',
'Full': 'पूर्ण',
'Small': 'छोटा',
'Hidden': 'छिपा',
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 7db3376..ea4b17e 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -25,6 +25,13 @@ export default {
'Resume': 'Folytatás',
'Stats': 'Statisztika',
'Exercises': 'Gyakorlatok',
+ 'By muscle': 'Izom szerint',
+ 'Explore muscles': 'Izmok felfedezése',
+ 'Choose a muscle to see exercises that train it.': 'Válassz izmot, hogy lásd a gyakorlatokat, amelyek edzik.',
+ 'Exercises for {0}': '{0} gyakorlatai',
+ 'Clear selection': 'Kijelölés törlése',
+ 'Primary target': 'Elsődleges célizom',
+ 'Also trains': 'Emellett edzi',
'History': 'Előzmények',
'Settings': 'Beállítások',
'Freestyle': 'Szabad edzés',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — folyamatban',
'Resume ▶': 'Folytatás ▶',
'Welcome!': 'Üdvözlünk!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Állítsd be a heti rutinod, hogy elindulhass — vagy tölts be egy kész Push / Pull / Legs tervet.',
- 'Load starter plan (PPL)': 'Kezdő terv betöltése (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Állítsd be a heti rutinod, hogy elindulhass — vagy tölts be egy kész kezdő tervet.',
+ 'Load starter plan': 'Kezdő terv betöltése',
+ 'Choose starter plan': 'Válassz kezdő tervet',
+ '{0} days per week': 'Heti {0} nap',
+ '{0} loaded': '{0} betöltve',
+ 'Load {0}?': 'Betöltöd: {0}?',
+ 'Load plan': 'Terv betöltése',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Az új terv ide kerül: {0}. A meglévő rutinjaid megmaradnak — a heti tervben csak ezek a napok változnak.',
+ 'Push / Pull / Legs': 'Push / Pull / Legs',
+ 'Push, pull and legs each get their own day.': 'Tolás, húzás és láb, mind a maga napján.',
+ 'Upper / Lower': 'Felső / Alsó',
+ 'Upper body twice, lower body twice.': 'Felsőtest kétszer, alsótest kétszer.',
+ 'Full Body': 'Teljes test',
+ 'Three sessions, the whole body each time.': 'Három edzés, mindegyiken az egész test.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Öt ötös sorozat a fő rúdgyakorlatokon.',
'Build my own plan': 'Saját terv készítése',
'{0} week streak': '{0} hetes sorozat',
'this week': 'ezen a héten',
@@ -231,7 +252,6 @@ export default {
'Routines': 'Rutinok',
'No routines yet.': 'Még nincs rutin.',
'Create one or load the starter plan.': 'Hozz létre egyet, vagy töltsd be a kezdő tervet.',
- 'Load starter plan (Push / Pull / Legs)': 'Kezdő terv betöltése (Push / Pull / Legs)',
// --- routine edit ---
'Superset with exercise above': 'Szuperszett a fenti gyakorlattal',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Megjegyzés (opcionális) — súlyozási tippek, pl. „csak a rúd, majd sorozatonként +1 tárcsa oldalanként”, bármi, amit érdemes megjegyezni',
@@ -240,11 +260,12 @@ export default {
'Delete routine?': 'Törlöd a rutint?',
'“{0}” and its exercises will be removed.': '„{0}” és a gyakorlatai el lesznek távolítva.',
'Delete routine': 'Rutin törlése',
+ 'Copy routine': 'Rutin másolása',
+ 'Copy': 'Másolat',
// --- library / history ---
'{0} exercises with animations': '{0} gyakorlat animációval',
'Search…': 'Keresés…',
'No workouts yet.': 'Még nincs edzés.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Kezdő terv betöltve — H Push · Sze Pull · P Legs',
// --- login / account ---
'Enter a name': 'Adj meg egy nevet',
'Profile created — data from this device moved into it': 'Profil létrehozva — az eszközön lévő adatok átkerültek bele',
@@ -404,6 +425,12 @@ export default {
'Minimize': 'Kicsinyítés',
'Expand': 'Kibontás',
'Exercise animations': 'Gyakorlat-animációk',
+ 'Workout view': 'Edzésnézet',
+ 'Cards': 'Kártyák',
+ 'List': 'Lista',
+ 'Current': 'Aktuális',
+ 'Set current': 'Megjelölés aktuálisként',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Az alábbi áthelyezés, csere és törlés a {0} jelölésű gyakorlatra vonatkozik.',
'Full': 'Teljes',
'Small': 'Kicsi',
'Hidden': 'Rejtett',
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index ea66bc5..76be90d 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Riprendi',
'Stats': 'Statistiche',
'Exercises': 'Esercizi',
+ 'By muscle': 'Per muscolo',
+ 'Explore muscles': 'Esplora i muscoli',
+ 'Choose a muscle to see exercises that train it.': 'Scegli un muscolo per vedere gli esercizi che lo allenano.',
+ 'Exercises for {0}': 'Esercizi per {0}',
+ 'Clear selection': 'Cancella selezione',
+ 'Primary target': 'Muscolo principale',
+ 'Also trains': 'Allena anche',
'History': 'Cronologia',
'Settings': 'Impostazioni',
'Freestyle': 'Libero',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — in corso',
'Resume ▶': 'Riprendi ▶',
'Welcome!': 'Benvenuto!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Imposta la tua routine settimanale — o carica un piano Push / Pull / Gambe già pronto.',
- 'Load starter plan (PPL)': 'Carica piano iniziale (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Imposta la tua routine settimanale — o carica un piano iniziale già pronto.',
+ 'Load starter plan': 'Carica piano iniziale',
+ 'Choose starter plan': 'Scegli un piano iniziale',
+ '{0} days per week': '{0} giorni a settimana',
+ '{0} loaded': '{0} caricato',
+ 'Load {0}?': 'Caricare {0}?',
+ 'Load plan': 'Carica piano',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Il nuovo piano andrà su {0}. Le tue routine restano tutte — cambiano solo quei giorni del piano settimanale.',
+ 'Push / Pull / Legs': 'Push / Pull / Gambe',
+ 'Push, pull and legs each get their own day.': 'Spinta, trazione e gambe, ognuna nel suo giorno.',
+ 'Upper / Lower': 'Superiore / Inferiore',
+ 'Upper body twice, lower body twice.': 'Parte superiore due volte, parte inferiore due volte.',
+ 'Full Body': 'Total body',
+ 'Three sessions, the whole body each time.': 'Tre sedute, ogni volta tutto il corpo.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Cinque serie da cinque sui fondamentali con bilanciere.',
'Build my own plan': 'Crea il mio piano',
'{0} week streak': 'serie di {0} settimane',
'this week': 'questa settimana',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Programma settimanale',
'No routines yet.': 'Ancora nessuna routine.',
'Create one or load the starter plan.': 'Creane una o carica il piano iniziale.',
- 'Load starter plan (Push / Pull / Legs)': 'Carica piano iniziale (Push / Pull / Gambe)',
'Superset with exercise above': "Superset con l'esercizio sopra",
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Nota (facoltativa) — indicazioni di carico, es. "solo bilanciere poi +1 disco per lato a ogni serie", qualsiasi cosa tu voglia ricordare',
'No exercises yet — add your first one.': 'Ancora nessun esercizio — aggiungi il primo.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'Eliminare routine?',
'“{0}” and its exercises will be removed.': '«{0}» e i suoi esercizi verranno rimossi.',
'Delete routine': 'Elimina routine',
+ 'Copy routine': 'Copia routine',
+ 'Copy': 'Copia',
'{0} exercises with animations': '{0} esercizi con animazioni',
'Search…': 'Cerca…',
'No workouts yet.': 'Ancora nessun allenamento.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Piano iniziale caricato — Lun Push · Mer Pull · Ven Gambe',
'Enter a name': 'Inserisci un nome',
'Profile created — data from this device moved into it': 'Profilo creato — i dati di questo dispositivo sono stati trasferiti',
'Profile created — data moved into it': 'Profilo creato — dati trasferiti',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Riduci',
'Expand': 'Ingrandisci',
'Exercise animations': 'Animazioni degli esercizi',
+ 'Workout view': 'Vista allenamento',
+ 'Cards': 'Schede',
+ 'List': 'Elenco',
+ 'Current': 'Corrente',
+ 'Set current': 'Imposta come corrente',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Spostamento, scambio e rimozione qui sotto agiscono sull’esercizio contrassegnato come {0}.',
'Full': 'Grande',
'Small': 'Piccola',
'Hidden': 'Nascosta',
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index a1834b0..7928916 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -23,6 +23,13 @@ export default {
'Resume': '이어하기',
'Stats': '통계',
'Exercises': '운동',
+ 'By muscle': '근육별',
+ 'Explore muscles': '근육 탐색',
+ 'Choose a muscle to see exercises that train it.': '운동하는 부위를 선택해 해당 근육을 훈련하는 운동을 확인하세요.',
+ 'Exercises for {0}': '{0} 운동',
+ 'Clear selection': '선택 지우기',
+ 'Primary target': '주요 목표',
+ 'Also trains': '함께 훈련',
'History': '기록',
'Settings': '설정',
'Freestyle': '자유 운동',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — 진행 중',
'Resume ▶': '이어하기 ▶',
'Welcome!': '환영합니다!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': '주간 루틴을 설정해 시작하세요 — 또는 미리 만들어진 푸시 / 풀 / 레그 계획을 불러오세요.',
- 'Load starter plan (PPL)': '스타터 계획 불러오기 (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': '주간 루틴을 설정해 시작하세요 — 또는 미리 만들어진 스타터 계획을 불러오세요.',
+ 'Load starter plan': '스타터 계획 불러오기',
+ 'Choose starter plan': '스타터 계획 선택',
+ '{0} days per week': '주 {0}일',
+ '{0} loaded': '{0} 불러옴',
+ 'Load {0}?': '{0} 불러올까요?',
+ 'Load plan': '계획 불러오기',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': '새 계획은 {0}에 배치됩니다. 기존 루틴은 모두 유지되고 주간 계획에서 해당 요일만 바뀝니다.',
+ 'Push / Pull / Legs': '푸시 / 풀 / 레그',
+ 'Push, pull and legs each get their own day.': '푸시, 풀, 레그를 각각 다른 날에.',
+ 'Upper / Lower': '상체 / 하체',
+ 'Upper body twice, lower body twice.': '상체 두 번, 하체 두 번.',
+ 'Full Body': '전신',
+ 'Three sessions, the whole body each time.': '세 번의 세션, 매번 전신.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': '주요 바벨 종목을 5세트 5회로.',
'Build my own plan': '내 계획 만들기',
'{0} week streak': '{0}주 연속',
'this week': '이번 주',
@@ -228,7 +249,6 @@ export default {
'Week schedule': '주간 일정',
'No routines yet.': '아직 루틴이 없어요.',
'Create one or load the starter plan.': '루틴을 만들거나 스타터 계획을 불러오세요.',
- 'Load starter plan (Push / Pull / Legs)': '스타터 계획 불러오기 (푸시 / 풀 / 레그)',
'Superset with exercise above': '위 운동과 슈퍼세트',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': '메모(선택 사항) — 중량 안내, 예: "빈 바로 시작 후 세트마다 양쪽 +1플레이트", 기억하고 싶은 모든 것',
'No exercises yet — add your first one.': '아직 운동이 없어요 — 첫 운동을 추가하세요.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': '루틴을 삭제할까요?',
'“{0}” and its exercises will be removed.': '"{0}"과(와) 그 운동들이 삭제됩니다.',
'Delete routine': '루틴 삭제',
+ 'Copy routine': '루틴 복사',
+ 'Copy': '복사본',
'{0} exercises with animations': '애니메이션이 있는 운동 {0}개',
'Search…': '검색…',
'No workouts yet.': '아직 운동 기록이 없어요.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': '스타터 계획 불러옴 — 월 푸시 · 수 풀 · 금 레그',
'Enter a name': '이름을 입력하세요',
'Profile created — data from this device moved into it': '프로필 생성됨 — 이 기기의 데이터가 이동됨',
'Profile created — data moved into it': '프로필 생성됨 — 데이터 이동됨',
@@ -394,6 +415,12 @@ export default {
'Minimize': '축소',
'Expand': '확대',
'Exercise animations': '운동 애니메이션',
+ 'Workout view': '운동 보기',
+ 'Cards': '카드',
+ 'List': '목록',
+ 'Current': '현재',
+ 'Set current': '현재 운동으로 설정',
+ 'Move, swap and remove below act on the exercise marked {0}.': '아래의 이동, 교체, 삭제는 {0} 표시된 운동에 적용됩니다.',
'Full': '전체',
'Small': '작게',
'Hidden': '숨김',
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 1fd55c0..1d61870 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Wznów',
'Stats': 'Statystyki',
'Exercises': 'Ćwiczenia',
+ 'By muscle': 'Według mięśnia',
+ 'Explore muscles': 'Poznaj mięśnie',
+ 'Choose a muscle to see exercises that train it.': 'Wybierz mięsień, aby zobaczyć ćwiczenia, które go angażują.',
+ 'Exercises for {0}': 'Ćwiczenia na {0}',
+ 'Clear selection': 'Wyczyść wybór',
+ 'Primary target': 'Główny cel',
+ 'Also trains': 'Angażuje również',
'History': 'Historia',
'Settings': 'Ustawienia',
'Freestyle': 'Dowolny',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — w trakcie',
'Resume ▶': 'Wznów ▶',
'Welcome!': 'Witaj!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Ustaw swój tygodniowy plan — albo wczytaj gotowy plan Push / Pull / Nogi.',
- 'Load starter plan (PPL)': 'Wczytaj plan startowy (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Ustaw swój tygodniowy plan — albo wczytaj gotowy plan startowy.',
+ 'Load starter plan': 'Wczytaj plan startowy',
+ 'Choose starter plan': 'Wybierz plan startowy',
+ '{0} days per week': '{0} dni w tygodniu',
+ '{0} loaded': 'Wczytano: {0}',
+ 'Load {0}?': 'Wczytać {0}?',
+ 'Load plan': 'Wczytaj plan',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Nowy plan trafi na {0}. Twoje plany treningowe zostają — zmienią się tylko te dni w planie tygodnia.',
+ 'Push / Pull / Legs': 'Push / Pull / Nogi',
+ 'Push, pull and legs each get their own day.': 'Pchanie, ciągnięcie i nogi — każde w swoim dniu.',
+ 'Upper / Lower': 'Góra / Dół',
+ 'Upper body twice, lower body twice.': 'Góra dwa razy, dół dwa razy.',
+ 'Full Body': 'Całe ciało',
+ 'Three sessions, the whole body each time.': 'Trzy treningi, za każdym razem całe ciało.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Pięć serii po pięć na głównych bojach ze sztangą.',
'Build my own plan': 'Utwórz własny plan',
'{0} week streak': 'seria {0} tyg.',
'this week': 'w tym tygodniu',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Harmonogram tygodnia',
'No routines yet.': 'Brak planów.',
'Create one or load the starter plan.': 'Utwórz plan albo wczytaj startowy.',
- 'Load starter plan (Push / Pull / Legs)': 'Wczytaj plan startowy (Push / Pull / Nogi)',
'Superset with exercise above': 'Superseria z ćwiczeniem powyżej',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Notatka (opcjonalnie) — wskazówki dot. obciążenia, np. "sama sztanga, potem +1 talerz na stronę w każdej serii", cokolwiek chcesz zapamiętać',
'No exercises yet — add your first one.': 'Brak ćwiczeń — dodaj pierwsze.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'Usunąć plan?',
'“{0}” and its exercises will be removed.': '„{0}” i jego ćwiczenia zostaną usunięte.',
'Delete routine': 'Usuń plan',
+ 'Copy routine': 'Kopiuj plan',
+ 'Copy': 'Kopia',
'{0} exercises with animations': '{0} ćwiczeń z animacjami',
'Search…': 'Szukaj…',
'No workouts yet.': 'Brak treningów.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plan startowy wczytany — Pn Push · Śr Pull · Pt Nogi',
'Enter a name': 'Podaj imię',
'Profile created — data from this device moved into it': 'Profil utworzony — dane z tego urządzenia zostały przeniesione',
'Profile created — data moved into it': 'Profil utworzony — dane przeniesione',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Zmniejsz',
'Expand': 'Powiększ',
'Exercise animations': 'Animacje ćwiczeń',
+ 'Workout view': 'Widok treningu',
+ 'Cards': 'Karty',
+ 'List': 'Lista',
+ 'Current': 'Bieżące',
+ 'Set current': 'Ustaw jako bieżące',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Przenoszenie, zamiana i usuwanie poniżej dotyczą ćwiczenia oznaczonego {0}.',
'Full': 'Pełna',
'Small': 'Mała',
'Hidden': 'Ukryta',
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index a6060bd..670575d 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -62,13 +62,14 @@ export const PT_BR_OVERRIDES = {
'The sets you logged in this session will be lost.': 'As séries registradas nesta sessão serão perdidas.',
'Superset · do these back-to-back, rest when done': 'Superset · faça estes exercícios em sequência e descanse ao terminar',
'Freestyle workout — add your first exercise.': 'Treino livre — adicione seu primeiro exercício.',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configure sua rotina semanal para começar ou carregue um plano pronto de Push / Pull / Legs.',
- 'Load starter plan (PPL)': 'Carregar plano inicial (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Configure sua rotina semanal para começar — ou carregue um plano inicial já pronto.',
+ 'Choose starter plan': 'Escolha um plano inicial',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'O novo plano fica em {0}. Suas rotinas são todas mantidas — só esses dias do plano semanal mudam.',
+ 'Push / Pull / Legs': 'Push / Pull / Legs',
'Build my own plan': 'Criar meu próprio plano',
'Finish your first workout to see progress curves here.': 'Finalize seu primeiro treino para ver os gráficos de progresso aqui.',
'Your weekly routine': 'Sua rotina semanal',
'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.',
@@ -76,8 +77,9 @@ export const PT_BR_OVERRIDES = {
'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',
+ 'Copy routine': 'Copiar rotina',
+ 'Copy': 'Cópia',
'Search…': 'Buscar…',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plano inicial carregado — Seg Push · Qua Pull · Sex Pernas',
'{0} planned for {1}': '{0} planejado para {1}',
'Planned': 'Planejado',
'Enter a name': 'Informe um nome',
@@ -627,6 +629,15 @@ export const PT_BR_OVERRIDES = {
'Point the camera at the QR code': 'Aponte a câmera para o código QR',
'Camera is not available here — import a photo or type the code instead.': 'A câmera não está disponível aqui — importe uma foto ou digite o código.',
'Camera access was denied — allow it in your browser and try again.': 'O acesso à câmera foi negado — permita-o no navegador e tente de novo.',
+
+// --- muscle explorer ---
+ 'By muscle': 'Por músculo',
+ 'Explore muscles': 'Explorar músculos',
+ 'Choose a muscle to see exercises that train it.': 'Escolha um músculo para ver os exercícios que o treinam.',
+ 'Exercises for {0}': 'Exercícios para {0}',
+ 'Clear selection': 'Limpar seleção',
+ 'Primary target': 'Músculo principal',
+ 'Also trains': 'Também trabalha',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index 7336910..60dd52f 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Retomar',
'Stats': 'Estatísticas',
'Exercises': 'Exercícios',
+ 'By muscle': 'Por músculo',
+ 'Explore muscles': 'Explorar músculos',
+ 'Choose a muscle to see exercises that train it.': 'Escolha um músculo para ver os exercícios que o treinam.',
+ 'Exercises for {0}': 'Exercícios para {0}',
+ 'Clear selection': 'Limpar seleção',
+ 'Primary target': 'Alvo principal',
+ 'Also trains': 'Também trabalha',
'History': 'Histórico',
'Settings': 'Definições',
'Freestyle': 'Livre',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — em curso',
'Resume ▶': 'Retomar ▶',
'Welcome!': 'Bem-vindo!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configura a tua rotina semanal — ou carrega um plano Push / Pull / Pernas já feito.',
- 'Load starter plan (PPL)': 'Carregar plano inicial (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Configura a tua rotina semanal — ou carrega um plano inicial já feito.',
+ 'Load starter plan': 'Carregar plano inicial',
+ 'Choose starter plan': 'Escolhe um plano inicial',
+ '{0} days per week': '{0} dias por semana',
+ '{0} loaded': '{0} carregado',
+ 'Load {0}?': 'Carregar {0}?',
+ 'Load plan': 'Carregar plano',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'O novo plano fica em {0}. As tuas rotinas mantêm-se todas — só esses dias do plano semanal mudam.',
+ 'Push / Pull / Legs': 'Push / Pull / Pernas',
+ 'Push, pull and legs each get their own day.': 'Empurrar, puxar e pernas, cada um no seu dia.',
+ 'Upper / Lower': 'Superior / Inferior',
+ 'Upper body twice, lower body twice.': 'Tronco superior duas vezes, inferior duas vezes.',
+ 'Full Body': 'Corpo inteiro',
+ 'Three sessions, the whole body each time.': 'Três sessões, o corpo todo de cada vez.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Cinco séries de cinco nos básicos com barra.',
'Build my own plan': 'Criar o meu próprio plano',
'{0} week streak': 'sequência de {0} semanas',
'this week': 'esta semana',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Horário semanal',
'No routines yet.': 'Ainda sem rotinas.',
'Create one or load the starter plan.': 'Cria uma ou carrega o plano inicial.',
- 'Load starter plan (Push / Pull / Legs)': 'Carregar plano inicial (Push / Pull / Pernas)',
'Superset with exercise above': 'Supersérie com o exercício acima',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Nota (opcional) — dicas de carga, ex. "só a barra, depois +1 anilha por lado a cada série", o que quiser lembrar',
'No exercises yet — add your first one.': 'Ainda sem exercícios — adiciona o primeiro.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'Eliminar rotina?',
'“{0}” and its exercises will be removed.': '«{0}» e os seus exercícios serão removidos.',
'Delete routine': 'Eliminar rotina',
+ 'Copy routine': 'Copiar rotina',
+ 'Copy': 'Cópia',
'{0} exercises with animations': '{0} exercícios com animações',
'Search…': 'Pesquisar…',
'No workouts yet.': 'Ainda sem treinos.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plano inicial carregado — Seg Push · Qua Pull · Sex Pernas',
'Enter a name': 'Introduz um nome',
'Profile created — data from this device moved into it': 'Perfil criado — os dados deste dispositivo foram movidos para ele',
'Profile created — data moved into it': 'Perfil criado — dados movidos',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Minimizar',
'Expand': 'Ampliar',
'Exercise animations': 'Animações dos exercícios',
+ 'Workout view': 'Vista do treino',
+ 'Cards': 'Cartões',
+ 'List': 'Lista',
+ 'Current': 'Atual',
+ 'Set current': 'Marcar como atual',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Mover, trocar e remover abaixo atuam sobre o exercício marcado como {0}.',
'Full': 'Grande',
'Small': 'Pequena',
'Hidden': 'Oculta',
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index f296cae..d3c8917 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Продолжить',
'Stats': 'Статистика',
'Exercises': 'Упражнения',
+ 'By muscle': 'По мышцам',
+ 'Explore muscles': 'Изучить мышцы',
+ 'Choose a muscle to see exercises that train it.': 'Выберите мышцу, чтобы увидеть упражнения, которые её тренируют.',
+ 'Exercises for {0}': 'Упражнения для {0}',
+ 'Clear selection': 'Очистить выбор',
+ 'Primary target': 'Основная мышца',
+ 'Also trains': 'Также тренирует',
'History': 'История',
'Settings': 'Настройки',
'Freestyle': 'Свободная',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — идёт',
'Resume ▶': 'Продолжить ▶',
'Welcome!': 'Добро пожаловать!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Настрой свой недельный план — или загрузи готовый план Push / Pull / Ноги.',
- 'Load starter plan (PPL)': 'Загрузить стартовый план (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Настрой свой недельный план — или загрузи готовый стартовый план.',
+ 'Load starter plan': 'Загрузить стартовый план',
+ 'Choose starter plan': 'Выбери стартовый план',
+ '{0} days per week': 'Дней в неделю: {0}',
+ '{0} loaded': '{0} загружен',
+ 'Load {0}?': 'Загрузить {0}?',
+ 'Load plan': 'Загрузить план',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Новый план встанет на {0}. Все твои программы сохранятся — в плане недели изменятся только эти дни.',
+ 'Push / Pull / Legs': 'Push / Pull / Ноги',
+ 'Push, pull and legs each get their own day.': 'Жимы, тяги и ноги — каждому свой день.',
+ 'Upper / Lower': 'Верх / Низ',
+ 'Upper body twice, lower body twice.': 'Верх тела дважды, низ дважды.',
+ 'Full Body': 'Всё тело',
+ 'Three sessions, the whole body each time.': 'Три тренировки, каждый раз всё тело.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Пять подходов по пять в основных движениях со штангой.',
'Build my own plan': 'Создать свой план',
'{0} week streak': 'серия: {0} нед.',
'this week': 'на этой неделе',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Расписание недели',
'No routines yet.': 'Программ пока нет.',
'Create one or load the starter plan.': 'Создай программу или загрузи стартовый план.',
- 'Load starter plan (Push / Pull / Legs)': 'Загрузить стартовый план (Push / Pull / Ноги)',
'Superset with exercise above': 'Суперсет с упражнением выше',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Заметка (необязательно) — подсказки по нагрузке, напр. «только гриф, затем +1 блин на сторону каждый подход», всё, что стоит запомнить',
'No exercises yet — add your first one.': 'Упражнений пока нет — добавь первое.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'Удалить программу?',
'“{0}” and its exercises will be removed.': '«{0}» и её упражнения будут удалены.',
'Delete routine': 'Удалить программу',
+ 'Copy routine': 'Копировать программу',
+ 'Copy': 'Копия',
'{0} exercises with animations': '{0} упражнений с анимациями',
'Search…': 'Поиск…',
'No workouts yet.': 'Тренировок пока нет.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Стартовый план загружен — Пн Push · Ср Pull · Пт Ноги',
'Enter a name': 'Введите имя',
'Profile created — data from this device moved into it': 'Профиль создан — данные с этого устройства перенесены в него',
'Profile created — data moved into it': 'Профиль создан — данные перенесены',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Свернуть',
'Expand': 'Развернуть',
'Exercise animations': 'Анимации упражнений',
+ 'Workout view': 'Вид тренировки',
+ 'Cards': 'Карточки',
+ 'List': 'Список',
+ 'Current': 'Текущее',
+ 'Set current': 'Сделать текущим',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Кнопки перемещения, замены и удаления ниже действуют на упражнение с пометкой {0}.',
'Full': 'Полная',
'Small': 'Малая',
'Hidden': 'Скрыта',
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index 7ad3a61..196b91f 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -25,6 +25,13 @@ export default {
'Resume': 'เล่นต่อ',
'Stats': 'สถิติ',
'Exercises': 'ท่าออกกำลังกาย',
+ 'By muscle': 'ตามกล้ามเนื้อ',
+ 'Explore muscles': 'สำรวจกล้ามเนื้อ',
+ 'Choose a muscle to see exercises that train it.': 'เลือกกล้ามเนื้อเพื่อดูท่าออกกำลังกายที่ฝึกกล้ามเนื้อนั้น',
+ 'Exercises for {0}': 'ท่าออกกำลังกายสำหรับ {0}',
+ 'Clear selection': 'ล้างการเลือก',
+ 'Primary target': 'กล้ามเนื้อหลัก',
+ 'Also trains': 'ฝึกกล้ามเนื้อนี้ด้วย',
'History': 'ประวัติ',
'Settings': 'ตั้งค่า',
'Freestyle': 'ฟรีสไตล์',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — กำลังดำเนินการ',
'Resume ▶': 'เล่นต่อ ▶',
'Welcome!': 'ยินดีต้อนรับ!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'ตั้งค่ารูทีนรายสัปดาห์เพื่อเริ่มต้น — หรือโหลดแผนสำเร็จรูป Push / Pull / Legs',
- 'Load starter plan (PPL)': 'โหลดแผนเริ่มต้น (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'ตั้งค่ารูทีนรายสัปดาห์เพื่อเริ่มต้น — หรือโหลดแผนเริ่มต้นสำเร็จรูป',
+ 'Load starter plan': 'โหลดแผนเริ่มต้น',
+ 'Choose starter plan': 'เลือกแผนเริ่มต้น',
+ '{0} days per week': 'สัปดาห์ละ {0} วัน',
+ '{0} loaded': 'โหลด {0} แล้ว',
+ 'Load {0}?': 'โหลด {0} ไหม',
+ 'Load plan': 'โหลดแผน',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'แผนใหม่จะลงใน {0} รูทีนเดิมของคุณยังอยู่ครบ — เปลี่ยนเฉพาะวันเหล่านี้ในแผนรายสัปดาห์',
+ 'Push / Pull / Legs': 'Push / Pull / Legs',
+ 'Push, pull and legs each get their own day.': 'ดัน ดึง และขา แยกกันคนละวัน',
+ 'Upper / Lower': 'บน / ล่าง',
+ 'Upper body twice, lower body twice.': 'ลำตัวบนสองครั้ง ลำตัวล่างสองครั้ง',
+ 'Full Body': 'เต็มตัว',
+ 'Three sessions, the whole body each time.': 'สามครั้ง ครบทั้งตัวทุกครั้ง',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'ห้าเซ็ต เซ็ตละห้าครั้ง ในท่าบาร์เบลหลัก',
'Build my own plan': 'สร้างแผนของตัวเอง',
'{0} week streak': 'ต่อเนื่อง {0} สัปดาห์',
'this week': 'สัปดาห์นี้',
@@ -231,7 +252,6 @@ export default {
'Routines': 'รูทีน',
'No routines yet.': 'ยังไม่มีรูทีน',
'Create one or load the starter plan.': 'สร้างใหม่หรือโหลดแผนเริ่มต้น',
- 'Load starter plan (Push / Pull / Legs)': 'โหลดแผนเริ่มต้น (Push / Pull / Legs)',
// --- routine edit ---
'Superset with exercise above': 'ซูเปอร์เซ็ตกับท่าด้านบน',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'บันทึก (ไม่บังคับ) — เคล็ดลับการตั้งน้ำหนัก เช่น "เอาแค่บาร์เปล่าก่อน แล้วค่อยเพิ่มแผ่นละ 1 แผ่นต่อข้างทุกเซ็ต" หรืออะไรก็ตามที่อยากจดจำไว้',
@@ -240,11 +260,12 @@ export default {
'Delete routine?': 'ลบรูทีนนี้?',
'“{0}” and its exercises will be removed.': '“{0}” และท่าทั้งหมดในนั้นจะถูกลบ',
'Delete routine': 'ลบรูทีน',
+ 'Copy routine': 'คัดลอกรูทีน',
+ 'Copy': 'สำเนา',
// --- library / history ---
'{0} exercises with animations': '{0} ท่าพร้อมภาพเคลื่อนไหว',
'Search…': 'ค้นหา…',
'No workouts yet.': 'ยังไม่มีการออกกำลังกาย',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'โหลดแผนเริ่มต้นแล้ว — จ. Push · พ. Pull · ศ. Legs',
// --- login / account ---
'Enter a name': 'กรอกชื่อ',
'Profile created — data from this device moved into it': 'สร้างโปรไฟล์แล้ว — ย้ายข้อมูลจากเครื่องนี้เข้าไปแล้ว',
@@ -404,6 +425,12 @@ export default {
'Minimize': 'ย่อ',
'Expand': 'ขยาย',
'Exercise animations': 'ภาพเคลื่อนไหวท่าออกกำลังกาย',
+ 'Workout view': 'มุมมองการฝึก',
+ 'Cards': 'การ์ด',
+ 'List': 'รายการ',
+ 'Current': 'ปัจจุบัน',
+ 'Set current': 'ตั้งเป็นปัจจุบัน',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'การย้าย สลับ และลบด้านล่างจะมีผลกับท่าที่ทำเครื่องหมาย {0} ไว้',
'Full': 'เต็ม',
'Small': 'เล็ก',
'Hidden': 'ซ่อน',
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 225edf1..0b0853b 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -23,6 +23,13 @@ export default {
'Resume': 'Devam et',
'Stats': 'İstatistik',
'Exercises': 'Egzersizler',
+ 'By muscle': 'Kasa göre',
+ 'Explore muscles': 'Kasları keşfet',
+ 'Choose a muscle to see exercises that train it.': 'Çalıştıran egzersizleri görmek için bir kas seçin.',
+ 'Exercises for {0}': '{0} için egzersizler',
+ 'Clear selection': 'Seçimi temizle',
+ 'Primary target': 'Ana hedef',
+ 'Also trains': 'Ayrıca çalıştırır',
'History': 'Geçmiş',
'Settings': 'Ayarlar',
'Freestyle': 'Serbest',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0} — devam ediyor',
'Resume ▶': 'Devam et ▶',
'Welcome!': 'Hoş geldin!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Başlamak için haftalık rutinini kur — ya da hazır bir Push / Pull / Bacak planı yükle.',
- 'Load starter plan (PPL)': 'Başlangıç planını yükle (PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': 'Başlamak için haftalık rutinini kur — ya da hazır bir başlangıç planı yükle.',
+ 'Load starter plan': 'Başlangıç planı yükle',
+ 'Choose starter plan': 'Başlangıç planı seç',
+ '{0} days per week': 'Haftada {0} gün',
+ '{0} loaded': '{0} yüklendi',
+ 'Load {0}?': '{0} yüklensin mi?',
+ 'Load plan': 'Planı yükle',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': 'Yeni plan {0} günlerine yerleşecek. Mevcut rutinlerin duruyor — haftalık planda yalnızca bu günler değişiyor.',
+ 'Push / Pull / Legs': 'Push / Pull / Bacak',
+ 'Push, pull and legs each get their own day.': 'İtiş, çekiş ve bacak; her biri kendi gününde.',
+ 'Upper / Lower': 'Üst / Alt',
+ 'Upper body twice, lower body twice.': 'Üst vücut iki kez, alt vücut iki kez.',
+ 'Full Body': 'Tüm vücut',
+ 'Three sessions, the whole body each time.': 'Üç antrenman, her seferinde tüm vücut.',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': 'Ana halter hareketlerinde beşer tekrarlı beş set.',
'Build my own plan': 'Kendi planımı oluştur',
'{0} week streak': '{0} haftalık seri',
'this week': 'bu hafta',
@@ -228,7 +249,6 @@ export default {
'Week schedule': 'Hafta programı',
'No routines yet.': 'Henüz rutin yok.',
'Create one or load the starter plan.': 'Bir tane oluştur ya da başlangıç planını yükle.',
- 'Load starter plan (Push / Pull / Legs)': 'Başlangıç planını yükle (Push / Pull / Bacak)',
'Superset with exercise above': 'Üstteki egzersizle süperset',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': 'Not (isteğe bağlı) — yükleme ipuçları, örn. "sadece bar, sonra her sette +1 disk/taraf", aklında tutmak istediğin her şey',
'No exercises yet — add your first one.': 'Henüz egzersiz yok — ilkini ekle.',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': 'Rutin silinsin mi?',
'“{0}” and its exercises will be removed.': '“{0}” ve egzersizleri kaldırılacak.',
'Delete routine': 'Rutini sil',
+ 'Copy routine': 'Rutini kopyala',
+ 'Copy': 'Kopya',
'{0} exercises with animations': 'animasyonlu {0} egzersiz',
'Search…': 'Ara…',
'No workouts yet.': 'Henüz antrenman yok.',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Başlangıç planı yüklendi — Pzt Push · Çar Pull · Cum Bacak',
'Enter a name': 'Bir isim gir',
'Profile created — data from this device moved into it': 'Profil oluşturuldu — bu cihazdaki veriler profile taşındı',
'Profile created — data moved into it': 'Profil oluşturuldu — veriler taşındı',
@@ -394,6 +415,12 @@ export default {
'Minimize': 'Küçült',
'Expand': 'Büyüt',
'Exercise animations': 'Egzersiz animasyonları',
+ 'Workout view': 'Antrenman görünümü',
+ 'Cards': 'Kartlar',
+ 'List': 'Liste',
+ 'Current': 'Aktif',
+ 'Set current': 'Aktif olarak işaretle',
+ 'Move, swap and remove below act on the exercise marked {0}.': 'Aşağıdaki taşıma, değiştirme ve kaldırma işlemleri {0} olarak işaretli egzersiz için geçerlidir.',
'Full': 'Tam',
'Small': 'Küçük',
'Hidden': 'Gizli',
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index 4571116..ad32543 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -23,6 +23,13 @@ export default {
'Resume': '继续',
'Stats': '统计',
'Exercises': '动作库',
+ 'By muscle': '按肌肉',
+ 'Explore muscles': '探索肌肉',
+ 'Choose a muscle to see exercises that train it.': '选择一块肌肉以查看训练它的动作。',
+ 'Exercises for {0}': '{0} 训练动作',
+ 'Clear selection': '清除选择',
+ 'Primary target': '主要目标',
+ 'Also trains': '同时训练',
'History': '历史',
'Settings': '设置',
'Freestyle': '自由训练',
@@ -202,8 +209,22 @@ export default {
'{0} — in progress': '{0}——进行中',
'Resume ▶': '继续 ▶',
'Welcome!': '欢迎!',
- 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': '设置每周计划开始训练——或加载现成的推 / 拉 / 腿计划。',
- 'Load starter plan (PPL)': '加载入门计划(PPL)',
+ 'Set up your weekly routine to get going — or load a ready-made starter plan.': '设置每周计划开始训练——或加载现成的入门计划。',
+ 'Load starter plan': '加载入门计划',
+ 'Choose starter plan': '选择入门计划',
+ '{0} days per week': '每周 {0} 天',
+ '{0} loaded': '已加载{0}',
+ 'Load {0}?': '加载{0}?',
+ 'Load plan': '加载计划',
+ 'The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.': '新计划将安排在{0}。你现有的训练日都会保留——每周计划中只有这几天会改变。',
+ 'Push / Pull / Legs': '推 / 拉 / 腿',
+ 'Push, pull and legs each get their own day.': '推、拉、腿各占一天。',
+ 'Upper / Lower': '上肢 / 下肢',
+ 'Upper body twice, lower body twice.': '上肢两次,下肢两次。',
+ 'Full Body': '全身',
+ 'Three sessions, the whole body each time.': '三次训练,每次练全身。',
+ '5×5': '5×5',
+ 'Five sets of five on the main barbell lifts.': '主要杠铃动作五组五次。',
'Build my own plan': '创建自己的计划',
'{0} week streak': '连续 {0} 周',
'this week': '本周',
@@ -228,7 +249,6 @@ export default {
'Week schedule': '每周日程',
'No routines yet.': '还没有训练日。',
'Create one or load the starter plan.': '创建一个或加载入门计划。',
- 'Load starter plan (Push / Pull / Legs)': '加载入门计划(推 / 拉 / 腿)',
'Superset with exercise above': '与上面的动作组成超级组',
'Note (optional) — loading cues, "bar only then +1 plate/side each set", anything worth remembering here': '备注(可选)— 加重提示,例如"空杠开始,之后每组每侧+1片",任何你想记住的内容',
'No exercises yet — add your first one.': '还没有动作——添加第一个吧。',
@@ -236,10 +256,11 @@ export default {
'Delete routine?': '删除训练日?',
'“{0}” and its exercises will be removed.': '“{0}”及其动作将被移除。',
'Delete routine': '删除训练日',
+ 'Copy routine': '复制训练日',
+ 'Copy': '副本',
'{0} exercises with animations': '{0} 个带动画的动作',
'Search…': '搜索…',
'No workouts yet.': '还没有训练。',
- 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': '入门计划已加载——周一推 · 周三拉 · 周五腿',
'Enter a name': '请输入名字',
'Profile created — data from this device moved into it': '档案已创建——本设备数据已转入',
'Profile created — data moved into it': '档案已创建——数据已转入',
@@ -394,6 +415,12 @@ export default {
'Minimize': '缩小',
'Expand': '放大',
'Exercise animations': '动作动画',
+ 'Workout view': '训练视图',
+ 'Cards': '卡片',
+ 'List': '列表',
+ 'Current': '当前',
+ 'Set current': '设为当前',
+ 'Move, swap and remove below act on the exercise marked {0}.': '下方的移动、替换和删除将作用于标记为{0}的动作。',
'Full': '完整',
'Small': '小',
'Hidden': '隐藏',
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index 8ccba30..3b3af2e 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -4,18 +4,19 @@ import { useUI } from './store/useUI.js'
import { EXDB, EXIDX, BODYPARTS, isCardio, isBodyweightEq, allExercises, equipmentOf, smOf, matchExercise, exOr } from './lib/exercises.js'
import { activeProfile, exAvailable, ALL_EQUIPMENT, newProfile } from './lib/equipment.js'
import { fmtDate, fmtNum, fmtVol, fmtDur, durPart, todayISO, isoOf, uid, exCount, DAYN, DAYS, weekOrder, weekStartOf, weekDayOffset, MONTHS_LONG, ACCENTS } from './lib/format.js'
-import { lastEntryFor, bestWeightFor, buildSets, effectiveRoutineId, workoutVolume, setsDone, setsDoneActive, lastBW, supersetUnits, unitOf, setLabel, defaultConfig, cleanupSg, modeOf, effortOf, isBw, isPerSide, sideReps, workSetsDone, applyIntensifierPlan, MAX_PLANNED_WARMUPS, NOTE_MAX } from './lib/history.js'
+import { lastEntryFor, bestWeightFor, bestWeightForEntry, buildSets, effectiveRoutineId, workoutVolume, setsDone, setsDoneActive, lastBW, supersetUnits, unitOf, setLabel, defaultConfig, cleanupSg, modeOf, effortOf, isBw, isPerSide, sideReps, workSetsDone, applyIntensifierPlan, MAX_PLANNED_WARMUPS, NOTE_MAX } from './lib/history.js'
import { usesBar, barWeightFor, defaultBarWeight, hasBarOverride } from './lib/bar.js'
import { beep, vibrate } from './lib/sound.js'
-import { t, instrFor, exerciseNameFor, getLang, INSTR_LANGS } from './lib/i18n.js'
+import { t, dateLocale, instrFor, exerciseNameFor, getLang, INSTR_LANGS } from './lib/i18n.js'
import { nav } from './lib/nav.js'
-import { starterRoutines } from './lib/starter.js'
+import { buildStarterPlan, starterPlanDays, starterPlanOptions } from './lib/starter.js'
import Media, { Thumb } from './components/Media.jsx'
import Stepper from './components/Stepper.jsx'
import Icon from './components/Icon.jsx'
import { Button, Slider, Switch, Segmented, SelectRow, Row, TextField, MultiSelectRow } from './components/ui.jsx'
import { glyphOf, GLYPH_GROUPS, DEFAULT_GLYPH } from './lib/glyphs.js'
import BodyMap from './components/BodyMap.jsx'
+import MuscleExplorer from './components/MuscleExplorer.jsx'
import { exerciseMuscleSnapshot, loadOfWorkouts, MUSCLES, MUSCLE_NAME, normalizeMuscleGroups, hasExplicitMuscleMetadata } from './lib/muscles.js'
import { parseImport, mergeImport } from './lib/import-csv.js'
import { importHevyData, HevyApiError, HEVY_DEV_SETTINGS, mergeHevyRoutines } from './lib/import-hevy.js'
@@ -54,15 +55,65 @@ export function confirmSheet(opts) {
}
/* ============================ starter plan ============================ */
-export function loadStarterPlan() {
- const [push, pull, legs] = starterRoutines()
- update(st => {
- st.routines.push(push, pull, legs)
- st.week[1] = push.id; st.week[3] = pull.id; st.week[5] = legs.id
- })
- toast(t('Starter plan loaded — Mon Push · Wed Pull · Fri Legs'))
+// Plan names and blurbs live here, not in lib/starter.js: check-source-strings.mjs only finds
+// string literals written inside a t() call, so copy parked in the catalog and passed in as a
+// variable is invisible to it — it would quietly stay English in every language.
+const PLAN_COPY = {
+ ppl: () => ({ name: t('Push / Pull / Legs'), about: t('Push, pull and legs each get their own day.') }),
+ 'upper-lower': () => ({ name: t('Upper / Lower'), about: t('Upper body twice, lower body twice.') }),
+ 'full-body': () => ({ name: t('Full Body'), about: t('Three sessions, the whole body each time.') }),
+ '5x5': () => ({ name: t('5×5'), about: t('Five sets of five on the main barbell lifts.') })
}
+// Adds the plan's routines and puts them on its weekdays. Existing routines are never touched
+// and only the weekdays the plan asks for are reassigned; an id with no plan behind it changes
+// nothing at all. planId is deliberately required — a default invites `onClick={loadStarterPlan}`,
+// which hands the click event in as the plan and silently loads nothing.
+export function loadStarterPlan(planId) {
+ const plan = buildStarterPlan(planId)
+ if (!plan) return false
+ update(st => {
+ st.routines.push(...plan.routines)
+ plan.schedule.forEach(({ day, routineId }) => { st.week[day] = routineId })
+ })
+ toast(t('{0} loaded', PLAN_COPY[planId]().name))
+ return true
+}
+
+// Intl joins the days the way each language does it — "and" vs "und", "、" in Chinese.
+const dayList = days => new Intl.ListFormat(dateLocale()).format(days.map(d => t(DAYN[d])))
+
+function StarterPlanChooser({ close }) {
+ const week = useStore(s => s.S.week)
+ const choose = (id, name) => {
+ const days = starterPlanDays(id)
+ close()
+ // A confirmation is only worth showing when one of those days is actually occupied.
+ if (!days.some(day => week[day])) { loadStarterPlan(id); return }
+ confirmSheet({
+ title: t('Load {0}?', name),
+ message: t('The new plan will be scheduled on {0}. Existing routines are kept — only those days of the weekly plan change.', dayList(days)),
+ confirmText: t('Load plan'),
+ onConfirm: () => loadStarterPlan(id)
+ })
+ }
+ return <>
+
{t('Choose starter plan')}
+
+ {starterPlanOptions().map(({ id, days }) => {
+ const { name, about } = PLAN_COPY[id]()
+ return
choose(id, name))}>
+
+
{name}
{t('{0} days per week', days)} · {about}
+
+
+ })}
+
+ >
+}
+
+export const starterPlanSheet = () => ui().openSheet(close => )
+
/* ============================ weight picker (shared: body weight + goal) ============================ */
// Fixed range, not a moving window — a window that resizes itself mid-drag (the previous
// attempt) makes the thumb's position unpredictable: every time it grows, everything already
@@ -712,6 +763,7 @@ function ExercisePicker({ onPick, close }) {
const [eq, setEq] = useState('') // '' = any equipment
const [showAll, setShowAll] = useState(false)
const [shown, setShown] = useState(50)
+ const [byMuscle, setByMuscle] = useState(false)
const searchRef = useRef(null)
const bpStrip = useRef(null), eqStrip = useRef(null)
const onSearchFocus = useSheetKeyboard(searchRef)
@@ -729,8 +781,17 @@ function ExercisePicker({ onPick, close }) {
const chosenCount = Object.keys(usage).length
useRevealActiveChip(bpStrip, bp)
useRevealActiveChip(eqStrip, eqOn)
+ if (byMuscle) return <>
+
{t('Add exercise')}
+
+
+
+ >
+
return <>
-
{t('Add exercise')}
+
{t('Add exercise')}
+
+
{/* .picker-search is what index.css keys the keyboard-aware sheet layout on: the sheet
lifts above the keys and the search stays put while the list scrolls under it. */}
@@ -758,7 +819,14 @@ function ExercisePicker({ onPick, close }) {
}
{f.slice(0, shown).map(e =>
onPick(e))}>
{exerciseNameFor(e)}
{t(e.tg || e.bp)} · {t(e.eq)}
- {usage[e.id] && }
+ {usage[e.id] && }
+ {/* A "+" glyph reads as "add this now" — it used to just open the same detail sheet as
+ tapping the row, so it added nothing until you'd scrolled past the sets/reps config
+ and found the real button. Now it does what it looks like: adds with the default
+ config right away. Tapping the row itself still opens the detail/config sheet, for
+ when you want to set sets/reps before adding. */}
+
)}
{f.length === 0 && bp === '★' &&
{t('Nothing chosen yet — add exercises and they’ll show up here.')}
}
@@ -783,7 +851,7 @@ export function swapActiveWorkoutExercise(index) {
const freestyle = !st.active?.routineId
const step = defaultIncrement(ex.id, st.unit)
const plan = freestyle ? null : nextPrescription(st, full, st.routines.find(r => r.id === st.active.routineId))
- const built = buildSets(st, full, { step, ...(freestyle ? { preferLast: true } : {}) })
+ const built = buildSets(st, full, { step, ...(freestyle ? { preferLast: true } : {}), ...(plan?.kind === 'off' ? { useTarget: true } : {}) })
const replacement = {
id: ex.id,
target: { ...cfg },
@@ -1740,7 +1808,7 @@ function doFinishWorkout() {
s.workouts = completeBackfill(s.workouts, A, w)
} else {
w.entries.forEach(e => {
- const mx = Math.max(0, ...e.sets.filter(x => x.done && !isWarmupRow(x)).map(x => x.w || 0), e.topW || 0)
+ const mx = bestWeightForEntry(e)
if (mx > 0) { const cur = s.exWeights[e.id]; if (!cur || mx > cur.w) s.exWeights[e.id] = { w: mx, d: w.d } }
})
s.workouts.push(w)
diff --git a/frontend/src/sheets.starter.test.jsx b/frontend/src/sheets.starter.test.jsx
new file mode 100644
index 0000000..007950b
--- /dev/null
+++ b/frontend/src/sheets.starter.test.jsx
@@ -0,0 +1,127 @@
+// @vitest-environment happy-dom
+// The chooser is where a starter plan can quietly do the wrong thing: overwrite a weekday
+// without asking, ask when there was nothing to overwrite, or apply a plan the user cancelled.
+import React, { act } from 'react'
+import { afterEach, beforeEach, describe, expect, it } from 'vitest'
+import { createRoot } from 'react-dom/client'
+import { useStore } from './store/useStore.js'
+import { useUI } from './store/useUI.js'
+import { loadStarterPlan, starterPlanSheet } from './sheets.jsx'
+
+const mounted = []
+
+const S = () => useStore.getState().S
+const nameOn = day => S().routines.find(r => r.id === S().week[day])?.name
+
+// Renders whatever sheet is on top and returns its host element.
+function renderTop() {
+ const sheet = useUI.getState().sheets.at(-1)
+ const host = document.createElement('div')
+ document.body.appendChild(host)
+ const root = createRoot(host)
+ mounted.push(root)
+ act(() => root.render(sheet.render(() => useUI.getState().closeSheet(sheet.id))))
+ return host
+}
+
+const rowFor = (host, name) => [...host.querySelectorAll('.item')].find(el => el.querySelector('.tt')?.textContent === name)
+const buttonFor = (host, label) => [...host.querySelectorAll('button')].find(b => b.textContent === label)
+
+// Opens the chooser and taps one of its rows.
+function choose(name) {
+ starterPlanSheet()
+ const host = renderTop()
+ act(() => { rowFor(host, name).click() })
+}
+
+beforeEach(() => {
+ globalThis.IS_REACT_ACT_ENVIRONMENT = true
+ useUI.setState({ sheets: [], toastMsg: '' })
+ useStore.setState(s => ({
+ S: { ...s.S, routines: [{ id: 'mine', name: 'My routine', emoji: 'star', ex: [] }], week: {}, active: null },
+ }))
+ document.body.innerHTML = ''
+})
+
+afterEach(() => {
+ act(() => { mounted.splice(0).forEach(root => root.unmount()) })
+})
+
+describe('starter plan chooser', () => {
+ it('lists every plan with its day count', () => {
+ starterPlanSheet()
+ const host = renderTop()
+ expect([...host.querySelectorAll('.item .tt')].map(el => el.textContent))
+ .toEqual(['Push / Pull / Legs', 'Upper / Lower', 'Full Body', '5×5'])
+ expect(rowFor(host, 'Upper / Lower').querySelector('.ss').textContent).toContain('4 days per week')
+ })
+
+ it('loads straight away when the plan’s weekdays are free, without asking', () => {
+ useStore.setState(s => ({ S: { ...s.S, week: { 0: 'mine', 6: 'mine' } } }))
+ choose('Upper / Lower')
+
+ expect(useUI.getState().sheets).toHaveLength(0) // no confirmation was raised
+ expect(nameOn(1)).toBe('Upper A')
+ expect(nameOn(2)).toBe('Lower A')
+ expect(nameOn(4)).toBe('Upper B')
+ expect(nameOn(5)).toBe('Lower B')
+ expect(S().week[0]).toBe('mine') // untouched weekdays stay put
+ expect(S().week[6]).toBe('mine')
+ expect(S().routines[0].name).toBe('My routine') // and nothing is deleted
+ expect(useUI.getState().toastMsg).toBe('Upper / Lower loaded')
+ })
+
+ it('asks first when a weekday the plan wants is already taken', () => {
+ useStore.setState(s => ({ S: { ...s.S, week: { 3: 'mine' } } }))
+ choose('Full Body')
+
+ const confirm = renderTop()
+ expect(confirm.querySelector('h3').textContent).toBe('Load Full Body?')
+ expect(confirm.textContent).toContain('Monday, Wednesday and Friday')
+ expect(S().week[3]).toBe('mine') // nothing applied yet
+ expect(S().routines).toHaveLength(1)
+
+ act(() => { buttonFor(confirm, 'Load plan').click() })
+ expect(nameOn(1)).toBe('Full Body A')
+ expect(nameOn(3)).toBe('Full Body B')
+ expect(nameOn(5)).toBe('Full Body C')
+ })
+
+ it('leaves everything alone when the confirmation is cancelled', () => {
+ useStore.setState(s => ({ S: { ...s.S, week: { 1: 'mine' } } }))
+ const before = structuredClone(S())
+ choose('5×5')
+
+ const confirm = renderTop()
+ act(() => { buttonFor(confirm, 'Cancel').click() })
+ expect(S()).toEqual(before)
+ expect(useUI.getState().toastMsg).toBe('')
+ })
+
+ it('does not ask when only weekdays outside the plan are occupied', () => {
+ useStore.setState(s => ({ S: { ...s.S, week: { 2: 'mine', 4: 'mine' } } })) // Tue + Thu
+ choose('5×5') // wants Mon/Wed/Fri
+ expect(useUI.getState().sheets).toHaveLength(0)
+ expect(nameOn(1)).toBe('5×5 A')
+ })
+})
+
+describe('loadStarterPlan', () => {
+ it('appends independent routines each time the same plan is loaded', () => {
+ loadStarterPlan('ppl')
+ const first = S().routines.slice(1).map(r => r.id)
+ loadStarterPlan('ppl')
+ const second = S().routines.slice(4).map(r => r.id)
+ expect(S().routines).toHaveLength(7)
+ expect(new Set([...first, ...second]).size).toBe(6)
+ expect(second.some(id => first.includes(id))).toBe(false)
+ })
+
+ it('refuses a plan it does not know and changes nothing', () => {
+ const before = structuredClone(S())
+ expect(loadStarterPlan('nope')).toBe(false)
+ expect(loadStarterPlan(undefined)).toBe(false)
+ expect(S()).toEqual(before)
+ expect(useUI.getState().toastMsg).toBe('')
+ })
+})
diff --git a/frontend/src/store/useStore.js b/frontend/src/store/useStore.js
index 7a51aa1..4c5f879 100644
--- a/frontend/src/store/useStore.js
+++ b/frontend/src/store/useStore.js
@@ -14,6 +14,10 @@ export const DEF = {
theme: 'dark', accent: 'lime', body: 'male', targetW: null,
bodyweight: [], routines: [], week: {}, dayPlan: {},
exWeights: {}, workouts: [], active: null, customEx: [], gifSize: 'full',
+ // How the active workout is laid out — 'cards' (one exercise at a time with Prev/Next)
+ // or 'list' (every exercise stacked and scrollable). Purely presentational: profiles
+ // written before this setting existed overlay onto DEF and keep the 'cards' behaviour.
+ workoutView: 'cards',
// effort: which per-set effort scale is logged — 'none' | 'rir' | 'rpe'. null, not 'none', so
// that a profile which never chose (loaded state is overlaid on DEF, on every path: local,
// server pull, backup import) still falls back to the `showRir` boolean this replaced and
diff --git a/frontend/src/store/useUI.js b/frontend/src/store/useUI.js
index 530ba55..8841789 100644
--- a/frontend/src/store/useUI.js
+++ b/frontend/src/store/useUI.js
@@ -13,6 +13,16 @@ const cancelPushRestTimer = () => { if (useStore.getState().user) api('/api/push
const notificationsSupported = () => typeof window !== 'undefined' && 'Notification' in window
let requestRestNotificationPermissionP = null
+// Set the moment the tab goes hidden, never cleared here — timerTick/workTick read and
+// clear it themselves once they're running visible again. Lets a completion tick tell
+// "the countdown hit zero while the app was actually open" from "it hit zero while
+// backgrounded/closed and we're only just catching up now that it's open again" — the
+// latter must skip beep/vibrate/flash/toast and rely solely on the push notification.
+let pageHiddenAt = null
+if (typeof document !== 'undefined') {
+ document.addEventListener('visibilitychange', () => { if (document.hidden) pageHiddenAt = Date.now() })
+}
+
const requestRestNotificationPermission = async () => {
if (!notificationsSupported()) return false
if (Notification.permission === 'granted') return true
@@ -59,7 +69,7 @@ export const useUI = create((set, get) => ({
timer: null, // rest countdown between sets — { left, total, endsAt, forIdx }
// forIdx: index of the active entry whose set started the rest (undefined when unknown)
work: null, // work countdown DURING a timed set (issue #16) — { left, total, endsAt, label }
- timerFlashId: 0, // changing the id remounts the four-pulse visual alert
+ timerFlashId: 0, // changing the id retriggers the theme-blink visual alert
flashTimer() {
if (!useStore.getState().S.timerFlash) return
@@ -94,11 +104,20 @@ export const useUI = create((set, get) => ({
const tm = get().timer
if (!tm) return
const left = Math.max(0, Math.round((tm.endsAt - Date.now()) / 1000))
+ const seenLive = !document.hidden && pageHiddenAt === null
+ if (!document.hidden) pageHiddenAt = null
if (left === tm.left) return
const snd = useStore.getState().S.sound
if (left <= 0) {
- beep(snd, 880, 0.15); beep(snd, 880, 0.15, 0.25); beep(snd, 1320, 0.4, 0.5)
- vibrate([200, 100, 200]); get().flashTimer(); maybeRestNotification(); get().toast(t('Rest over — next set!')); get().stopRest(); return
+ if (seenLive) {
+ beep(snd, 880, 0.15); beep(snd, 880, 0.15, 0.25); beep(snd, 1320, 0.4, 0.5)
+ vibrate([200, 100, 200]); get().flashTimer()
+ }
+ // The toast stays even when the rest ran out while the app was hidden: a guest, or anyone
+ // without push permission, gets no notification, and a countdown that silently vanishes
+ // on reopen reads like a bug. Only the loud parts (beep, vibration, flash) are gated.
+ get().toast(t('Rest over — next set!'))
+ maybeRestNotification(); get().stopRest(); return
}
if (left <= 3) beep(snd, 660, 0.1)
set({ timer: { ...tm, left } })
@@ -149,11 +168,15 @@ export const useUI = create((set, get) => ({
const wk = get().work
if (!wk) return
const left = Math.max(0, Math.round((wk.endsAt - Date.now()) / 1000))
+ const seenLive = !document.hidden && pageHiddenAt === null
+ if (!document.hidden) pageHiddenAt = null
if (left === wk.left) return
const snd = useStore.getState().S.sound
if (left <= 0) {
- beep(snd, 880, 0.15); beep(snd, 880, 0.15, 0.25); beep(snd, 1320, 0.4, 0.5)
- vibrate([200, 100, 200]); get().flashTimer()
+ if (seenLive) {
+ beep(snd, 880, 0.15); beep(snd, 880, 0.15, 0.25); beep(snd, 1320, 0.4, 0.5)
+ vibrate([200, 100, 200]); get().flashTimer()
+ }
const done = workDone
get().stopWork()
if (done) done(wk.total)
diff --git a/frontend/src/store/useUI.test.js b/frontend/src/store/useUI.test.js
index bfd72d2..2d7d2e3 100644
--- a/frontend/src/store/useUI.test.js
+++ b/frontend/src/store/useUI.test.js
@@ -64,4 +64,35 @@ describe('opt-in timer screen flash', () => {
vi.advanceTimersByTime(1000)
expect(useUI.getState().timerFlashId).toBe(1)
})
+
+ const goHidden = () => { Object.defineProperty(document, 'hidden', { value: true, configurable: true }); document.dispatchEvent(new Event('visibilitychange')) }
+ const goVisible = () => { Object.defineProperty(document, 'hidden', { value: false, configurable: true }); document.dispatchEvent(new Event('visibilitychange')) }
+ afterEach(() => goVisible()) // leave document.hidden the way every other test expects it
+
+ it('does not flash a rest that expires while the app is hidden, even once reopened', () => {
+ useStore.setState({ S: { ...useStore.getState().S, timerFlash: true } })
+ useUI.getState().startRest(90)
+ goHidden()
+ vi.setSystemTime(Date.now() + 91_000) // deadline passes with no ticks — the app was actually closed/suspended
+ goVisible() // reopening re-fires visibilitychange, which is how the bug used to trigger
+ expect(useUI.getState().timerFlashId).toBe(0)
+ expect(useUI.getState().timer).toBe(null)
+ })
+
+ it('does not flash a timed exercise that finishes while the app is hidden', () => {
+ useStore.setState({ S: { ...useStore.getState().S, timerFlash: true } })
+ useUI.getState().startWork(90, 'Plank', vi.fn())
+ goHidden()
+ vi.setSystemTime(Date.now() + 91_000)
+ goVisible()
+ expect(useUI.getState().timerFlashId).toBe(0)
+ expect(useUI.getState().work).toBe(null)
+ })
+
+ it('still flashes a rest that expires normally while the app stays visible', () => {
+ useStore.setState({ S: { ...useStore.getState().S, timerFlash: true } })
+ useUI.getState().startRest(1)
+ vi.advanceTimersByTime(1000)
+ expect(useUI.getState().timerFlashId).toBe(1)
+ })
})
diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsx
index 8a162d2..507426e 100644
--- a/frontend/src/views/Home.jsx
+++ b/frontend/src/views/Home.jsx
@@ -4,7 +4,7 @@ import { useStore } from '../store/useStore.js'
import { effectiveRoutine, effectiveRoutineId, nextTrainingDay, streakWeeks, lastBW, setsDoneActive } from '../lib/history.js'
import { fmtNum, fmtDate, todayISO, isoOf, weekKey, weekStartOf, weekDayOffset, DAYS, DAYN } from '../lib/format.js'
import { t, dateLocale } from '../lib/i18n.js'
-import { bwSheet, goalSheet, dayOverrideSheet, calendarSheet, startFlow, loadStarterPlan, bwDeltaColor } from '../sheets.jsx'
+import { bwSheet, goalSheet, dayOverrideSheet, calendarSheet, startFlow, starterPlanSheet, bwDeltaColor } from '../sheets.jsx'
import LineChart from '../components/LineChart.jsx'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
@@ -117,8 +117,8 @@ export default function Home() {
{t('Welcome!')}
-
{t('Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.')}
-
+
{t('Set up your weekly routine to get going — or load a ready-made starter plan.')}
+
)}
diff --git a/frontend/src/views/Library.jsx b/frontend/src/views/Library.jsx
index 5822a78..b591abb 100644
--- a/frontend/src/views/Library.jsx
+++ b/frontend/src/views/Library.jsx
@@ -1,4 +1,5 @@
import { useRef, useState } from 'react'
+import { useNavigate } from 'react-router-dom'
import { useStore } from '../store/useStore.js'
import { EXDB, BODYPARTS, allExercises, equipmentOf, matchExercise } from '../lib/exercises.js'
import { activeProfile, exAvailable } from '../lib/equipment.js'
@@ -12,6 +13,7 @@ import { Button } from '../components/ui.jsx'
import { tappable, useRevealActiveChip } from '../lib/use-sheet-keyboard.js'
export default function Library() {
+ const nav = useNavigate()
const S = useStore(s => s.S)
const [q, setQ] = useState('')
const [bp, setBp] = useState('')
@@ -30,7 +32,9 @@ export default function Library() {
useRevealActiveChip(eqStrip, eqOn)
return <>
-
{t('Exercises')}
{t('{0} exercises with animations', EXDB.length)}
+
{t('Exercises')}
{t('{0} exercises with animations', EXDB.length)}
+
+
{ setQ(e.target.value); setShown(40) }} />
{profile &&
diff --git a/frontend/src/views/Muscles.jsx b/frontend/src/views/Muscles.jsx
new file mode 100644
index 0000000..a1de3db
--- /dev/null
+++ b/frontend/src/views/Muscles.jsx
@@ -0,0 +1,15 @@
+import { useNavigate } from 'react-router-dom'
+import { t } from '../lib/i18n.js'
+import MuscleExplorer from '../components/MuscleExplorer.jsx'
+import { exerciseDetailSheet, addToRoutineSheet } from '../sheets.jsx'
+import Icon from '../components/Icon.jsx'
+
+export default function Muscles() {
+ const nav = useNavigate()
+ return <>
+
+
{t('Explore muscles')}
{t('Choose a muscle to see exercises that train it.')}
+
+
+ >
+}
diff --git a/frontend/src/views/Plan.jsx b/frontend/src/views/Plan.jsx
index faa2842..77e69c1 100644
--- a/frontend/src/views/Plan.jsx
+++ b/frontend/src/views/Plan.jsx
@@ -2,7 +2,7 @@ import { useNavigate } from 'react-router-dom'
import { useStore } from '../store/useStore.js'
import { DAYN, weekOrder, weekStartOf, uid, exCount } from '../lib/format.js'
import { t } from '../lib/i18n.js'
-import { dayAssignSheet, loadStarterPlan, planToolsSheet } from '../sheets.jsx'
+import { dayAssignSheet, starterPlanSheet, planToolsSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
import { tappable } from '../lib/use-sheet-keyboard.js'
@@ -66,7 +66,7 @@ export default function Plan() {
{r.name}
{exCount(r.ex.length)}
)} : <>
{t('No routines yet.')} {t('Create one or load the starter plan.')}
-
+
>}
>
diff --git a/frontend/src/views/RoutineEdit.jsx b/frontend/src/views/RoutineEdit.jsx
index 701b062..0cce769 100644
--- a/frontend/src/views/RoutineEdit.jsx
+++ b/frontend/src/views/RoutineEdit.jsx
@@ -1,16 +1,18 @@
import { useNavigate, useParams } from 'react-router-dom'
import { useEffect, useRef, useState } from 'react'
import { useStore } from '../store/useStore.js'
+import { useUI } from '../store/useUI.js'
import { exOr } from '../lib/exercises.js'
import { activeProfile, exAvailable } from '../lib/equipment.js'
import { uid } from '../lib/format.js'
import { t, exerciseNameFor } from '../lib/i18n.js'
-import { supersetUnits, moveSupersetUnit, cleanupSg, exLine } from '../lib/history.js'
+import { supersetUnits, moveSupersetUnit, cleanupSg, exLine, defaultConfig } from '../lib/history.js'
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, Row, SelectRow, Switch } from '../components/ui.jsx'
+import { copyRoutine } from '../lib/routines.js'
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'
@@ -305,6 +307,7 @@ export default function RoutineEdit() {
const { id } = useParams()
const S = useStore(s => s.S)
const update = useStore(s => s.update)
+ const toast = useUI(s => s.toast)
const r = S.routines.find(x => x.id === id)
useEffect(() => { if (!r) nav('/plan') }, [!!r])
// Editing here has no explicit "save" — every field change persists immediately. A single
@@ -423,7 +426,20 @@ export default function RoutineEdit() {
})()}
{t('Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.')}