Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

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

Duarte Santos32111dcad357
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3b1199501..842a878cc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,10 @@
# Changelog
-## Unreleased
+## v1.3.6 — 2026-09-12
-What the Discord and GitLab reports after v1.3.5 had in common: the Coach failed and nobody could
-see why. Web bundle and APK; the API image only for the payload change.
+Sync you can trust and a phone that behaves: signed in, the server's profile is always the truth, two devices merge instead of overwriting each other, the app polls for changes and works offline with a banner; reminders and push subscriptions heal themselves; chip rows, sheets under the notch and the tab bar are fixed on iOS; the twelve Astra findings, eleven community merges and a headless QA sweep of every screen. Web bundle, APK and API image.
+
+**The Coach reports after v1.3.5 had one thing in common: it failed and nobody could see why.**
**Bug round (2026-09-12) — the reports from the owner's own phone:** push late or missing, desktop and
phone out of step, the Exercises chip rows scrolling the page, sheets under the Dynamic Island, the
diff --git a/README.md b/README.md
index 32d68978f..40226a9d3 100644
--- a/README.md
+++ b/README.md
@@ -215,9 +215,9 @@ host side of that volume, not the variable.
## Roadmap
The plan lives in [ROADMAP.md](ROADMAP.md) (the
-[GitLab milestones](https://gitlab.com/DuarteSantos8/opengym/-/milestones) track the same items): v1.3.5 programmes and
+[GitLab milestones](https://gitlab.com/DuarteSantos8/opengym/-/milestones) track the same items): v1.3.7 programmes and
progression (explicit warm-up/work phases, AMRAP driver selection, multi-week programmes, adaptive
-1RM), v1.3.6 accounts and sync (password and OIDC login, personal-trainer role, remote MCP), v1.3.7
+1RM), v1.3.8 accounts and sync (password and OIDC login, personal-trainer role, remote MCP), v1.3.9
mobile (timer in the notification bar, widgets, Withings). Ideas and pull requests welcome.
## Tech
diff --git a/ROADMAP.md b/ROADMAP.md
index 4e56b93ab..fd5c1db6d 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -57,7 +57,19 @@ Left over from this block:
- A real pause for the workout timers (#29 asked for it)
- Discord announcement (owner)
-## v1.3.5 — Programmes & progression (October 2026)
+## v1.3.6 — Sync, push and the phone (released 2026-09-12)
+
+Signed in, the server's profile is the truth: sign-in adopts it, two devices merge on a server
+revision instead of overwriting each other, the app polls for changes and works offline with a
+banner. Reminders fire up to 15 minutes late rather than never, push subscriptions re-register
+themselves, rest-timer alerts are per device. iOS: chip rows scroll sideways only, sheets clear the
+Dynamic Island, the tab bar stays put after the keyboard, the home-screen app reloads offline. The
+twelve Astra findings, eleven community merges (weigh-in switch, Swiss German, iOS 26 build, PDF on
+the phone, nginx resolver, custom-exercise equipment, per-side data, warm-up rest) and a headless
+QA sweep of every screen. Left over: routine reordering (#142), the Smith-bar "no bar" option
+(#138), two decimals (#139), delete user in the admin (#107).
+
+## v1.3.7 — Programmes & progression (October 2026)
**Theme: training structure beyond one weekly template.** Most of this is the Space-Hermes series.
It changes the training model (per-set roles, explicit phases, normalisation on every persist), so
@@ -81,7 +93,7 @@ it goes in one MR at a time, each rebased and tested on gym-test before the next
- Catalogue cleanup: exercises that should not carry weight, incline and interval fields for
cardio (#46); timers for planks and outdoor cardio are already there, document them (#45)
-## v1.3.6 — Accounts & sync (November 2026)
+## v1.3.8 — Accounts & sync (November 2026)
**Theme: who may sign in, and what else may read or write your data.**
@@ -99,7 +111,7 @@ it goes in one MR at a time, each rebased and tested on gym-test before the next
logged sessions lost after editing a routine (#25)
- Admin: per-user export, invite management, audit log filters
-## v1.3.7 — Mobile (December 2026)
+## v1.3.9 — Mobile (December 2026)
**Theme: the Android app catches up with the web app.**
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 876deae2f..c70c384c2 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -6,7 +6,7 @@ openapi: 3.1.0
info:
title: openGym API
- version: 1.3.5
+ version: 1.3.6
summary: Passkey (WebAuthn) auth + per-user state storage for openGym
description: |
The backend of [openGym](https://opengym.duarte-santos.ch) — a free, open-source
diff --git a/api/package-lock.json b/api/package-lock.json
index 0075e846f..b98e46508 100644
--- a/api/package-lock.json
+++ b/api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "gym-api",
- "version": "1.3.5",
+ "version": "1.3.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gym-api",
- "version": "1.3.5",
+ "version": "1.3.6",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@simplewebauthn/server": "^13.1.1",
diff --git a/api/package.json b/api/package.json
index c799536a5..c2b4c27a3 100644
--- a/api/package.json
+++ b/api/package.json
@@ -1,6 +1,6 @@
{
"name": "gym-api",
- "version": "1.3.5",
+ "version": "1.3.6",
"private": true,
"type": "module",
"main": "server.js",
diff --git a/frontend/android/app/build.gradle b/frontend/android/app/build.gradle
index e0bae38bd..bd4f9ef9e 100644
--- a/frontend/android/app/build.gradle
+++ b/frontend/android/app/build.gradle
@@ -7,8 +7,8 @@ android {
applicationId "ch.duartesantos.opengym"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 19
- versionName "1.3.5"
+ versionCode 20
+ versionName "1.3.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 7b7ff5be8..c4aaf40c2 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "opengym-frontend",
- "version": "1.3.5",
+ "version": "1.3.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "opengym-frontend",
- "version": "1.3.5",
+ "version": "1.3.6",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@aparajita/capacitor-secure-storage": "^7.1.6",
diff --git a/frontend/package.json b/frontend/package.json
index daf84a021..75330b4d8 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "opengym-frontend",
"private": true,
- "version": "1.3.5",
+ "version": "1.3.6",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/website/api.html b/website/api.html
index febc8842e..87dd9637f 100644
--- a/website/api.html
+++ b/website/api.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<!-- GENERATED FILE - do not edit by hand.
- Built by scripts/build-api-docs.mjs from api/openapi.yaml (openGym API v1.3.5).
+ Built by scripts/build-api-docs.mjs from api/openapi.yaml (openGym API v1.3.6).
Regenerate with: node scripts/build-api-docs.mjs -->
<html lang="en">
<head>
@@ -232,8 +232,8 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
</div>
<p class="api-facts">
<span>OpenAPI 3.1.0</span>
- <span>openGym v1.3.5</span>
- <span>28 endpoints</span>
+ <span>openGym v1.3.6</span>
+ <span>30 endpoints</span>
<span>AGPL-3.0-or-later</span>
</p>
@@ -548,7 +548,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">Sign out everywhere</span>
</summary>
<div class="ep-body">
-<p>Bumps the account's session version, which invalidates <b>every</b> cookie and Bearer token ever issued for it — on every device, including a copy someone walked off with. Passkeys are untouched; signing back in works immediately. Also clears the caller's own cookie.</p>
+<p>Bumps the account's session version, which invalidates <b>every</b> cookie and Bearer token ever issued for it — on every device, including a copy someone walked off with. Passkeys are untouched; signing back in works immediately. Also clears the caller's own cookie. Unredeemed pairing codes for the account are voided too.</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
@@ -649,7 +649,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">Pull the account's app state</span>
</summary>
<div class="ep-body">
-<p>Returns the caller's entire app state as one JSON blob, or <code>{&quot;state&quot;: null}</code> if nothing has been synced yet. Sync conflict resolution happens client-side (last-writer-wins by the client-set <code>_ts</code> timestamp).</p>
+<p>Returns the caller's entire app state as one JSON blob, or <code>{&quot;state&quot;: null}</code> if nothing has been synced yet, together with <code>rev</code>, the server's revision of that document (0 when there is none). A client keeps the <code>rev</code> it last read or wrote and sends it back as <code>baseRev</code> on the next push, which lets the server refuse a write over a document the client never saw (see the 409 on PUT).</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
@@ -657,7 +657,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<div class="ptab">
<div class="prow rrow">
<span class="r-code s2">200</span>
- <span class="p-desc">The stored state, or null.<span class="r-sig">{ state: <a href="#schema-State">State</a> | null }</span></span>
+ <span class="p-desc">The stored state, or null, and its revision.<span class="r-sig">{ state: <a href="#schema-State">State</a> | null, rev: integer }</span></span>
</div>
<div class="prow rrow">
<span class="r-code s4">401</span>
@@ -676,6 +676,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
</summary>
<div class="ep-body">
<p>Replaces the stored state wholesale (atomic write; there is no merge on the server). The <code>active</code> field — an in-progress workout — is stripped before saving: a running session belongs to the device running it. Body limit 5 MiB.</p>
+<p>With <code>baseRev</code> the write is conditional: it goes through only when <code>baseRev</code> equals the document's current revision, and answers 409 with the current document otherwise — the client merges the two and pushes again with the revision it was given. Without <code>baseRev</code> the write is unconditional (clients from before revisions, and deliberate replaces such as a backup import). The server stamps the new revision into the document as <code>_rev</code>; a <code>_rev</code> sent by the client is ignored.</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
<p class="ep-h">Request body <span class="p-hint">(JSON)</span></p><div class="ptab">
@@ -684,20 +685,29 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="p-type"><a href="#schema-State">State</a></span>
<span class="p-desc"></span>
</div>
+ <div class="prow">
+ <span class="p-name">baseRev</span>
+ <span class="p-type">integer | null</span>
+ <span class="p-desc">The revision this client last read or wrote. Omit or null for an unconditional overwrite.</span>
+ </div>
</div>
<p class="ep-h">Responses</p>
<div class="ptab">
<div class="prow rrow">
<span class="r-code s2">200</span>
- <span class="p-desc">Saved.<span class="r-sig">{ ok: always true, ts: number | null }</span></span>
+ <span class="p-desc">Saved.<span class="r-sig">{ ok: always true, ts: number | null, rev: integer }</span></span>
</div>
<div class="prow rrow">
<span class="r-code s4">400</span>
- <span class="p-desc"><code>state</code> missing or not an object.<span class="r-sig"><code>{&quot;error&quot;:&quot;state required&quot;}</code></span></span>
+ <span class="p-desc"><code>state</code> missing or not an object, or <code>workouts</code>/<code>routines</code> set to anything other than an array or null.<span class="r-sig"><code>{&quot;error&quot;:&quot;state required&quot;}</code> &middot; <code>{&quot;error&quot;:&quot;invalid state&quot;}</code></span></span>
</div>
<div class="prow rrow">
<span class="r-code s4">401</span>
<span class="p-desc">No session, expired/revoked session, or a disabled account.<span class="r-sig"><code>{&quot;error&quot;:&quot;not signed in&quot;}</code></span></span>
+ </div>
+ <div class="prow rrow">
+ <span class="r-code s4">409</span>
+ <span class="p-desc"><code>baseRev</code> is not the current revision — another client wrote since this one last read. Carries the current document so the client can merge and retry.</span>
</div>
</div>
</div>
@@ -740,7 +750,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">Register a Web-Push subscription</span>
</summary>
<div class="ep-body">
-<p>Stores the browser's <code>PushSubscription</code> for this account. Only <code>endpoint</code> and the two protocol keys are kept. The endpoint must be a public <code>https://</code> URL — private/loopback/link-local addresses are refused (here and again at send time, against DNS rebinding). At most 20 subscriptions per user; the oldest are dropped first. Re-subscribing an existing endpoint replaces it.</p>
+<p>Stores the browser's <code>PushSubscription</code> for this account. Only <code>endpoint</code> and the two protocol keys are kept. The endpoint must be a public <code>https://</code> URL — private/loopback/link-local addresses are refused (here and again at send time, against DNS rebinding). At most 20 subscriptions per user; the oldest are dropped first. Re-subscribing an existing endpoint replaces it and keeps its original <code>created</code> — the client re-sends its subscription on every signed-in boot, so a row the instance lost comes back on its own.</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
<p class="ep-h">Request body <span class="p-hint">(JSON)</span></p><div class="ptab">
@@ -749,6 +759,11 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="p-type"><a href="#schema-PushSubscription">PushSubscription</a></span>
<span class="p-desc"></span>
</div>
+ <div class="prow">
+ <span class="p-name">deviceId</span>
+ <span class="p-type">string</span>
+ <span class="p-desc">A token the browser made up for itself (stored in its localStorage), so rest-timer pushes can be aimed at the device that started the rest. Optional; anything that is not a short token is ignored.</span>
+ </div>
</div>
<p class="ep-h">Responses</p>
<div class="ptab">
@@ -768,6 +783,38 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
</div>
</details>
+<details class="ep" id="op-pushStatus">
+ <summary>
+ <span class="m get">GET</span>
+ <span class="ep-path"><code>/api/push/status</code></span>
+ <span class="ep-chev" aria-hidden="true"></span>
+ <span class="ep-sum">Does the server hold this subscription?</span>
+ </summary>
+ <div class="ep-body">
+<p>Whether the caller's account has a stored subscription with exactly this <code>endpoint</code>. The browser's <code>PushManager.getSubscription()</code> says nothing about the server's side — a row pruned after a dead send (404/410/403) leaves the browser subscribed to nowhere — so the client asks here before showing the notifications switch as on, and re-registers when the answer is no.</p>
+ <p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
+<p class="ep-h">Query parameters</p><div class="ptab">
+ <div class="prow">
+ <span class="p-name">endpoint<em class="p-req" title="required">required</em></span>
+ <span class="p-type">string <span class="p-hint">(uri)</span></span>
+ <span class="p-desc"></span>
+ </div>
+</div>
+
+ <p class="ep-h">Responses</p>
+ <div class="ptab">
+ <div class="prow rrow">
+ <span class="r-code s2">200</span>
+ <span class="p-desc">The answer.<span class="r-sig">{ subscribed: boolean }</span></span>
+ </div>
+ <div class="prow rrow">
+ <span class="r-code s4">401</span>
+ <span class="p-desc">No session, expired/revoked session, or a disabled account.<span class="r-sig"><code>{&quot;error&quot;:&quot;not signed in&quot;}</code></span></span>
+ </div>
+ </div>
+ </div>
+</details>
+
<details class="ep" id="op-pushUnsubscribe">
<summary>
<span class="m post">POST</span>
@@ -808,7 +855,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">Send a test notification</span>
</summary>
<div class="ep-body">
-<p>Sends a test push to all of the caller's subscriptions (localized with the <code>lang</code> in their synced state). Returns 200 even if delivery to individual endpoints fails — dead endpoints (404/410) are pruned as a side effect.</p>
+<p>Sends a test push to all of the caller's subscriptions (localized with the <code>lang</code> in their synced state). Returns 200 even if delivery to individual endpoints fails — dead endpoints (404/410, and 403 for a subscription made against a VAPID key the instance no longer has) are pruned as a side effect.</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
@@ -834,7 +881,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">Schedule a server-side rest-timer push</span>
</summary>
<div class="ep-body">
-<p>Schedules one push after <code>seconds</code> (clamped to 1–3600; one pending timer per user, a new call replaces it). The client schedules this on rest start/extend and cancels on skip or on-screen completion — the push only actually fires when the tab was backgrounded/suspended and never got to cancel it.</p>
+<p>Schedules one push after <code>seconds</code> (clamped to 1–3600). One pending timer per device — <code>deviceId</code>, the same token the subscription was registered with; a new call from the same device replaces it, and the push goes only to that device's subscriptions. Without a <code>deviceId</code> there is one timer per account and the push goes to every subscription, as before. The client schedules this on rest start/extend and cancels on skip or on-screen completion — the push only actually fires when the tab was backgrounded/suspended and never got to cancel it. Timers live in memory: an API restart drops them.</p>
<p>Note: the documented <code>400 seconds required</code> exists in the code but is unreachable — the clamp turns any missing/invalid value into 1.</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
@@ -844,9 +891,15 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="p-type">number <span class="p-hint">(1&ndash;3600)</span></span>
<span class="p-desc"></span>
</div>
+ <div class="prow">
+ <span class="p-name">deviceId</span>
+ <span class="p-type">string</span>
+ <span class="p-desc">The browser's own token, see <code>POST /api/push/subscribe</code>. Optional.</span>
+ </div>
</div>
<pre><code>{
- &quot;seconds&quot;: 90
+ &quot;seconds&quot;: 90,
+ &quot;deviceId&quot;: &quot;3f9c1d2e7b0a4c6d9e8f1a2b3c4d5e6f&quot;
}</code></pre>
<p class="ep-h">Responses</p>
<div class="ptab">
@@ -870,10 +923,16 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">Cancel the pending rest-timer push</span>
</summary>
<div class="ep-body">
-<p>Cancels the caller's scheduled rest-timer push, if any. Idempotent.</p>
+<p>Cancels the caller's scheduled rest-timer push, if any. With a <code>deviceId</code> only that device's timer; without one, every pending timer of the account. Idempotent.</p>
<p class="ep-auth"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Requires a session — the cookie set at sign-in, or <code>Authorization: Bearer &lt;token&gt;</code> from mobile-app pairing.</span></p>
-
+<p class="ep-h">Request body <span class="p-hint">(JSON)</span> <span class="p-hint">(optional)</span></p><div class="ptab">
+ <div class="prow">
+ <span class="p-name">deviceId</span>
+ <span class="p-type">string</span>
+ <span class="p-desc"></span>
+ </div>
+</div>
<p class="ep-h">Responses</p>
<div class="ptab">
<div class="prow rrow">
@@ -1570,13 +1629,18 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">The whole app state as one blob.</span>
</summary>
<div class="ep-body">
-<p>The server treats it as opaque (it only strips <code>active</code> on save and reads a few fields for reminders and the admin dashboard) — the schema below is <b>representative, not enforced</b>, and grows with the app. Conflict resolution is client-side via <code>_ts</code>.</p>
+<p>The server treats it as opaque (it only strips <code>active</code> on save and reads a few fields for reminders and the admin dashboard) — the schema below is <b>representative, not enforced</b> (except <code>workouts</code> and <code>routines</code>, which must be arrays (or null) when present), and grows with the app. Concurrent writes are caught by the server's revision (<code>_rev</code>, see PUT /api/data); the client merges the two documents and decides by <code>_ts</code> which side's settings win.</p>
<div class="ptab">
<div class="prow">
<span class="p-name">_ts</span>
<span class="p-type">number</span>
<span class="p-desc">Client-set last-write timestamp (ms since epoch); drives sync.</span>
</div>
+ <div class="prow">
+ <span class="p-name">_rev</span>
+ <span class="p-type">integer</span>
+ <span class="p-desc">Server-set revision, incremented on every accepted PUT. Ignored when sent by a client.</span>
+ </div>
<div class="prow">
<span class="p-name">unit</span>
<span class="p-type">&quot;kg&quot; | &quot;lb&quot;</span>
diff --git a/website/index.html b/website/index.html
index f26de0742..05a801dc1 100644
--- a/website/index.html
+++ b/website/index.html
@@ -404,7 +404,7 @@ try {
</ul>
<div class="push">
<a class="btn" href="openGym.apk" download>Download for Android</a>
- <p class="meta">v1.3.5 · 27.7 MB · Android 6.0+ · signed APK. Your browser will ask
+ <p class="meta">v1.3.6 · 27.7 MB · Android 6.0+ · signed APK. Your browser will ask
before installing; that is normal outside the Play Store.</p>
<p class="meta">Every release is also built and signed by CI and attached to the
<a href="https://github.com/DuarteSantos8/openGym/releases" rel="noopener">GitHub