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.

Merge PR #167: Floating coach week: the week's sessions are a queue (@kurktchiev)

Duarte Santos17ea9093dc17
diff --cc frontend/src/sheets.jsx
index a6d1ddf34,ca44b4d98..dab6a7046
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@@ -1810,11 -1811,16 +1811,16 @@@ function PlanImport({ bundle, close })
/* ============================ day override / assign ============================ */
function DayOverride({ iso, close }) {
const st = useStore(s => s.S)
- const wd = new Date(iso + 'T12:00:00').getDay()
- const weeklyNames = [].concat(st.week[wd] || []).map(id => st.routines.find(r => r.id === id)?.name).filter(Boolean)
const hasOvr = st.dayPlan[iso] !== undefined
+ // A fulfilled pin (a coach session pinned here and since done) reads as no override, as it does
+ // everywhere else — the row to clear the leftover entry stays.
+ const changed = hasOvr && pinState(st, st.dayPlan[iso]) !== 'done'
+ // The plan the day would have without its override — the weekday's routines, and in a coach
+ // week the queue's session for the day in front of them, same as the Home row shows.
+ const { [iso]: _ovr, ...noOvr } = st.dayPlan
+ const weeklyNames = effectiveRoutineIds({ ...st, dayPlan: noOvr }, iso).map(id => st.routines.find(r => r.id === id)?.name).filter(Boolean)
// A weekday can hold several routines; the per-date override stays single-pick, so picking
- // one here collapses a combined day to it (docs/COMBINE_ROUTINES.md §8). The check marks
+ // one here collapses a combined day to it (docs/dev/COMBINE_ROUTINES.md §8). The check marks
// show everything currently planned for the day.
const effIds = effectiveRoutineIds(st, iso)
// A planned day in the past with nothing logged was missed — or trained and never logged,