Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Tabs: the note about a workout that came along with a sign-in shows only where the workout is, and says to keep going there

Duarte Santosc0e1801385ba
diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.js
index a56874516..b92f6745e 100644
--- a/frontend/src/locales/ar.js
+++ b/frontend/src/locales/ar.js
@@ -2002,5 +2002,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'تظهر الألوان الرمادية أفتح في الوضع الداكن، حتى لا تبدو الأزرار مُعطّلة.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'تظهر الألوان الرمادية أغمق في الوضع الفاتح، حتى لا تبدو الأزرار مُعطّلة.',
'custom color picker': 'لون خاص مخصص منتقي الألوان',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'تم تسجيل الدخول من علامة تبويب أخرى. انتقل تمرينك معه، تابعه هناك.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'تم تسجيل الدخول من علامة تبويب أخرى. تمرينك انتقل معك، تابعه هنا.',
}
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 88f967104..7fdb20e04 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1969,5 +1969,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Grautöne werden im dunklen Modus heller, damit Buttons nicht ausgeschaltet wirken.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Grautöne werden im hellen Modus dunkler, damit Buttons nicht ausgeschaltet wirken.',
'custom color picker': 'eigene Farbe benutzerdefiniert Farbwähler Farbauswahl',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'In einem anderen Tab angemeldet. Dein Training ist mitgekommen, mach dort weiter.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'In einem anderen Tab angemeldet. Dein Training ist mitgekommen, mach hier weiter.',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index a908dd7c9..592a333e1 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Los grises se ven más claros en modo oscuro, para que los botones no parezcan apagados.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Los grises se ven más oscuros en modo claro, para que los botones no parezcan apagados.',
'custom color picker': 'color propio personalizado selector de color',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Sesión iniciada en otra pestaña. Tu entreno se fue con ella, sigue allí.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Sesión iniciada en otra pestaña. Tu entreno vino contigo, sigue aquí.',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 2da696b31..a6c2a3d84 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Les gris s’éclaircissent en mode sombre, pour que les boutons n’aient pas l’air éteints.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Les gris foncent en mode clair, pour que les boutons n’aient pas l’air éteints.',
'custom color picker': 'couleur perso personnalisée sélecteur nuancier',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Connecté depuis un autre onglet. Ta séance a suivi, reprends-la là-bas.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Connecté depuis un autre onglet. Ta séance a suivi, continue ici.',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 4076dfd0a..8c05a4933 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'डार्क मोड में ग्रे रंग हल्के दिखते हैं, ताकि बटन बंद जैसे न लगें।',
'Greys show darker in light mode, so buttons don’t look switched off.': 'लाइट मोड में ग्रे रंग गहरे दिखते हैं, ताकि बटन बंद जैसे न लगें।',
'custom color picker': 'अपना रंग कस्टम रंग चुनने वाला',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'दूसरे टैब से साइन इन हुआ। आपका वर्कआउट साथ चला गया, वहीं जारी रखें।',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'दूसरे टैब से साइन इन हुआ। आपका वर्कआउट साथ आ गया, यहीं जारी रखें।',
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index a90c2b1b4..3b8a3698f 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1952,5 +1952,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'A szürkék sötét módban világosabbak, hogy a gombok ne tűnjenek kikapcsoltnak.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'A szürkék világos módban sötétebbek, hogy a gombok ne tűnjenek kikapcsoltnak.',
'custom color picker': 'saját szín egyéni színválasztó',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Bejelentkeztél egy másik lapon. Az edzésed is átment, ott folytasd.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Bejelentkeztél egy másik lapon. Az edzésed is jött vele, folytasd itt.',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index feb259512..81f392217 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'I grigi diventano più chiari in modalità scura, così i pulsanti non sembrano spenti.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'I grigi diventano più scuri in modalità chiara, così i pulsanti non sembrano spenti.',
'custom color picker': 'colore personalizzato proprio selettore colore',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Accesso fatto da un’altra scheda. Il tuo allenamento è andato con lei, riprendilo lì.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Accesso fatto da un’altra scheda. Il tuo allenamento è venuto con te, continua qui.',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index eb3b1c369..fc4f356c8 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': '다크 모드에서는 버튼이 꺼진 것처럼 보이지 않게 회색을 밝게 표시해요.',
'Greys show darker in light mode, so buttons don’t look switched off.': '라이트 모드에서는 버튼이 꺼진 것처럼 보이지 않게 회색을 어둡게 표시해요.',
'custom color picker': '나만의 색상 사용자 지정 색상 선택기',
- 'Signed in from another tab. Your workout came along, pick it up there.': '다른 탭에서 로그인했어요. 운동도 함께 넘어갔으니 거기서 이어서 하세요.',
+ 'Signed in from another tab. Your workout came along, keep going here.': '다른 탭에서 로그인했어요. 운동도 함께 넘어왔으니 여기서 이어서 하세요.',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index fd0ddf908..92579d18f 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Szarości są jaśniejsze w trybie ciemnym, żeby przyciski nie wyglądały na wyłączone.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Szarości są ciemniejsze w trybie jasnym, żeby przyciski nie wyglądały na wyłączone.',
'custom color picker': 'własny kolor niestandardowy próbnik wybór koloru',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Zalogowano w innej karcie. Twój trening poszedł razem z nią, kontynuuj tam.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Zalogowano w innej karcie. Twój trening przeszedł razem z kontem, kontynuuj tutaj.',
}
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index a3645ce9c..c2c52d5f7 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -1211,7 +1211,7 @@ export const PT_BR_OVERRIDES = {
'A touch darker in light mode, so you can still read it.': 'Um pouco mais escura no modo claro, para você continuar lendo.',
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Os cinzas ficam mais claros no modo escuro, para os botões não parecerem desligados.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Os cinzas ficam mais escuros no modo claro, para os botões não parecerem desligados.',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Login feito em outra aba. Seu treino foi junto, continue por lá.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Login feito em outra aba. Seu treino veio junto, continue por aqui.',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index 47dd631cd..ad06595ac 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Os cinzentos ficam mais claros no modo escuro, para os botões não parecerem desligados.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Os cinzentos ficam mais escuros no modo claro, para os botões não parecerem desligados.',
'custom color picker': 'cor própria personalizada seletor de cor',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Sessão iniciada noutro separador. O teu treino foi junto, continua-o lá.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Sessão iniciada noutro separador. O teu treino veio junto, continua aqui.',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index 310bad2c7..576e5cbe6 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1953,5 +1953,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Серые оттенки в тёмной теме светлее, чтобы кнопки не казались выключенными.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Серые оттенки в светлой теме темнее, чтобы кнопки не казались выключенными.',
'custom color picker': 'свой цвет пользовательский палитра выбор цвета',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Вход выполнен в другой вкладке. Тренировка перешла туда, продолжай там.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Вход выполнен в другой вкладке. Тренировка сохранилась, продолжай здесь.',
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index 5d3c1939d..1031f9448 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1960,5 +1960,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'สีเทาจะสว่างขึ้นในโหมดมืด ปุ่มจะได้ไม่ดูเหมือนถูกปิดอยู่',
'Greys show darker in light mode, so buttons don’t look switched off.': 'สีเทาจะเข้มขึ้นในโหมดสว่าง ปุ่มจะได้ไม่ดูเหมือนถูกปิดอยู่',
'custom color picker': 'สีเอง กำหนดเอง ตัวเลือกสี',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'ลงชื่อเข้าใช้จากแท็บอื่นแล้ว การออกกำลังกายของคุณย้ายไปด้วย ไปทำต่อที่นั่นได้เลย',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'ลงชื่อเข้าใช้จากแท็บอื่นแล้ว การออกกำลังกายของคุณมาด้วย ทำต่อที่นี่ได้เลย',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 2d45c7376..d6fa067cf 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Griler karanlık modda daha açık görünür, düğmeler kapalıymış gibi durmasın diye.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Griler aydınlık modda daha koyu görünür, düğmeler kapalıymış gibi durmasın diye.',
'custom color picker': 'kendi renk özel renk seçici',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Başka bir sekmede giriş yapıldı. Antrenmanın da oraya geçti, oradan devam et.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Başka bir sekmede giriş yapıldı. Antrenmanın da geldi, buradan devam et.',
}
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index fedb4aa30..a4a775ede 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -1946,5 +1946,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Сірі відтінки в темній темі світліші, щоб кнопки не здавалися вимкненими.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Сірі відтінки у світлій темі темніші, щоб кнопки не здавалися вимкненими.',
'custom color picker': 'свій колір власний палітра вибір кольору',
- 'Signed in from another tab. Your workout came along, pick it up there.': 'Вхід виконано в іншій вкладці. Тренування перейшло туди, продовжуй там.',
+ 'Signed in from another tab. Your workout came along, keep going here.': 'Вхід виконано в іншій вкладці. Тренування збережено, продовжуй тут.',
}
diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.js
index 79782b1ac..0ab17d0bf 100644
--- a/frontend/src/locales/zh-TW.js
+++ b/frontend/src/locales/zh-TW.js
@@ -1942,5 +1942,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': '深色模式下灰色會調亮一些,免得按鈕看起來像被停用了。',
'Greys show darker in light mode, so buttons don’t look switched off.': '淺色模式下灰色會調暗一些,免得按鈕看起來像被停用了。',
'custom color picker': '自訂顏色 自己的顏色 取色器 調色盤',
- 'Signed in from another tab. Your workout came along, pick it up there.': '已在另一個分頁登入。你的訓練也一起過去了,在那裡繼續吧。',
+ 'Signed in from another tab. Your workout came along, keep going here.': '已在另一個分頁登入。你的訓練也一起帶過去了,在這裡繼續吧。',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index b5ea37cae..07765586e 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1949,5 +1949,5 @@ export default {
'Greys show lighter in dark mode, so buttons don’t look switched off.': '深色模式下灰色会调亮一些,免得按钮看起来像被停用了。',
'Greys show darker in light mode, so buttons don’t look switched off.': '浅色模式下灰色会调暗一些,免得按钮看起来像被停用了。',
'custom color picker': '自定义颜色 自己的颜色 取色器 调色板',
- 'Signed in from another tab. Your workout came along, pick it up there.': '已在另一个标签页登录。你的训练也一起过去了,在那里继续吧。',
+ 'Signed in from another tab. Your workout came along, keep going here.': '已在另一个标签页登录。你的训练也一起带过去了,在这里继续吧。',
}
diff --git a/frontend/src/store/useStore.js b/frontend/src/store/useStore.js
index 06d60ac6c..96842677b 100644
--- a/frontend/src/store/useStore.js
+++ b/frontend/src/store/useStore.js
@@ -769,10 +769,11 @@ export const useStore = create((set, get) => {
pushTm = null
// A guest's workout running here went along with the sign-in in the other tab (it joined this
// browser's saved copy first, setUser), and this tab shows it again once that tab is done
- // (followSignIn). Said, so a workout that leaves the screen mid-set is not taken for lost.
- if (!seenOwner && owner && get().S.active) {
+ // (followSignIn). Said, so a workout that leaves the screen mid-set is not taken for lost; only
+ // where the workout is on screen (a tab on Stats never showed it), and it goes on right here.
+ if (!seenOwner && owner && get().S.active && /^#\/workout(?:[/?]|$)/.test(location.hash || '')) {
import('./useUI.js')
- .then(({ useUI }) => useUI.getState().toast(t('Signed in from another tab. Your workout came along, pick it up there.')))
+ .then(({ useUI }) => useUI.getState().toast(t('Signed in from another tab. Your workout came along, keep going here.')))
.catch(() => {})
}
const S = restartedState(get().S)
diff --git a/frontend/src/store/useStore.tabs-owner.test.jsx b/frontend/src/store/useStore.tabs-owner.test.jsx
index 91859273d..69034bbe5 100644
--- a/frontend/src/store/useStore.tabs-owner.test.jsx
+++ b/frontend/src/store/useStore.tabs-owner.test.jsx
@@ -216,6 +216,10 @@ describe('a second tab while the first one changes owner', () => {
describe('a guest tab while the other tab signs in or creates a profile', () => {
const running = () => ({ id: 'act1', start: Date.now() - 600000, entries: [{ id: 'bench', sets: [{ w: 60, r: 5, done: true }] }] })
const guestCopy = active => ({ ...clone(DEF), _ts: Date.now(), workouts: [w('gW1', '2026-09-04')], active })
+ // The tab shows the workout (HashRouter). RC verify 2026-10-07: the toast also came up in a tab
+ // on another screen that never showed it, and told the workout tab to go elsewhere.
+ beforeEach(() => { location.hash = '#/workout' })
+ afterEach(() => { location.hash = '' })
it('a profile created in the other tab shows in the guest tab at once, and the workout with it', async () => {
DEF = (await import('./useStore.js')).DEF
@@ -231,7 +235,7 @@ describe('a guest tab while the other tab signs in or creates a profile', () =>
expect(ids(B.getState().S)).toEqual(['gW1']) // not blank
expect(B.getState().S.active?.id).toBe('act1')
await new Promise(r => setTimeout(r, 0)) // the toast comes through a lazy import
- expect(h.toasts.some(m => /another tab/.test(m))).toBe(true)
+ expect(h.toasts).toContain('Signed in from another tab. Your workout came along, keep going here.')
await act(A, () => A.getState().pushState())
expect(ids(srv.doc)).toEqual(['gW1'])
// B follows the sign-in once the copy is the account's and in step with the server.
@@ -249,7 +253,7 @@ describe('a guest tab while the other tab signs in or creates a profile', () =>
h.toasts = []
await act(A, () => A.getState().setUser({ id: OWNER, name: 'Xavi' }, { adopt: true }))
await new Promise(r => setTimeout(r, 0)) // the toast comes through a lazy import
- expect(h.toasts.some(m => /another tab/.test(m))).toBe(true)
+ expect(h.toasts).toContain('Signed in from another tab. Your workout came along, keep going here.')
expect(B.getState().user).toBe(null) // nothing taken while the question is open
await act(A, () => A.getState().adoptProfile(async () => false)) // "Keep profile as is"
expect(ids(srv.doc)).toEqual(['x1', 'x2', 'x3'])
@@ -259,6 +263,21 @@ describe('a guest tab while the other tab signs in or creates a profile', () =>
expect(B.getState().user?.id).toBe(OWNER)
})
+ it('a guest tab on another screen is not told about a workout it does not show', async () => {
+ DEF = (await import('./useStore.js')).DEF
+ server(null)
+ localStorage.setItem('gym_state_v1', JSON.stringify(guestCopy(running())))
+ localStorage.setItem('gym_guest', '1')
+ location.hash = '#/stats'
+ const A = await openTab(null)
+ const B = await openTab(null)
+ h.toasts = []
+ await act(A, () => A.getState().setUser({ id: OWNER, name: 'Nova' }))
+ await new Promise(r => setTimeout(r, 0))
+ expect(h.toasts.some(m => /another tab/.test(m))).toBe(false)
+ expect(B.getState().S.active?.id).toBe('act1')
+ })
+
it('a new profile with nothing in it: the other tab takes it without waiting for a save', async () => {
DEF = (await import('./useStore.js')).DEF
server(null)