Commit Graph
510 Commits
Author SHA1 Message Date
Duarte Santos 5bbbffe138 Admin activity log: pairing events read as sentences, not as auth.pair.create / code-invalid (QA C18)
LABELS and REASONS never got the three pair.* events and their two reason codes when the
pairing feature landed. The guard test now reads the event and reason lists off
api/server.js itself instead of a hand-kept copy, so the next new event fails the test
rather than printing a dotted identifier at the operator.
2026-09-19 21:20:00 +02:00
Duarte Santos 8094a5131b Admin: a profile with a null or shapeless workout entry opens instead of blanking the whole app (QA C16)
UserDetail rendered w.name and setsDone(w) on every stored entry, and the sheet host sits
outside the route's ErrorBoundary, so one null took the React tree down — #root empty until
a full reload, and exactly that account could not be disabled from the dashboard. Entries
without a usable session are skipped now; the API no longer accepts new ones, but a file
written before still answers with them.
2026-09-19 21:20:00 +02:00
Duarte Santos 83b2a140d6 Custom exercises: muscles are stored in the map's order, not the order the chips were tapped in 2026-09-17 11:37:56 +02:00
Duarte Santos 0f7e3e1291 Import: body part from an exercise name — the specific word before the broad one (a grip is a modifier, a wrist curl is a forearm exercise, a leg curl and a Romanian deadlift are legs, chest-supported is a row) 2026-09-17 11:37:56 +02:00
Duarte Santos b95561e957 Android: trust user-installed CAs next to the system ones — a self-hosted server behind a private CA could not be reached from the app (#213) 2026-09-17 11:37:56 +02:00
Duarte Santos 113e7ef755 Set rows with an effort column on narrow phones: the same squeeze on a plain row — the list view clipped a two-digit reps number at 368 px (#235) 2026-09-17 11:35:43 +02:00
Duarte Santos 10b9598af4 One-sided rows with an effort column: the reps number is visible again on narrow phones — the stepper buttons had taken the whole cell at 368 px (#235) 2026-09-17 11:34:44 +02:00
Duarte Santos 69fd4a8344 List view opens at the current exercise instead of the top of the session (#224) 2026-09-17 11:32:31 +02:00
Duarte Santos a41b0ca60f Rest-over alert: follow the Push switch — it fired with notifications off, asked for the permission by itself and repeated its title in the body (#239) 2026-09-17 11:31:07 +02:00
Duarte Santos 5007b05504 Merge #207: fix: classify audited Olympic lift families across primary muscles (Space-Hermes) 2026-09-17 11:29:46 +02:00
Duarte Santos a98fb4d791 Merge #210: fix: preserve weight units when sharing and importing plans (Space-Hermes) 2026-09-17 11:29:44 +02:00
Duarte Santos 1849fc8c5f Merge #220: Heatmap: follow the profile's week-start setting (aaron-rai) 2026-09-17 11:29:42 +02:00
Duarte Santos 394f6d545a Merge #206: fix: tolerate minor typos in longer exercise search words (Space-Hermes) 2026-09-17 11:29:40 +02:00
Duarte Santos 5eeec2a52a Merge #184: fix: fetch the manifest with cookies, and tell self-hosters behind an auth proxy what to exempt (iOS Home Screen icon) (kurktchiev) 2026-09-17 11:29:35 +02:00
Aaron Rai 298231a41c Heatmap: follow the profile's week-start setting
The GitHub-style activity heatmap hardcoded Monday-first weeks — both the
column anchoring and the Mon/Wed/Fri row labels — while every other "this
week" surface (Plan, streaks, muscle balance, effort chart) already reads
S.weekStart. Anchor the grid with weekDayOffset() and derive the row labels
from it too, so a Sunday-first profile gets a Sunday-first grid.
2026-09-15 15:44:42 -07:00
Space-Hermes 1a763b3e81 fix: preserve weight units when sharing and importing plans 2026-09-15 06:55:49 +02:00
Space-Hermes 736d743043 test: use the local calendar date for Coach daily cap 2026-09-15 00:19:24 +02:00
Space-Hermes a1b2d31e04 fix: classify audited Olympic lift families across primary muscles 2026-09-15 00:17:11 +02:00
Space-Hermes 8b75ae9b30 fix: tolerate minor typos in longer exercise search words 2026-09-15 00:14:32 +02:00
Boris Kurktchiev 46988c3bfc fix: fetch the manifest with cookies (crossorigin=use-credentials) so the Home Screen icon survives an auth proxy
Browsers request the web app manifest without credentials, even from the same
origin — the spec's default; Safari follows it, Chromium sends cookies anyway.
Behind a login proxy (Authelia, Cloudflare Access, Teleport…) that request gets
the proxy's redirect instead of manifest.json. iOS 26 picks the Home Screen icon
from the manifest ("If you define your icons in the manifest, they're used"), so
Add to Home Screen ends with the generic icon.

crossorigin="use-credentials" is the attribute the spec provides for this; MDN
documents it for exactly this case, Home Assistant and GitLab ship it. No effect
on a deployment without a proxy: same origin, same file.

Verified: `npm run build` keeps the attribute in dist/index.html; frontend suite
109 files / 1613 tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 8b82a5d2571c79c92c08f03f17d16cd0c445d70b)
2026-09-12 19:13:39 -04:00
Duarte Santos d7f0f0dbdb v1.3.7: the Android build builds again (a double dash inside an XML comment in styles.xml broke v1.3.6's APK), plus the iPhone timer-sound fix (#183) 2026-09-12 23:31:21 +02:00
Duarte Santos 33f4758a1c Merge #183: iOS timer sounds — the context resumes before every tone, unlocks from the tap, and a setting plays sounds on silent; #152 (kurktchiev)
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
#	frontend/src/locales/de.js
#	frontend/src/locales/es.js
#	frontend/src/locales/fr.js
#	frontend/src/locales/hi.js
#	frontend/src/locales/hu.js
#	frontend/src/locales/it.js
#	frontend/src/locales/ko.js
#	frontend/src/locales/pl.js
#	frontend/src/locales/pt-BR.js
#	frontend/src/locales/pt.js
#	frontend/src/locales/ru.js
#	frontend/src/locales/th.js
#	frontend/src/locales/tr.js
#	frontend/src/locales/zh.js
2026-09-12 23:29:04 +02:00
Duarte Santos 32111dcad3 v1.3.6: sync you can trust (server revisions, sign-in adopts the profile, polling, offline mode), self-healing push, the phone fixes, the Astra findings, eleven community merges 2026-09-12 23:11:27 +02:00
Duarte Santos 631d01b1b2 After the merges: four combine-routines / custom-exercise strings in all 14 packs, the de-CH number test accepts either Swiss apostrophe (ICU versions differ), changelog for the merged PRs and MRs 2026-09-12 22:58:25 +02:00
Duarte Santos 86f28acb17 Merge !133: per-side data preserved across progression and session flows (ErrorUsernameAlreadyTaken)
# Conflicts:
#	frontend/src/lib/history.js
2026-09-12 22:55:11 +02:00
Duarte Santos f472f37c3d Merge !120: the equipment filter survives a body-part change in the exercise picker, #150 (ErrorUsernameAlreadyTaken) 2026-09-12 22:54:14 +02:00
Duarte Santos f7e69ac6df Merge !118: plan sharing prints as PDF on the mobile app, #149 (HenryByte)
# Conflicts:
#	frontend/ios/App/App.xcodeproj/project.pbxproj
2026-09-12 22:54:14 +02:00
Duarte Santos 7b9c54bc7f Merge #162: custom exercise improvements — equipment, muscle names, cardio target (LuckaPow)
# Conflicts:
#	frontend/src/index.css
2026-09-12 22:53:22 +02:00
Duarte Santos 2240499793 Merge #174: a switch to skip the weigh-in when a workout starts, #137 (kurktchiev)
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
2026-09-12 22:52:39 +02:00
Duarte Santos 6c8bc51d18 Merge #164: a per-exercise rest for warm-up ramp sets, warmupRestSec (kurktchiev) 2026-09-12 22:52:15 +02:00
Duarte Santos e36a1222a1 Merge !125: iOS deployment target 15.5 (thedandano) 2026-09-12 22:52:15 +02:00
Duarte Santos 1977a6427b Merge #117: iOS adopts the UIScene lifecycle for Xcode 26+ / iOS 26+ (shailantani) 2026-09-12 22:52:15 +02:00
Duarte Santos c385025385 Merge #171: de-CH as a derived locale (mkoester) 2026-09-12 22:52:15 +02:00
Duarte Santos b1d79d54c7 Service worker: the shell and the built assets are precached at install and the copy for the cache is cloned before the page reads the response (it was cloned too late and never stored, so an offline reload of the home-screen app failed); the cache is named after the build; starting the app offline raises the offline line at once 2026-09-12 22:20:48 +02:00
Boris Kurktchiev 6e44e2f793 fix(sound): iOS timer sounds — resume before every tone, unlock from the tap, and a "play on silent" setting (#152)
Three things iOS needs that a desktop browser does not, all in lib/sound.js:

1. The ring/silent switch mutes Web Audio: a page whose only audio is Web Audio gets the
   Ambient category, which obeys the switch. The way out is the 'playback' audio-session type
   (iOS 17+), which is exclusive — it pauses whatever else is playing and WebKit never tells that
   app it may resume — so it is a setting, off by default: Settings → Sounds → "Play sounds when
   the phone is on silent" (S.soundOnSilent, applied page-wide by App.jsx). Offered only where it
   means something: a WebKit with navigator.audioSession on a device with a switch.
2. Locking the screen or switching apps leaves a suspended context suspended, and a suspended
   context makes no sound: every tone resumes the context first. The context sleeps again a
   second after the last tone so it does not keep the phone's audio session busy.
3. A context created outside a tap starts suspended and no timer tick can start it: unlock()
   runs from the taps that lead to a timer (turning Sounds on, starting a hold).

Split out of #165 at the maintainer's request; the per-kind rest-over sounds and the timer-bar
work stay there. Tests: lib/sound.test.js (fake AudioContext + audioSession), views/Settings.sound.test.jsx.
2026-09-12 16:13:17 -04:00
Duarte Santos 14c454f5c1 The "back online" toast fires on the real reconnect path: the pull that runs first cleared the offline flag before the owed push looked at it 2026-09-12 21:56:15 +02:00
Duarte Santos 826432a3a2 Signed in, the server's profile is the truth: sign-in and pairing adopt it and ask once about workouts logged while signed out (Add them / Keep profile as is); the app polls the revision every 30 s and on every resume (GET /api/data/rev) and fetches only what moved; offline and unsynced states show a banner, retry on reconnect and confirm with a toast; pagehide flushes a pending change 2026-09-12 21:51:36 +02:00
Duarte Santos bff87930d8 Progression adds the step the way a stepper tap does — a weight off the increment grid keeps its offset (397 + 10 = 407, not 410; #175); the service worker closes the previous notification of the same kind before showing the next (#172) 2026-09-12 21:21:13 +02:00
Duarte Santos 06f1c007a7 Chip rows: the chips' enlarged tap area gave the 32px strip a 36px scroll height, so a diagonal swipe or a wheel tick shifted the whole row up 4px and left it there — the slop is clipped to the strip vertically 2026-09-12 21:08:40 +02:00
Boris Kurktchiev ebe00a1122 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.
2026-09-12 08:12:00 -04:00
Boris Kurktchiev 82db21100a feat(workout): a per-exercise rest for warm-up ramp sets (warmupRestSec)
An exercise's restSec runs after every set, warm-up ramp included, so a heavy lift with a
150 s working rest also puts 150 s between two light ramp sets. Exercises may now carry a
second optional field, warmupRestSec: the rest between warm-up ramp sets.

- The break after the LAST ramp set (into the first work set) stays the working rest, because
  that is the rest the first heavy set actually needs.
- Without the field nothing changes: ramp sets rest like work sets, exactly as before.
- Like restSec, the field is set by plan files (and by external planners writing routines);
  no new UI, no new string, no locale change. It travels with a shared plan the same way
  restSec does and is dropped when unset.

Where:
- src/lib/supersetFlow.js: warmupRestSecFor(entry, setIdx, workRestSec), the pure rule,
  tested beside it (supersetFlow.test.js)
- src/views/Workout.jsx: the rest started after a checked set goes through it, at all four
  start sites (re-check, singleton, unit done, superset round done)
- src/lib/plan-share.js: export/import passthrough with the same clamp as restSec
  (plan-share.test.js)
- src/views/Workout.test.jsx: 45 s between ramp sets, 150 s after the last ramp set and
  after work sets

Why: a lifter asked for it after two sessions ("warm-up sets have way too large of a rest
period, it should only be 60-90 seconds max") while wanting 90-150 s on the working sets.
The only lever today is one number per exercise.

Tests: cd frontend && npm test -> 1338 passing (93 files), including the new cases.

Compatibility: additive. Old routines, old plan files and old sessions have no field and
behave exactly as before. The API stores routines as opaque JSON, so nothing server-side
changes. The AI Coach's payload allowlist does not include the field (not needed there).
2026-09-12 08:12:00 -04:00
Duarte Santos 35c810a663 Settings and Library QA: a segmented control that does not fit next to its row title wraps under it instead of painting over it (translated packs at 390px), the today title takes two lines, the Language row shows the whole pack name, swipe-to-delete rows share the card radius (no red corners), Best value does not wrap before its unit, FitNotes' stock bench-press name matches on import 2026-09-12 13:41:13 +02:00
Duarte Santos 33be28b8e6 Workout QA: the per-side set number is a real button again, a unilateral set's volume is each side's weight × reps, timed and cardio sets from older data read as time again, finish summary tiles stay 2×2 in the dialog on desktop, exercise names in menu titles and toasts are capitalised (Kg no longer is) 2026-09-12 13:37:59 +02:00
Duarte Santos c2adb17511 Locales: the seven UI strings that landed with combine routines, the layout switch and the 1RM deload were in no pack (they showed in English in every language); pt-BR guard 635/639 2026-09-12 13:26:59 +02:00
Duarte Santos 477fc07f8b Push: reminders owed within 15 minutes still arrive, the subscription heals itself on every boot, rest-timer alerts belong to the device that started the rest
- reminder tick: a due reminder is sent for up to 15 minutes after its time (once per local
  date) instead of only on the exact minute — a restart across that minute used to lose the day;
  state files are stat'ed and re-read only when they changed
- sendPush prunes 403 (stale VAPID key) like 404/410; optional device targeting
- POST /api/push/subscribe is an upsert that keeps created and stores a deviceId;
  GET /api/push/status says whether the server holds an endpoint
- rest timers keyed per user+device; cancel without a device id keeps the old account-wide
  behaviour
- sw.js: payload parsed inside waitUntil (never a silent push), pushsubscriptionchange
  re-subscribes and registers the new endpoint
- lib/push.js: syncPushSubscription() (called once per signed-in boot from App.jsx and when
  Settings opens) re-registers a lost row, replaces a subscription made against another key,
  pushSupported() is false off https; deviceId() per browser
- Settings: the notifications switch shows what the server holds
- tests: server-reminder (window, dedupe, trained day), server-push-status (upsert, status,
  per-device timers), lib/push.test.js
2026-09-12 13:18:29 +02:00
Duarte Santos c92cfc372a sync: pushes are conditional on the revision this device last saw and a refused push merges both copies (lib/sync-merge.js — no workout, routine or weigh-in is dropped, the newer copy decides settings); the store pulls when the tab, window, app or network comes back, one push and one pull at a time, and nothing pushes before boot has pulled 2026-09-12 13:15:48 +02:00
Duarte Santos d58a98e768 Phone layout: chip strips no longer scroll the page, sheets stop short of the Dynamic Island, tab bar stays at the bottom after the keyboard
- useRevealActiveChip sets the strip's own scrollLeft instead of scrollIntoView, which
  walked every scrollable ancestor and jumped the page when the strip sat above the fold;
  .chips contain overscroll on both axes.
- Every .sheet cap (and .center) carries env(safe-area-inset-top); the dead
  -webkit-overflow-scrolling is gone.
- viewport-guard: with the keyboard down and the page displaced, a text field that kept
  focus (WebKit does not blur on button taps) is blurred and the correction runs; while
  Modals has the body pinned it unpins for one scroll and pins back where it was.
  Modals blurs a page field when a sheet opens; ticking a set blurs the row's input.
- Android: shortEdges cutout mode so --sat is real, adjustResize for the keyboard.
2026-09-12 13:11:17 +02:00
Duarte Santos 413bce5bf8 Merge !119: drag a horizontal chip strip to scroll it on a pointer device (HenryByte, #147) 2026-09-12 13:05:21 +02:00
Duarte Santos 124eda6890 Merge !121: tighten mobile workout bottom scroll (mflova) 2026-09-12 13:05:21 +02:00
Mirko Köster 702a40aac8 i18n: add de-CH as a derived locale 2026-09-11 17:28:03 +02:00