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 -1
View File
@@ -155,7 +155,9 @@ export default function Home() {
</div>
)}
<div className="chart" style={{ marginTop: 8 }}><LineChart points={bwPoints} h={130} unit={S.unit} goal={S.targetW} /></div>
</> : <div className="muted small">{t("No entries yet — log your weight to start the curve. It's also asked before every workout.")}</div>}
</> : <div className="muted small">{S.weighIn === false
? t('No entries yet — log your weight to start the curve.')
: t("No entries yet — log your weight to start the curve. It's also asked before every workout.")}</div>}
</div>
<div className="card tappable" style={{ cursor: 'pointer' }} {...tappable(() => calendarSheet())}>
+6
View File
@@ -260,6 +260,12 @@ export default function Settings() {
{/* ---------- during a workout ---------- */}
<Section title={t('During a workout')} footer={wakeOK ? t('The screen stays on while a workout is running, so you don’t have to unlock your phone between sets.') : null}>
{/* The quick weigh-in that opens on Start (sheets.jsx startFlow, issue #137); off skips straight
to the session. Home and Stats still log weight by hand. */}
<Row icon="scale" iconTint="var(--green)" title={t('Weigh in before workouts')}
subtitle={t('Asks for your body weight when a workout starts. Off starts the session straight away.')}>
<Switch checked={S.weighIn !== false} onChange={v => update(s => { s.weighIn = v })} />
</Row>
{/* One exercise at a time (cards with Prev/Next), the whole session stacked as a
scrollable list, or that list stripped to just names and set rows (compact).
Legacy/unknown values read as cards. The running session can override this from