Commit Graph
734 Commits
Author SHA1 Message Date
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 6a8d2288ae Website docs: sync between devices, offline mode, where push works and the reminder catch-up (v1.3.6) 2026-09-12 23:14:00 +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 v1.3.6 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 020b7f4477 Merge !135: Coach job directory permissions without CAP_DAC_OVERRIDE (T13o)
# Conflicts:
#	api/coach/jobs.js
2026-09-12 22:55:26 +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 8266cca1ad Merge !110: nginx resolver configurable so /api works outside Docker, #148 (T13o)
# Conflicts:
#	web/nginx.conf.template
2026-09-12 22:53:45 +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 4f77c2b4bc Merge #182: README image reference back to GitHub (andi242) 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 28a068b8f0 Changelog: the #175/#172 bullets were listed twice 2026-09-12 21:32:02 +02:00
Duarte Santos b5e0388364 Progression adds its step the way a stepper tap does — 397 lb + 10 lb is 407, not the grid's 410 (#175); the service worker closes the previous notification with the same tag so rest-timer alerts do not pile up on iOS (#172) 2026-09-12 21:31:05 +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
andi242 d7e7ed8d6e fix image ref to github 2026-09-12 19:06:06 +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 88a1c317e5 Docs: where push works (iOS only from the Home Screen, the APK uses local notifications), the 15-minute catch-up and the self-healing subscription 2026-09-12 13:28:06 +02:00
Duarte Santos e7a63a593f Changelog: the 2026-09-12 bug round (sync revisions, push catch-up and self-healing subscriptions, chip rows, safe-area sheets, tab bar, Astra findings, locales) 2026-09-12 13:26: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 5276f9714a api: /api/data carries a server revision — GET hands it out, a PUT with a stale baseRev answers 409 with the current document instead of overwriting another device's write; clients without baseRev keep overwriting as before 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
Duarte Santos 3b51f7acce Merge #166: the twelve Astra findings (#160) — api, built-in Coach, frontend, nginx (kurktchiev) 2026-09-12 13:04:24 +02:00
Mirko Köster 702a40aac8 i18n: add de-CH as a derived locale 2026-09-11 17:28:03 +02:00
Boris Kurktchiev db48e6e00d web: nginx allows 5 MiB on /api/ to match the API (#160 finding 10); SELF_HOSTING names the proxy body limit 2026-09-11 10:23:58 -04:00
Boris Kurktchiev 8b2fc43c8a frontend: #160 findings 1/2/9/10 — the local copy remembers its owner and is wiped when another profile signs in (open tabs follow), a copy adopted from the server keeps its timestamp, Reset everything says what it deletes and forgets the server-side Coach record, a 413 on sync is shown instead of swallowed 2026-09-11 10:23:13 -04:00
Boris Kurktchiev 6d9d7a6cba coach (built-in): #160 findings 4/5/6/11 — forget keeps today's count, the instance cap is reserved at enqueue from its own counter instead of the 100-entry log, forget drops queued work, aborts the HTTP call and discards a late result, scheduled reviews advance on the server's own record and wait for an unread proposal 2026-09-11 10:22:24 -04:00
Boris Kurktchiev 67a8e68e42 api: #160 findings 3/7/8/12 — a request target that does not parse answers 400 instead of an unhandled rejection, the reminder tick skips a state it cannot read and PUT /api/data refuses non-array workouts/routines, the push address rule judges every IPv6 spelling and re-checks literals before each send, sign out everywhere voids unredeemed pairing codes 2026-09-11 10:21:12 -04:00
Dror Amsalem 42d5272b0b choose equipment for custom exercises 2026-09-11 16:08:51 +03:00
Dror Amsalem 8ae5cdb060 custom cardio exercises now have a default target muscle and an option add secondary muscles 2026-09-11 16:08:51 +03:00
Dror Amsalem 3f538268e8 fix: how muscles show on library and sheets 2026-09-11 16:08:36 +03:00
Dror Amsalem 9ca4d28d5f fix: hovered body parts clipping in sheets 2026-09-11 16:02:24 +03:00
shailantaniandClaude Sonnet 5 2a369e38bd iOS: adopt UIScene lifecycle for Xcode 26+ / iOS 26+ SDK
Apps built with the iOS 26+ SDK must adopt the UIScene-based app
lifecycle; the AppDelegate-only lifecycle this project's iOS shell
uses is no longer supported and crashes on launch:

  Application failed to launch: UIScene life cycle is required for
  apps built with this SDK.

This adds a SceneDelegate (window/root VC still come from
Main.storyboard, it just forwards deep links / Universal Links to
Capacitor's ApplicationDelegateProxy, since AppDelegate's own
open-url/continue-activity callbacks aren't invoked under the scene
lifecycle), wires AppDelegate's
application(_:configurationForConnecting:) to use it, and adds the
UIApplicationSceneManifest to Info.plist.

No deployment target, bundle id, or signing settings changed — apps
built with older Xcode/SDKs are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 16:50:26 +05:30
Duarte Santos 38a0b52e36 Mirror to GitLab from GitHub Actions; docs: GitHub is home, GitLab the mirror
A push to main or a v* tag on GitHub is forwarded to gitlab.com by a workflow, fast-forward
only, main before the tags so the tag pipeline finds its commit on main. Pull mirroring on
gitlab.com is paid, so the push runs from this side; it needs a project token with the single
scope write_repository (Maintainer role, for the protected main and v*) as the secret
GITLAB_MIRROR_TOKEN, handed to git through a credential helper rather than a URL.

README, CONTRIBUTING, MOBILE and the changelog now say what the site says: issues and pull
requests on GitHub, the GitLab mirror only for the CI that builds the release artefacts, the
merge requests still open there reviewed until they are through.
2026-09-11 11:58:39 +02:00