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
feat(watch): Settings → Apple Watch says when the phone last heard from the watch (TestFlight)
Duarte Santos6204387dd2c0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2eb4f9ccc..eeff08a82 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -27,7 +27,9 @@ per muscle. Settings → Workout → Fine-tuning turns it off.- **Apple Watch keeps up.** The watch could miss the phone right after launch and then hearnothing until you reopened the app, a freshly installed watch app could wait for your next change- before it got your routines, and one odd routine could hide all of them. All fixed.+ before it got your routines, and one odd routine could hide all of them. All fixed. Until the+ phone has sent anything the watch now says "Not synced yet" and what to do about it, and+ Settings → Apple Watch on the phone tells you when it last heard from the watch.- **Faster on long histories.** Home and Stats do far less work per open (Stats about a thirdless on 800 workouts), the main script a start parses is a quarter smaller, the installed web app stops askingthe server about every file on each launch, and other languages load their words in one godiff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.jsindex 22d23b574..add556c9c 100644--- a/frontend/src/locales/ar.js+++ b/frontend/src/locales/ar.js@@ -2337,6 +2337,8 @@ export default {'No Apple Watch paired with this iPhone': 'لا توجد Apple Watch مقترنة بهذا الـ iPhone','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym ليس على Apple Watch بعد. ثبّته من تطبيق Watch.','openGym is on your Apple Watch': 'openGym موجود على Apple Watch',+ 'Last heard from the watch: {0}': 'آخر اتصال من الساعة: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'لم تتصل الساعة بعد. افتح openGym عليها مرة واحدة.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'غير مسموح على الساعة. اسمح به من تطبيق صحتي على iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'النبض أثناء التمرين وبجانب كل مجموعة، والتمرين محفوظ في صحتي. تسأل الساعة مرة واحدة.','Apple Health': 'Apple صحتي',diff --git a/frontend/src/locales/bn.js b/frontend/src/locales/bn.jsindex 6dc992150..6d407e64d 100644--- a/frontend/src/locales/bn.js+++ b/frontend/src/locales/bn.js@@ -2361,6 +2361,8 @@ export default {'No Apple Watch paired with this iPhone': 'এই iPhone-এর সাথে কোনো Apple Watch যুক্ত নেই','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym এখনও আপনার Apple Watch-এ নেই। Watch অ্যাপ থেকে ইনস্টল করুন।','openGym is on your Apple Watch': 'openGym আপনার Apple Watch-এ আছে',+ 'Last heard from the watch: {0}': 'ঘড়ি থেকে শেষ সাড়া: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'ঘড়ি এখনো সাড়া দেয়নি। ঘড়িতে openGym একবার খুলুন।','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'ঘড়িতে অনুমতি নেই। iPhone-এর Health অ্যাপে অনুমতি দিন।','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'ওয়ার্কআউটের সময় আর প্রতিটি সেটের পাশে হার্ট রেট, আর ওয়ার্কআউট Apple Health-এ সেভ। ঘড়ি একবার জিজ্ঞেস করে।','Apple Health': 'Apple Health',diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.jsindex 0fda33680..813606f35 100644--- a/frontend/src/locales/de.js+++ b/frontend/src/locales/de.js@@ -2302,6 +2302,8 @@ export default {'No Apple Watch paired with this iPhone': 'Keine Apple Watch mit diesem iPhone gekoppelt','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym ist noch nicht auf deiner Apple Watch. Installiere es in der Watch-App.','openGym is on your Apple Watch': 'openGym ist auf deiner Apple Watch',+ 'Last heard from the watch: {0}': 'Zuletzt von der Watch gehört: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'Die Watch hat sich noch nicht gemeldet. Öffne openGym einmal darauf.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Auf der Watch nicht erlaubt. Erlaube es in der Health-App auf deinem iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Puls während des Trainings und neben jedem Satz, und das Training in Apple Health gespeichert. Die Watch fragt einmal.','Apple Health': 'Apple Health',diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.jsindex de66ef21a..7a7deacdd 100644--- a/frontend/src/locales/es.js+++ b/frontend/src/locales/es.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'Ningún Apple Watch enlazado con este iPhone','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym aún no está en tu Apple Watch. Instálalo desde la app Watch.','openGym is on your Apple Watch': 'openGym está en tu Apple Watch',+ 'Last heard from the watch: {0}': 'Última noticia del reloj: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'El reloj aún no ha dado señales. Abre openGym en él una vez.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'No permitido en el reloj. Permítelo en la app Salud de tu iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'El pulso durante el entreno y junto a cada serie, y el entreno guardado en Salud. El reloj pregunta una vez.','Apple Health': 'Apple Salud',diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.jsindex 1f06a9de0..bcb005eed 100644--- a/frontend/src/locales/fr.js+++ b/frontend/src/locales/fr.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'Aucune Apple Watch jumelée à cet iPhone','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym n’est pas encore sur ton Apple Watch. Installe-le dans l’app Watch.','openGym is on your Apple Watch': 'openGym est sur ton Apple Watch',+ 'Last heard from the watch: {0}': 'Dernières nouvelles de la montre : {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'La montre ne s’est pas encore manifestée. Ouvre openGym dessus une fois.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Non autorisé sur la montre. Autorise-le dans l’app Santé de ton iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Le pouls pendant la séance et à côté de chaque série, et la séance enregistrée dans Santé. La montre demande une fois.','Apple Health': 'Apple Santé',diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.jsindex 2738cb47c..e7a413fc5 100644--- a/frontend/src/locales/hi.js+++ b/frontend/src/locales/hi.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'इस iPhone से कोई Apple Watch जुड़ी नहीं है','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym अभी आपकी Apple Watch पर नहीं है। Watch ऐप से इंस्टॉल करें।','openGym is on your Apple Watch': 'openGym आपकी Apple Watch पर है',+ 'Last heard from the watch: {0}': 'घड़ी से आख़िरी संपर्क: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'घड़ी ने अभी तक संपर्क नहीं किया। उस पर openGym एक बार खोलें।','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'वॉच पर अनुमति नहीं है। iPhone के Health ऐप में अनुमति दें।','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'वर्कआउट के दौरान और हर सेट के साथ धड़कन, और वर्कआउट Apple Health में सेव। वॉच एक बार पूछती है।','Apple Health': 'Apple Health',diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.jsindex e70dd0b6c..88f9e9c07 100644--- a/frontend/src/locales/hu.js+++ b/frontend/src/locales/hu.js@@ -2285,6 +2285,8 @@ export default {'No Apple Watch paired with this iPhone': 'Nincs Apple Watch párosítva ezzel az iPhone-nal','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'Az openGym még nincs az Apple Watchodon. Telepítsd a Watch appban.','openGym is on your Apple Watch': 'Az openGym rajta van az Apple Watchodon',+ 'Last heard from the watch: {0}': 'Utoljára jelentkezett az óra: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'Az óra még nem jelentkezett. Nyisd meg rajta egyszer az openGymet.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Nincs engedélyezve az órán. Engedélyezd az iPhone Egészség appjában.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Pulzus edzés közben és minden sorozat mellett, az edzés az Egészség appba mentve. Az óra egyszer kérdez.','Apple Health': 'Apple Egészség',diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.jsindex b7a787604..b274b09f8 100644--- a/frontend/src/locales/it.js+++ b/frontend/src/locales/it.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'Nessun Apple Watch abbinato a questo iPhone','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym non è ancora sul tuo Apple Watch. Installalo dall’app Watch.','openGym is on your Apple Watch': 'openGym è sul tuo Apple Watch',+ 'Last heard from the watch: {0}': 'Ultime notizie dall’orologio: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'L’orologio non si è ancora fatto sentire. Apri openGym lì una volta.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Non consentito sull’orologio. Consentilo nell’app Salute dell’iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Il battito durante l’allenamento e accanto a ogni serie, e l’allenamento salvato in Salute. L’orologio chiede una volta.','Apple Health': 'Apple Salute',diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.jsindex d580347aa..f11668704 100644--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': '이 iPhone과 페어링된 Apple Watch가 없어요','openGym is not on your Apple Watch yet. Install it in the Watch app.': '아직 Apple Watch에 openGym이 없어요. Watch 앱에서 설치하세요.','openGym is on your Apple Watch': 'Apple Watch에 openGym이 있어요',+ 'Last heard from the watch: {0}': '워치와 마지막 연결: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': '워치가 아직 연결되지 않았어요. 워치에서 openGym을 한 번 열어 주세요.','Not allowed on the watch. Allow it in the Health app on your iPhone.': '워치에서 허용되지 않았어요. iPhone의 건강 앱에서 허용하세요.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': '운동 중과 각 세트 옆의 심박수, 그리고 건강 앱에 저장되는 운동. 워치가 한 번 물어봐요.','Apple Health': 'Apple 건강',diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.jsindex 27d7262b2..ae92b0424 100644--- a/frontend/src/locales/pl.js+++ b/frontend/src/locales/pl.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'Brak Apple Watch sparowanego z tym iPhone’em','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym nie ma jeszcze na Twoim Apple Watch. Zainstaluj go w aplikacji Watch.','openGym is on your Apple Watch': 'openGym jest na Twoim Apple Watch',+ 'Last heard from the watch: {0}': 'Ostatni kontakt z zegarkiem: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'Zegarek jeszcze się nie odezwał. Otwórz na nim openGym raz.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Brak zgody na zegarku. Zezwól w aplikacji Zdrowie na iPhonie.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Tętno podczas treningu i przy każdej serii, a trening zapisany w Zdrowiu. Zegarek zapyta raz.','Apple Health': 'Apple Zdrowie',diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.jsindex 03bf3ab57..6ef1e4456 100644--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@ -1455,6 +1455,8 @@ export const PT_BR_OVERRIDES = {'No Apple Watch paired with this iPhone': 'Nenhum Apple Watch pareado com este iPhone','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'O openGym ainda não está no seu Apple Watch. Instale pelo app Watch.','openGym is on your Apple Watch': 'O openGym está no seu Apple Watch',+ 'Last heard from the watch: {0}': 'Último contato do relógio: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'O relógio ainda não deu sinal. Abra o openGym nele uma vez.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Não permitido no relógio. Permita no app Saúde do seu iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'A frequência cardíaca durante o treino e ao lado de cada série, e o treino salvo no Saúde. O relógio pergunta uma vez.','Write to Apple Health': 'Salvar no Apple Saúde',diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.jsindex 96f77b58f..6c60bdd47 100644--- a/frontend/src/locales/pt.js+++ b/frontend/src/locales/pt.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'Nenhum Apple Watch emparelhado com este iPhone','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'O openGym ainda não está no teu Apple Watch. Instala-o na app Watch.','openGym is on your Apple Watch': 'O openGym está no teu Apple Watch',+ 'Last heard from the watch: {0}': 'Último contacto do relógio: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'O relógio ainda não deu sinal. Abre o openGym nele uma vez.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Não permitido no relógio. Permite-o na app Saúde do teu iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'A frequência cardíaca durante o treino e ao lado de cada série, e o treino guardado na Saúde. O relógio pergunta uma vez.','Apple Health': 'Apple Saúde',diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.jsindex 24a256a35..e48173af4 100644--- a/frontend/src/locales/ru.js+++ b/frontend/src/locales/ru.js@@ -2286,6 +2286,8 @@ export default {'No Apple Watch paired with this iPhone': 'К этому iPhone не подключены Apple Watch','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym ещё нет на ваших Apple Watch. Установите его в приложении Watch.','openGym is on your Apple Watch': 'openGym установлен на ваших Apple Watch',+ 'Last heard from the watch: {0}': 'Последняя связь с часами: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'Часы ещё не выходили на связь. Откройте на них openGym один раз.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'На часах не разрешено. Разрешите в приложении «Здоровье» на iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Пульс во время тренировки и рядом с каждым подходом, тренировка сохраняется в «Здоровье». Часы спросят один раз.','Apple Health': 'Apple Здоровье',diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.jsindex 48fadf23b..2665de654 100644--- a/frontend/src/locales/th.js+++ b/frontend/src/locales/th.js@@ -2293,6 +2293,8 @@ export default {'No Apple Watch paired with this iPhone': 'ไม่มี Apple Watch ที่จับคู่กับ iPhone นี้','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'ยังไม่มี openGym บน Apple Watch ติดตั้งได้ในแอป Watch','openGym is on your Apple Watch': 'มี openGym บน Apple Watch แล้ว',+ 'Last heard from the watch: {0}': 'ได้ยินจากนาฬิกาล่าสุด: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'นาฬิกายังไม่ได้ติดต่อมา เปิด openGym บนนาฬิกาสักครั้ง','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'ไม่ได้รับอนุญาตบนนาฬิกา อนุญาตได้ในแอปสุขภาพบน iPhone','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'อัตราการเต้นของหัวใจระหว่างฝึกและข้างแต่ละเซ็ต และบันทึกการฝึกลงในสุขภาพ นาฬิกาจะถามครั้งเดียว','Apple Health': 'Apple Health',diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.jsindex 847b92543..54b355fdf 100644--- a/frontend/src/locales/tr.js+++ b/frontend/src/locales/tr.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': 'Bu iPhone ile eşlenmiş Apple Watch yok','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym henüz Apple Watch’unda değil. Watch uygulamasından yükle.','openGym is on your Apple Watch': 'openGym Apple Watch’unda',+ 'Last heard from the watch: {0}': 'Saatten son haber: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'Saat henüz ses vermedi. openGym’i saatte bir kez aç.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'Saatte izin verilmedi. iPhone’undaki Sağlık uygulamasından izin ver.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Antrenman sırasında ve her setin yanında nabız, antrenman Sağlık’a kaydedilir. Saat bir kez sorar.','Apple Health': 'Apple Sağlık',diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.jsindex 6df36ed07..a3c858606 100644--- a/frontend/src/locales/uk.js+++ b/frontend/src/locales/uk.js@@ -2279,6 +2279,8 @@ export default {'No Apple Watch paired with this iPhone': 'До цього iPhone не під’єднано Apple Watch','openGym is not on your Apple Watch yet. Install it in the Watch app.': 'openGym ще немає на твоєму Apple Watch. Установи його в програмі Watch.','openGym is on your Apple Watch': 'openGym є на твоєму Apple Watch',+ 'Last heard from the watch: {0}': 'Остання звістка від годинника: {0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': 'Годинник ще не озивався. Відкрий на ньому openGym один раз.','Not allowed on the watch. Allow it in the Health app on your iPhone.': 'На годиннику не дозволено. Дозволь у програмі «Здоров’я» на iPhone.','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': 'Пульс під час тренування і біля кожного підходу, тренування зберігається у «Здоров’ї». Годинник спитає один раз.','Apple Health': 'Apple Здоров’я',diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.jsindex 41d37ff8d..ab17ed3b7 100644--- a/frontend/src/locales/zh-TW.js+++ b/frontend/src/locales/zh-TW.js@@ -2275,6 +2275,8 @@ export default {'No Apple Watch paired with this iPhone': '沒有與這台 iPhone 配對的 Apple Watch','openGym is not on your Apple Watch yet. Install it in the Watch app.': '你的 Apple Watch 上還沒有 openGym。請在 Watch App 中安裝。','openGym is on your Apple Watch': 'openGym 已在你的 Apple Watch 上',+ 'Last heard from the watch: {0}': '上次收到手錶消息:{0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': '手錶還沒有聯絡過。請在手錶上打開一次 openGym。','Not allowed on the watch. Allow it in the Health app on your iPhone.': '手錶上未獲允許。請在 iPhone 的「健康」App 中允許。','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': '訓練中及每組旁的心率,以及儲存到「健康」的訓練。手錶只會詢問一次。','Apple Health': 'Apple 健康',diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.jsindex 55a66efb2..0f79be32b 100644--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@ -2282,6 +2282,8 @@ export default {'No Apple Watch paired with this iPhone': '没有与这台 iPhone 配对的 Apple Watch','openGym is not on your Apple Watch yet. Install it in the Watch app.': '你的 Apple Watch 上还没有 openGym。请在 Watch App 中安装。','openGym is on your Apple Watch': 'openGym 已在你的 Apple Watch 上',+ 'Last heard from the watch: {0}': '上次收到手表消息:{0}',+ 'The watch hasn’t checked in yet. Open openGym on it once.': '手表还没有联系过。请在手表上打开一次 openGym。','Not allowed on the watch. Allow it in the Health app on your iPhone.': '手表上未获允许。请在 iPhone 的“健康”App 中允许。','Heart rate during the workout and next to each set, and the workout saved to Apple Health. The watch asks once.': '训练中及每组旁的心率,以及保存到“健康”的训练。手表只会询问一次。','Apple Health': 'Apple 健康',diff --git a/frontend/src/views/WatchSettings.jsx b/frontend/src/views/WatchSettings.jsxindex 3b0b7793c..bf3af8f82 100644--- a/frontend/src/views/WatchSettings.jsx+++ b/frontend/src/views/WatchSettings.jsx@@ -10,6 +10,7 @@ import { Section, Row, Switch, SelectRow } from '../components/ui.jsx'import { readWatchPrefs, writeWatchPrefs, readWatchStatus, onWatchPrefs } from '../lib/watch-settings.js'import { watchStatus } from '../lib/watch-sync.js'import { loadHealth, onHealthChange } from '../lib/health-sync.js'+import { fmtAgo } from '../lib/format.js'export default function WatchSettingsPage() {const nav = useNavigate()@@ -43,7 +44,10 @@ export default function WatchSettingsPage() {const linkLine = !link ? t('Checking…'): !link.paired ? t('No Apple Watch paired with this iPhone'): !link.installed ? t('openGym is not on your Apple Watch yet. Install it in the Watch app.')- : t('openGym is on your Apple Watch')+ // What the watch said last (it checks in each time its app starts): the one sign the two talk.+ : t('openGym is on your Apple Watch') + '. ' + (status?.at+ ? t('Last heard from the watch: {0}', fmtAgo(status.at))+ : t('The watch hasn’t checked in yet. Open openGym on it once.'))const denied = healthOn && status?.health === 'denied'const healthValue = healthOn == null ? '' : denied ? t('Not allowed') : healthOn ? t('On') : t('Off')const healthLine = denied ? t('Not allowed on the watch. Allow it in the Health app on your iPhone.')diff --git a/frontend/src/views/WatchSettings.test.jsx b/frontend/src/views/WatchSettings.test.jsxindex 7ca755767..978903eeb 100644--- a/frontend/src/views/WatchSettings.test.jsx+++ b/frontend/src/views/WatchSettings.test.jsx@@ -51,6 +51,17 @@ describe('Settings → Apple Watch', () => {expect(el.textContent).toContain('Allow it in the Health app on your iPhone.')})+ // TestFlight "the watch is not syncing": the page shows whether the watch app ever checked in+ // (it does each time it starts), so "installed" alone no longer reads as "in touch".+ it('says whether the watch has checked in, and when it last did', async () => {+ let el = await mount()+ expect(el.textContent).toContain('The watch hasn’t checked in yet. Open openGym on it once.')+ writeWatchStatus({ health: 'on', at: Date.now() - 5 * 60e3 })+ el = await mount()+ expect(el.textContent).toContain('Last heard from the watch: 5 minutes ago')+ expect(el.textContent).not.toContain('checked in yet')+ })+it('has the switch for opening on the watch, on to begin with', async () => {const el = await mount()const sw = row(el, 'Open on the watch').querySelector('[role="switch"]')