feat(settings): a switch to skip the weigh-in when a workout starts (#137)

Settings → During a workout → "Weigh in before workouts", on by default. Off, tapping Start
begins the session straight away with no body weight on it — what "Start without weighing
in" did, without the sheet. Home and Stats still log weight by hand, and the Home
body-weight footer stops promising "it's also asked before every workout" while it is off.

S.weighIn (DEF true, read as `!== false` so older profiles keep asking, same as checkIn).
startFlow is the single entry point for every Start button, so the check lives there;
"log a past workout" never asked and is unchanged. Three new strings in all 14 locales,
pt-BR as explicit overrides (inherited set and fingerprint unchanged). Test:
sheets.weighin.test.jsx — on / legacy profile / off, through the real store and sheet stack.

Closes #137.
This commit is contained in:
Boris Kurktchiev committed 2026-09-12 08:12:00 -04:00
1 parent 35c810a663
commit ebe00a1122
20 files changed
+101 -2

No files matched your search

+3
View File
@@ -1730,6 +1730,9 @@ export function WorkoutRow({ w, onClick }) {
// `routineIds` accepts `string | string[] | null` — `[r.id]` for one routine,
// `effectiveRoutineIds(...)` for today's planned session, `[]` / null for explicit freestyle.
export function startFlow(routineIds) {
// The weigh-in is a setting (Settings → During a workout, issue #137): off goes straight
// into the session with no body weight on it, same as "Start without weighing in".
if (S().weighIn === false) { beginWorkout(routineIds, null); return }
bwSheet({ required: true, onDone: bw => beginWorkout(routineIds, bw) })
}
export function beginWorkout(routineIds, bw) {