From 0eb36abfdb8d0a0339e82609cdc39ff8fb3c762a Mon Sep 17 00:00:00 2001 From: Horus Gonzalez Date: Thu, 27 Aug 2026 09:03:02 -0600 Subject: [PATCH] Give the required weigh-in check-in a visible way out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BwSheet opens `locked` when required (starting a workout) — by design, so a stray swipe doesn't skip your check-in. But locked also disables backdrop tap, Escape, and (per Modals.jsx's onPop) the Android back button/gesture, all silently and all identically on iOS and Android. The only way out was two ghost buttons below the weight slider, easy to miss since every other sheet in the app can be dismissed on reflex. Adds a plain X in the header for the required case — close() only, no onDone, no nav, so it's a true no-op: whatever screen was underneath (usually Home, after an accidental tap on "Start") is exactly where you land. The two existing buttons are untouched; they still cover "start anyway, skip the weigh-in" and "actually I want a different workout" as distinct, deliberate choices from a true cancel. No new strings — reuses the existing 'Cancel' key already translated in all locales. --- frontend/src/sheets.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx index 00ad49f..6ca69e0 100644 --- a/frontend/src/sheets.jsx +++ b/frontend/src/sheets.jsx @@ -107,7 +107,18 @@ function BwSheet({ required, onDone, close }) { const recent = [...st.bodyweight].reverse().slice(0, 3) const delEntry = d => update(s => { s.bodyweight = s.bodyweight.filter(b => b.d !== d) }) return <> -

{required ? t('Quick check-in') : t('Log body weight')}

+ {/* This sheet opens `locked` — swipe/backdrop/Escape/Android-back all no-op on it (see + Modals.jsx) so an accidental tap on "Start" can't be walked back by reflex the way + every other sheet in the app can. The two buttons below already cover leaving it + deliberately; this is the same close a normal sheet gets everywhere else, just + opted back in explicitly instead of by omission. Plain close() — no onDone, no + nav — so it's a true no-op: the screen underneath is exactly where you left it. */} + {required + ?
+

{t('Quick check-in')}

+ +
+ :

{t('Log body weight')}

}
{required ? t('Slide or tap to set your weight — tracked before every workout so your curve stays honest.') : t('Today') + ', ' + fmtDate(todayISO(), true)}