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.

i18n cleanup, a rotation with every routine deleted, and copy that overstated what changes

giulioleuci1f21fa2313f8
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 41545481e..32f6a9857 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1709,12 +1709,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Diese Rotation konnte nicht gelesen werden — sie wurde möglicherweise von einem anderen Gerät geschrieben.',
'Discard it': 'Verwerfen',
'Switch to Fixed Week?': 'Zu Feste Woche wechseln?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'Die Rotation stoppt und ihr aktueller Durchgang wird verworfen. Dein Wochenplan kommt genau so zurück, wie er war, und die Reihenfolge bleibt gespeichert, damit du später einen neuen Durchgang starten kannst.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'Die Rotation stoppt und ihr aktueller Durchgang wird verworfen. Dein Wochenplan bleibt unangetastet, und die Reihenfolge bleibt gespeichert, damit du später einen neuen Durchgang starten kannst.',
'Use Fixed Week': 'Feste Woche verwenden',
'No rotation yet — add routines to it in Plan.': 'Noch keine Rotation — füge im Plan Routinen hinzu.',
'Set up in Plan': 'Im Plan einrichten',
'Pass complete': 'Durchgang abgeschlossen',
'Next pass starts {0}': 'Nächster Durchgang beginnt {0}',
-
-
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 25f2e23db..ee0b87079 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'No se pudo leer esta rotación — puede que la haya escrito otro dispositivo.',
'Discard it': 'Descartarla',
'Switch to Fixed Week?': '¿Cambiar a Semana fija?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'La rotación se detiene y su pasada actual se descarta. Tu plan semanal vuelve exactamente como estaba, y la secuencia se guarda para que puedas iniciar una nueva pasada más adelante.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'La rotación se detiene y su pasada actual se descarta. Tu plan semanal no se toca, y la secuencia se guarda para que puedas iniciar una nueva pasada más adelante.',
'Use Fixed Week': 'Usar Semana fija',
'No rotation yet — add routines to it in Plan.': 'Aún no hay rotación — añade rutinas en el Plan.',
'Set up in Plan': 'Configurar en el Plan',
'Pass complete': 'Pasada completada',
'Next pass starts {0}': 'La próxima pasada empieza {0}',
-
-
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 690bee407..2089bfdf1 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Cette rotation n’a pas pu être lue — elle a peut-être été écrite par un autre appareil.',
'Discard it': 'L’abandonner',
'Switch to Fixed Week?': 'Passer à Semaine fixe ?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'La rotation s’arrête et son passage en cours est abandonné. Ton planning hebdomadaire revient exactement comme il était, et la séquence est conservée pour démarrer un nouveau passage plus tard.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'La rotation s’arrête et son passage en cours est abandonné. Ton planning hebdomadaire reste intact, et la séquence est conservée pour démarrer un nouveau passage plus tard.',
'Use Fixed Week': 'Utiliser Semaine fixe',
'No rotation yet — add routines to it in Plan.': 'Aucune rotation pour l’instant — ajoute des routines dans le Plan.',
'Set up in Plan': 'Configurer dans le Plan',
'Pass complete': 'Passage terminé',
'Next pass starts {0}': 'Le prochain passage commence {0}',
-
-
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 59d004e6f..24ae3efd1 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'यह रोटेशन पढ़ा नहीं जा सका — हो सकता है इसे किसी अन्य डिवाइस ने लिखा हो।',
'Discard it': 'इसे हटा दें',
'Switch to Fixed Week?': 'नियत सप्ताह पर स्विच करें?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'रोटेशन रुक जाता है और उसका मौजूदा पास हटा दिया जाता है। आपकी साप्ताहिक योजना बिल्कुल वैसी ही वापस आ जाती है जैसी थी, और क्रम सुरक्षित रहता है ताकि आप बाद में नया पास शुरू कर सकें।',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'रोटेशन रुक जाता है और उसका मौजूदा पास हटा दिया जाता है। आपकी साप्ताहिक योजना अछूती रहती है, और क्रम सुरक्षित रहता है ताकि आप बाद में नया पास शुरू कर सकें।',
'Use Fixed Week': 'नियत सप्ताह का उपयोग करें',
'No rotation yet — add routines to it in Plan.': 'अभी कोई रोटेशन नहीं — योजना में रूटीन जोड़ें।',
'Set up in Plan': 'योजना में सेट करें',
'Pass complete': 'पास पूरा हुआ',
'Next pass starts {0}': 'अगला पास {0} से शुरू होगा',
-
-
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 531f97acd..32fe77484 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1692,12 +1692,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Ezt a rotációt nem sikerült beolvasni — lehet, hogy egy másik eszköz írta.',
'Discard it': 'Elvetése',
'Switch to Fixed Week?': 'Átváltasz Fix hétre?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'A rotáció leáll, és a jelenlegi menete elvész. A heti terved pontosan úgy tér vissza, ahogy volt, a sorrend pedig megmarad, hogy később új menetet indíthass.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'A rotáció leáll, és a jelenlegi menete elvész. A heti terved érintetlen marad, és a sorrend megmarad, hogy később új menetet indíthass.',
'Use Fixed Week': 'Fix hét használata',
'No rotation yet — add routines to it in Plan.': 'Még nincs rotáció — adj hozzá rutinokat a Tervben.',
'Set up in Plan': 'Beállítás a Tervben',
'Pass complete': 'Menet kész',
'Next pass starts {0}': 'A következő menet {0}-kor kezdődik',
-
-
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index e740fd03e..0b73f3c74 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Questa rotazione non può essere letta — potrebbe essere stata scritta da un altro dispositivo.',
'Discard it': 'Scartala',
'Switch to Fixed Week?': 'Passare a Settimana fissa?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'La rotazione si ferma e il giro attuale viene scartato. Il tuo piano settimanale torna esattamente come era, e la sequenza viene mantenuta così puoi avviare un nuovo giro più avanti.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'La rotazione si ferma e il giro attuale viene scartato. Il tuo piano settimanale resta intatto, e la sequenza viene mantenuta così puoi avviare un nuovo giro più avanti.',
'Use Fixed Week': 'Usa Settimana fissa',
'No rotation yet — add routines to it in Plan.': 'Ancora nessuna rotazione — aggiungi routine nel Piano.',
'Set up in Plan': 'Configura nel Piano',
'Pass complete': 'Giro completato',
'Next pass starts {0}': 'Il prossimo giro inizia {0}',
-
-
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index 310edd924..7d4dff014 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': '이 로테이션을 읽을 수 없어요 — 다른 기기에서 작성했을 수 있어요.',
'Discard it': '삭제하기',
'Switch to Fixed Week?': '고정 주간으로 전환할까요?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': '로테이션이 멈추고 현재 패스는 삭제돼요. 주간 계획은 그대로 돌아오고, 순서는 저장되어 나중에 새 패스를 시작할 수 있어요.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': '로테이션이 멈추고 현재 패스는 삭제돼요. 주간 계획은 그대로 유지되고, 순서는 저장되어 나중에 새 패스를 시작할 수 있어요.',
'Use Fixed Week': '고정 주간 사용',
'No rotation yet — add routines to it in Plan.': '아직 로테이션이 없어요 — 계획에서 루틴을 추가하세요.',
'Set up in Plan': '계획에서 설정',
'Pass complete': '패스 완료',
'Next pass starts {0}': '다음 패스는 {0}에 시작해요',
-
-
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 746b7775a..3353885f2 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Nie udało się odczytać tej rotacji — mogła zostać zapisana przez inne urządzenie.',
'Discard it': 'Odrzuć ją',
'Switch to Fixed Week?': 'Przełączyć na Stały tydzień?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'Rotacja zatrzymuje się, a jej bieżące przejście zostaje odrzucone. Twój plan tygodnia wraca dokładnie taki, jaki był, a kolejność zostaje zapisana, aby można było później rozpocząć nowe przejście.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'Rotacja zatrzymuje się, a jej bieżące przejście zostaje odrzucone. Twój plan tygodnia pozostaje nietknięty, a kolejność zostaje zapisana, aby można było później rozpocząć nowe przejście.',
'Use Fixed Week': 'Użyj Stałego tygodnia',
'No rotation yet — add routines to it in Plan.': 'Brak rotacji — dodaj plany w Planie.',
'Set up in Plan': 'Skonfiguruj w Planie',
'Pass complete': 'Przejście ukończone',
'Next pass starts {0}': 'Następne przejście zaczyna się {0}',
-
-
}
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index 125cc1a34..ddd031393 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -1034,7 +1034,7 @@ export const PT_BR_OVERRIDES = {
'This rotation could not be read — it may have been written by another device.': 'Não foi possível ler esta rotação — ela pode ter sido escrita por outro dispositivo.',
'Discard it': 'Descartar',
'Switch to Fixed Week?': 'Mudar para Semana fixa?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'A rotação para e a passagem atual é descartada. Seu plano semanal volta exatamente como estava, e a sequência é salva para que você possa iniciar uma nova passagem mais tarde.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'A rotação para e a passagem atual é descartada. Seu plano semanal fica intocado, e a sequência é salva para que você possa iniciar uma nova passagem mais tarde.',
'Use Fixed Week': 'Usar Semana fixa',
'No rotation yet — add routines to it in Plan.': 'Ainda sem rotação — adicione rotinas no Plano.',
'Set up in Plan': 'Configurar no Plano',
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index e439bb3a5..f7ccf7b35 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Não foi possível ler esta rotação — pode ter sido escrita por outro dispositivo.',
'Discard it': 'Descartá-la',
'Switch to Fixed Week?': 'Mudar para Semana fixa?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'A rotação para e a passagem atual é descartada. O teu plano semanal volta exatamente como estava, e a sequência é guardada para poderes iniciar uma nova passagem mais tarde.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'A rotação para e a passagem atual é descartada. O teu plano semanal fica intocado, e a sequência é guardada para poderes iniciar uma nova passagem mais tarde.',
'Use Fixed Week': 'Usar Semana fixa',
'No rotation yet — add routines to it in Plan.': 'Ainda sem rotação — adiciona rotinas no Plano.',
'Set up in Plan': 'Configurar no Plano',
'Pass complete': 'Passagem concluída',
'Next pass starts {0}': 'A próxima passagem começa a {0}',
-
-
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index edb0f7638..91a35e192 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Не удалось прочитать эту ротацию — возможно, она была записана с другого устройства.',
'Discard it': 'Отменить её',
'Switch to Fixed Week?': 'Переключиться на фиксированную неделю?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'Ротация останавливается, и текущий проход отменяется. Твой недельный план возвращается точно таким, каким был, а последовательность сохраняется, чтобы позже начать новый проход.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'Ротация останавливается, и текущий проход отменяется. Твой недельный план остаётся нетронутым, а последовательность сохраняется, чтобы позже начать новый проход.',
'Use Fixed Week': 'Использовать фиксированную неделю',
'No rotation yet — add routines to it in Plan.': 'Ротации пока нет — добавь программы в разделе «План».',
'Set up in Plan': 'Настроить в Плане',
'Pass complete': 'Проход завершён',
'Next pass starts {0}': 'Следующий проход начнётся {0}',
-
-
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index be73ee584..83c69ea28 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1700,12 +1700,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'อ่านการหมุนเวียนนี้ไม่ได้ — อาจถูกเขียนจากอุปกรณ์อื่น',
'Discard it': 'ทิ้งไป',
'Switch to Fixed Week?': 'เปลี่ยนเป็นสัปดาห์คงที่?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'การหมุนเวียนจะหยุด และรอบปัจจุบันจะถูกยกเลิก แผนรายสัปดาห์ของคุณจะกลับมาเหมือนเดิมทุกประการ และลำดับจะถูกเก็บไว้เพื่อเริ่มรอบใหม่ได้ในภายหลัง',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'การหมุนเวียนจะหยุด และรอบปัจจุบันจะถูกยกเลิก แผนรายสัปดาห์ของคุณจะไม่ถูกแตะต้องเลย และลำดับจะถูกเก็บไว้เพื่อเริ่มรอบใหม่ได้ในภายหลัง',
'Use Fixed Week': 'ใช้สัปดาห์คงที่',
'No rotation yet — add routines to it in Plan.': 'ยังไม่มีการหมุนเวียน — เพิ่มรูทีนได้ในแผน',
'Set up in Plan': 'ตั้งค่าในแผน',
'Pass complete': 'รอบเสร็จสมบูรณ์',
'Next pass starts {0}': 'รอบถัดไปเริ่ม {0}',
-
-
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 282581c2d..38670d8b6 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': 'Bu rotasyon okunamadı — başka bir cihaz tarafından yazılmış olabilir.',
'Discard it': 'Sil',
'Switch to Fixed Week?': 'Sabit Haftaya geçilsin mi?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': 'Rotasyon durur ve mevcut turu silinir. Haftalık planın tam olarak eskisi gibi geri döner ve sıralama daha sonra yeni bir tur başlatabilmen için saklanır.',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'Rotasyon durur ve mevcut turu silinir. Haftalık planın hiç etkilenmez ve sıralama daha sonra yeni bir tur başlatabilmen için saklanır.',
'Use Fixed Week': 'Sabit Haftayı kullan',
'No rotation yet — add routines to it in Plan.': "Henüz rotasyon yok — Plan'da rutin ekle.",
'Set up in Plan': "Plan'da ayarla",
'Pass complete': 'Tur tamamlandı',
'Next pass starts {0}': 'Sıradaki tur {0} tarihinde başlıyor',
-
-
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index df276f25a..527cd46fd 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1689,12 +1689,10 @@ export default {
'This rotation could not be read — it may have been written by another device.': '无法读取此轮换——可能是由另一台设备写入的。',
'Discard it': '丢弃它',
'Switch to Fixed Week?': '切换到固定周?',
- 'The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.': '轮换会停止,当前这一轮会被丢弃。你的每周计划会完全恢复原样,顺序会被保留,方便你以后重新开始新一轮。',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': '轮换会停止,当前这一轮会被丢弃。你的每周计划不会受到影响,顺序会被保留,方便你以后重新开始新一轮。',
'Use Fixed Week': '使用固定周',
'No rotation yet — add routines to it in Plan.': '还没有轮换——在计划中添加训练日。',
'Set up in Plan': '在计划中设置',
'Pass complete': '本轮已完成',
'Next pass starts {0}': '下一轮从 {0} 开始',
-
-
}
diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsx
index 496204207..21e115bf8 100644
--- a/frontend/src/views/Home.jsx
+++ b/frontend/src/views/Home.jsx
@@ -60,9 +60,10 @@ export default function Home() {
// A coach week (S.queue) read through the same tolerant reader QueueRow uses, so a malformed
// queue from another client shows the weekday dots, never an empty card.
const queue = queueView(S, todayISO())
- // Rotation and the weekday strip are mutually exclusive here too, matching Settings/Plan: a
- // live queue, or Rotation chosen with nothing built yet (S.scheduleMode) — in which case there
- // is no queue for QueueRow to render, so an empty-state card takes its place instead.
+ // This card shows one thing or the other — QueueRow for a live queue, or Rotation chosen with
+ // nothing built yet (S.scheduleMode), in which case there is no queue for QueueRow to render and
+ // an empty-state card takes its place — but that is Home's own layout, not a claim that Plan's
+ // weekday grid goes away too: it stays up alongside a live queue there (Plan.jsx, hideGrid).
const rotating = scheduleModeOf(S) === 'rotation'
// A planner-written queue (no rotationId) still names its weekday when it hasn't started yet —
// that copy predates rotation and stays as it is. Our own rotation has no weekday of its own
diff --git a/frontend/src/views/Plan.jsx b/frontend/src/views/Plan.jsx
index e65a69bd9..be8c37546 100644
--- a/frontend/src/views/Plan.jsx
+++ b/frontend/src/views/Plan.jsx
@@ -75,9 +75,12 @@ export default function Plan() {
// way (effectiveRoutineIds, history.js) and feed the same tally (weekTally, queue.js), so hiding
// the grid would hide the very thing that explains a combined count. It is hidden only while
// Rotation is chosen with nothing built yet — there is no queue at that point for it to sit
- // beside, so a plain weekday grid would just be noise.
+ // beside, so a plain weekday grid would just be noise — and never during recovery: a malformed
+ // queue (deleting every routine in the sequence leaves exactly this — S.queue and S.scheduleMode
+ // both still 'rotation' with nothing left for queueOf to resolve) is a fix-up, not a from-scratch
+ // setup, and the grid is the fallback schedule while it's sorted out.
const rotating = scheduleModeOf(S) === 'rotation' || queueRecovery(S)
- const hideGrid = !liveQ && S.scheduleMode === 'rotation'
+ const hideGrid = !liveQ && !queueRecovery(S) && S.scheduleMode === 'rotation'
const setSeq = ids => update(s => {
// Emptying the sequence is how you leave the rotation from here: no pass, no definition, and
// the weekday plan — untouched all along — is the schedule again.
@@ -192,14 +195,16 @@ export default function Plan() {
</div>
})}
</div>
- {/* Two dead ends land here with a saved sequence but no active pass — "Discard it" on a
- malformed queue, and Settings' "Use Fixed Week" (which keeps the sequence on purpose).
- "Build a rotation instead" only ever meant "start one from scratch", so it stays
- hidden once there is already a sequence to resume instead. */}
+ {/* Three dead ends land here with no active pass — "Discard it" on a malformed queue,
+ Settings' "Use Fixed Week" (which keeps the sequence on purpose), and every routine
+ the saved sequence names getting deleted out from under it. "Build a rotation instead"
+ used to stay hidden on `!S.rotation` alone, which a saved-but-now-empty sequence still
+ satisfies (S.rotation itself is untouched) — gated on the ids actually surviving
+ instead, it offers a fresh start exactly when there is nothing left to resume. */}
{!liveQ && seq.length > 0
? <Button size="sm" variant="tinted" icon="shuffle" style={{ marginTop: 8 }}
aria-label={t('Start pass')} onClick={() => update(s => startPass(s))}>{t('Start pass')}</Button>
- : !liveQ && !S.rotation && <Button size="sm" variant="tinted" icon="shuffle" style={{ marginTop: 8 }}
+ : !liveQ && !seq.length && <Button size="sm" variant="tinted" icon="shuffle" style={{ marginTop: 8 }}
aria-label={t('Build a rotation instead')} onClick={() => update(s => { s.scheduleMode = 'rotation' })}>{t('Build a rotation instead')}</Button>}
</>}
</div><div>
diff --git a/frontend/src/views/Plan.rotation.test.jsx b/frontend/src/views/Plan.rotation.test.jsx
index e72093256..65ba8063c 100644
--- a/frontend/src/views/Plan.rotation.test.jsx
+++ b/frontend/src/views/Plan.rotation.test.jsx
@@ -1,7 +1,8 @@
// @vitest-environment happy-dom
// Plan's rotation editor: one row per sequence position, add/remove/move writing straight through
// lib/rotation.js, adoption of an externally written queue, recovery for a malformed one, and the
-// rotation editor and the weekday grid as two mutually exclusive views of the schedule.
+// weekday grid staying up alongside the editor for any live queue — hidden only with Rotation
+// chosen and nothing built yet, or a saved sequence whose routines are all gone.
import React, { act } from 'react'
import { createRoot } from 'react-dom/client'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
@@ -196,4 +197,29 @@ describe('Plan — the rotation editor', () => {
expect(mocks.S.queue.ids).toEqual(['a', 'b'])
expect(mocks.S.queue.rotationId).toBe('r1')
})
+
+ it('every routine in the rotation getting deleted still leaves a way back in, not a locked editor', () => {
+ // Deleting every routine from the Routines list (elsewhere in the app) leaves S.queue and
+ // S.rotation referencing ids that exist nowhere in S.routines any more — queueOf reads that
+ // as no queue at all (queueRecovery), while S.scheduleMode is still 'rotation' from before.
+ mount({
+ routines: [], // every routine gone
+ queue: { ids: ['a', 'b'], since: Date.now() },
+ rotation: { id: 'r1', sequence: ['a', 'b'], label: 'My split' },
+ scheduleMode: 'rotation',
+ })
+ // Recovery no longer hides the grid — this is a fix-up, not the from-scratch setup gap.
+ expect(host.textContent).toContain('This rotation could not be read')
+ expect(host.textContent).toContain('Week schedule')
+ click(byLabel('Discard it'))
+ expect(mocks.S.queue).toBe(null)
+ expect(mocks.S.scheduleMode).toBe('week')
+ // (the mocked store is not reactive, so re-mount to see the discarded state render)
+ mount({ routines: [], scheduleMode: mocks.S.scheduleMode, rotation: { id: 'r1', sequence: ['a', 'b'], label: 'My split' } })
+ expect(host.textContent).toContain('Week schedule')
+ // No routine in the saved sequence survives — "Start pass" would start nothing, so the offer
+ // is a fresh build instead, not gated on `!S.rotation` alone (that object is still there).
+ expect(byLabel('Start pass')).toBeUndefined()
+ expect(byLabel('Build a rotation instead')).toBeDefined()
+ })
})
diff --git a/frontend/src/views/Settings.jsx b/frontend/src/views/Settings.jsx
index 2b5e72f73..148909d91 100644
--- a/frontend/src/views/Settings.jsx
+++ b/frontend/src/views/Settings.jsx
@@ -87,7 +87,7 @@ export default function Settings() {
// is live (below), but the guard stays here too rather than trust the render alone.
confirmSheet({
title: t('Switch to Fixed Week?'),
- message: t('The rotation stops and its current pass is dropped. Your weekday plan comes back exactly as it is, and the sequence is kept so you can start a new pass later.'),
+ message: t('The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.'),
confirmText: t('Use Fixed Week'),
onConfirm: () => update(s => { if (!externalQ) stopPass(s); s.scheduleMode = 'week' }),
})