v1.3.8: twenty-four reports, the four promised items, and eleven community pull requests

versionCode 22. The milestone was due on the 27th; it ships a week early because the QA round
that followed the bug fixes found — and closed — enough to be worth releasing on its own.
This commit is contained in:
Duarte Santos committed 2026-09-20 21:26:06 +02:00
1 parent 90a1e8956a
commit f91cde15a1
10 files changed
+120 -26

No files matched your search

+11 -8
View File
@@ -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.7).
Built by scripts/build-api-docs.mjs from api/openapi.yaml (openGym API v1.3.8).
Regenerate with: node scripts/build-api-docs.mjs -->
<html lang="en">
<head>
@@ -238,7 +238,7 @@ 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.7</span>
<span>openGym v1.3.8</span>
<span>30 endpoints</span>
<span>AGPL-3.0-or-later</span>
</p>
@@ -270,7 +270,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
</div>
<div class="ov">
<h3>Conventions</h3>
<ul><li>Every response body is JSON with <code>Cache-Control: no-store</code>.</li><li>Errors are always <code>{&quot;error&quot;: &quot;&lt;human-readable message&gt;&quot;}</code>.</li><li>Unknown method+path pairs return <code>404 {&quot;error&quot;:&quot;not found&quot;}</code>; an unhandled exception returns <code>500 {&quot;error&quot;:&quot;server error&quot;}</code>.</li><li>Request bodies are parsed as JSON regardless of Content-Type; max 5 MiB.</li><li>CORS: the request's <code>Origin</code> is reflected in <code>Access-Control-Allow-Origin</code> <b>without</b> <code>Allow-Credentials</code> — cross-origin callers can only ever authenticate with a Bearer token, never with the cookie.</li></ul>
<ul><li>Every response body is JSON with <code>Cache-Control: no-store</code>.</li><li>Errors are always <code>{&quot;error&quot;: &quot;&lt;human-readable message&gt;&quot;}</code>.</li><li>Unknown method+path pairs return <code>404 {&quot;error&quot;:&quot;not found&quot;}</code>; an unhandled exception returns <code>500 {&quot;error&quot;:&quot;server error&quot;}</code>.</li><li>Request bodies are parsed as JSON regardless of Content-Type. A body that does not parse, or parses to anything but an object (<code>null</code>, a string, an array), is <code>400 {&quot;error&quot;:&quot;invalid json&quot;}</code> on every route that reads one; an empty body counts as <code>{}</code>. A body over 5 MiB is <code>413 {&quot;error&quot;:&quot;body too large&quot;}</code>; the rest of the upload is discarded so the answer reaches the client.</li><li>CORS: the request's <code>Origin</code> is reflected in <code>Access-Control-Allow-Origin</code> <b>without</b> <code>Allow-Credentials</code> — cross-origin callers can only ever authenticate with a Bearer token, never with the cookie.</li></ul>
</div>
</div>
</section>
@@ -705,7 +705,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
</div>
<div class="prow rrow">
<span class="r-code s4">400</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>
<span class="p-desc"><code>state</code> missing or not an object, <code>state</code> an array, or <code>workouts</code>/<code>routines</code> set to anything other than an array or null. Entries inside those two arrays that are not objects (<code>null</code>, numbers, nested arrays) are dropped before the write rather than refused, so a client with a damaged copy still syncs.<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>
@@ -887,8 +887,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 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>Schedules one push after <code>seconds</code> (a number or numeric string ≥ 1, clamped to 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 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">
@@ -913,6 +912,10 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="r-code s2">200</span>
<span class="p-desc">Timer scheduled.<span class="r-sig"><a href="#schema-Ok">Ok</a></span></span>
</div>
<div class="prow rrow">
<span class="r-code s4">400</span>
<span class="p-desc"><code>seconds</code> missing, not numeric, or below 1. Nothing is scheduled.<span class="r-sig"><code>{&quot;error&quot;:&quot;seconds required&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>
@@ -1046,7 +1049,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">List all users</span>
</summary>
<div class="ep-body">
<p>One row per user with workout counts, last sync, push status and live presence. Admin only.</p>
<p>One row per user with workout counts, last sync, push status and live presence. <code>workouts</code> counts only the entries the drill-down can show. Admin only.</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>Admin only — a signed-in session whose user is an admin (<code>ADMIN_UIDS</code> or <code>admin:true</code>), as the session cookie or a Bearer token.</span></p>
@@ -1076,7 +1079,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
<span class="ep-sum">One user in detail</span>
</summary>
<div class="ep-body">
<p>Drill-down — full workout history (newest first) and body-weight log for one user. Admin only.</p>
<p>Drill-down — full workout history (newest first) and body-weight log for one user. Admin only. Anything in <code>routines</code>, <code>bodyweight</code> or <code>workouts</code> that is not an object is left out, and a list that is not an array reads as empty: PUT /api/data drops those entries now, but a state file written before it did still has them and this route has to answer for it.</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>Admin only — a signed-in session whose user is an admin (<code>ADMIN_UIDS</code> or <code>admin:true</code>), as the session cookie or a Bearer token.</span></p>
<p class="ep-h">Query parameters</p><div class="ptab">
<div class="prow">
+2 -2
View File
@@ -51,7 +51,7 @@ try {
"url":"https://opengym.duarte-santos.ch/",
"image":"https://opengym.duarte-santos.ch/img/social.jpg",
"screenshot":["https://opengym.duarte-santos.ch/img/home.png","https://opengym.duarte-santos.ch/img/workout.png","https://opengym.duarte-santos.ch/img/stats.png"],
"softwareVersion":"1.3.7","datePublished":"2026-07-18","dateModified":"2026-09-13","isAccessibleForFree":true,
"softwareVersion":"1.3.8","datePublished":"2026-07-18","dateModified":"2026-09-20","isAccessibleForFree":true,
"featureList":["Weekly plan with a routine per weekday","Guided workouts with rest timer, supersets, warm-up and timed sets","Progression rules: linear, Greyskull LP, double progression","Estimated 1RM, activity heatmap, muscle balance and fatigue maps","Body-weight tracking with a goal line","Import from Hevy, Strong, FitNotes and Apple Health","Passkey login and multi-device sync when self-hosted","Standalone Android APK with no account","14 languages","Optional AI coach on your own API key"],
"downloadUrl":"https://opengym.duarte-santos.ch/openGym.apk",
"author":{"@type":"Person","name":"Duarte Santos","url":"https://duarte-santos.ch"},
@@ -420,7 +420,7 @@ try {
</ul>
<div class="push">
<a class="btn" href="openGym.apk" download>Download for Android</a>
<p class="meta">v1.3.7 · 27.7 MB · Android 6.0+ · signed APK. Your browser will ask
<p class="meta">v1.3.8 · 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