Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Plan: your loop is called Rotation in the language on screen
Duarte Santosa66087d367df
diff --git a/frontend/src/components/QueueRow.jsx b/frontend/src/components/QueueRow.jsxindex 05f8f0b15..a28b052e9 100644--- a/frontend/src/components/QueueRow.jsx+++ b/frontend/src/components/QueueRow.jsx@@ -32,7 +32,9 @@ export default function QueueRow({ S, today, onStart, managed }) {: t('Next: {0}', pinned.name + ' · ' + fmtDate(pinned.on, true))return <div className="queue"><div className="row between" style={{ marginBottom: 8 }}>- <div className="small muted" style={{ fontWeight: 500 }}>{v.label}</div>+ {/* Your own loop is called 'Rotation' in the language on screen: its saved name is only ever+ the word itself, which older saves kept in the language the loop was made in. */}+ <div className="small muted" style={{ fontWeight: 500 }}>{managed ? t('Rotation') : v.label}</div>{/* Your own loop speaks in rounds, as Plan does; a coach's week keeps its plain count. */}<div className="small muted">{managed ? t('{0} of {1} done this round.', v.items.length - v.remaining.length, v.items.length) : `${v.items.length - v.remaining.length} / ${v.items.length}`}</div></div>diff --git a/frontend/src/views/Home.queue.test.jsx b/frontend/src/views/Home.queue.test.jsxindex 420d21c61..455342aaa 100644--- a/frontend/src/views/Home.queue.test.jsx+++ b/frontend/src/views/Home.queue.test.jsx@@ -11,6 +11,7 @@ import { useStore } from '../store/useStore.js'import { startFlow } from '../sheets.jsx'import { todayISO, isoOf, fmtDate } from '../lib/format.js'import Home from './Home.jsx'+import { setLang } from '../lib/i18n.js'vi.mock('react-router-dom', () => ({ useNavigate: () => () => {} }))vi.mock('../sheets.jsx', () => ({@@ -332,3 +333,24 @@ describe('Home — the today row follows today\'s plan, not just the last sessioexpect(tag()).toBe('Start')})})++describe('Home: your own loop', () => {+ // QA round 2 (2026-10-06): the loop's name was saved as text in the language it was made in, so+ // a loop made in English still read "Rotation" after switching to Arabic.+ it('is called Rotation in the language on screen, whatever an older save kept as its name', async () => {+ const rot = { id: 'rot', sequence: ['d1', 'd2'], label: 'Rotation' }+ try {+ await setLang('ar')+ setS({ rotation: rot, scheduleMode: 'rotation', queue: queue({ ids: ['d1', 'd2'], label: 'Rotation', rotationId: 'rot' }) })+ mount()+ expect(host.querySelector('.queue .row .small').textContent).toBe('التناوب')+ setS({ rotation: { ...rot, label: '' }, scheduleMode: 'rotation', queue: queue({ ids: ['d1', 'd2'], label: '', rotationId: 'rot' }) })+ mount()+ expect(host.querySelector('.queue .row .small').textContent).toBe('التناوب')+ } finally { await act(() => setLang('en')) }+ // A coach's week keeps the name its planner gave it.+ setS()+ mount()+ expect(host.querySelector('.queue .row .small').textContent).toBe('US W1')+ })+})diff --git a/frontend/src/views/Plan.jsx b/frontend/src/views/Plan.jsxindex 3c727e3d1..8ad1577a2 100644--- a/frontend/src/views/Plan.jsx+++ b/frontend/src/views/Plan.jsx@@ -177,7 +177,9 @@ function Schedule({ S, update, nav, mode }) {`startsOn` carry over, so progress already logged survives a reorder. */const liveQ = queueOf(S)const seq = liveQ?.ids ?? rotationIds(S)- const seqLabel = liveQ?.label || S.rotation?.label || t('Rotation')+ // A loop the app makes has no name of its own: Home shows it as 'Rotation' in the language on+ // screen. Stored as text, it stayed in the language it was made in (QA 2026-10-06).+ const seqLabel = liveQ?.label || S.rotation?.label || ''// Ownership, not presence: a planner's queue has no rotationId, or one that does not match the// saved rotation here — that's what makes it someone else's to write, not this app's.const managed = !!liveQ && !!S.rotation && liveQ.rotationId === S.rotation.id@@ -233,7 +235,7 @@ function Schedule({ S, update, nav, mode }) {message: t('Your coach gives up control of this week: openGym owns the queue from here on and repeats these sessions by itself once they are all done. A new week from the coach’s app would replace this rotation.')+ (replacesOwn ? ' ' + t('Your own loop gets replaced.') : ''),confirmText: t('Use this rotation'),- onConfirm: () => update(s => saveRotation(s, seq, t('Rotation'))),+ onConfirm: () => update(s => saveRotation(s, seq, '')),})const ws = weekStartOf(S)diff --git a/frontend/src/views/Plan.rotation.test.jsx b/frontend/src/views/Plan.rotation.test.jsxindex 0cfca17e1..c505f07ce 100644--- a/frontend/src/views/Plan.rotation.test.jsx+++ b/frontend/src/views/Plan.rotation.test.jsx@@ -221,6 +221,15 @@ describe('Plan — the loop', () => {expect(mocks.S.queue.ids).toEqual(['b'])})+ it('a loop built here saves no name of its own, so it follows the language on screen', () => {+ mount({ scheduleMode: 'rotation' })+ click(byLabel('Add routine to the rotation'))+ act(() => menuSheet.mock.calls.at(-1)[0].items.find(i => i.label === 'A').onClick())+ expect(mocks.S.rotation.sequence).toEqual(['a'])+ expect(mocks.S.rotation.label).toBe('')+ expect(mocks.S.queue.label).toBe('')+ })+it('Start the loop over rewinds the current round, strictly from now', () => {mount({queue: live({ since: Date.now() - 5 * 86400000, startsOn: '2026-09-01', rotationId: 'r1' }),@@ -264,10 +273,11 @@ describe('Plan — someone else’s queue, and a broken one', () => {act(() => confirmSheet.mock.calls.at(-1)[0].onConfirm())expect(mocks.S.rotation.sequence).toEqual(['a', 'b'])expect(mocks.S.queue.rotationId).toBe(mocks.S.rotation.id)- // Adopting takes a name of its own rather than the planner's ("My split") — refillAfter would- // otherwise repeat that name on every pass this app generates on its own from here on.- expect(mocks.S.rotation.label).toBe('Rotation')- expect(mocks.S.queue.label).toBe('Rotation')+ // Adopting drops the planner's name ("My split"): refillAfter would otherwise repeat it on+ // every pass this app generates on its own. It saves no name at all, so Home shows the word+ // in whatever language is on screen (QA 2026-10-06: a saved 'Rotation' stayed English).+ expect(mocks.S.rotation.label).toBe('')+ expect(mocks.S.queue.label).toBe('')remount()expect(host.textContent).not.toContain('Externally managed')expect(selectedMode()).toBe('Rotation')