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.4: effort picker restyled as a menu list, media falls back to the still or a tile instead of a broken image

Duarte Santos9c7c3513456a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 540e018ff..f70994a56 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## v1.3.4 — 2026-09-05
+
+Two things noticed on the phone right after v1.3.3. Web bundle and APK; the API only carries the
+version number.
+
+- 🎨 **The effort picker looks like the rest of the app.** The v1.3.3 sheet was a grid of colour-edged
+ tiles that matched nothing else on screen. It is now the same list the ⋯ menus use: a tinted
+ square with the value where the icon sits, the sentence as the row, a tick on the current one, and
+ an "Exact RIR" row carrying the app's own stepper, tinted like the logged cell. Same six levels, same
+ colours, same free value.
+- 🖼️ **Animations that fail to load fall back instead of breaking.** If the animation cannot be
+ fetched (dropped connection, CDN hiccup, an instance that gates media behind a session) the still
+ picture takes its place; if that fails too, a neutral tile does, and a tap tries again. No more
+ broken-image glyph on a white block.
+
## v1.3.3 — 2026-09-05
The workout screen gets out of the way, and the bug round from the board. Same day as v1.3.2 on
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 17841b8f2..0f65de3a9 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -6,7 +6,7 @@ openapi: 3.1.0
info:
title: openGym API
- version: 1.3.3
+ version: 1.3.4
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 462f2514b..f42f6991f 100644
--- a/api/package-lock.json
+++ b/api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "gym-api",
- "version": "1.3.3",
+ "version": "1.3.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gym-api",
- "version": "1.3.3",
+ "version": "1.3.4",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@simplewebauthn/server": "^13.1.1",
diff --git a/api/package.json b/api/package.json
index ea269f70d..1fda9b00b 100644
--- a/api/package.json
+++ b/api/package.json
@@ -1,6 +1,6 @@
{
"name": "gym-api",
- "version": "1.3.3",
+ "version": "1.3.4",
"private": true,
"type": "module",
"main": "server.js",
diff --git a/frontend/android/app/build.gradle b/frontend/android/app/build.gradle
index 3882d10c3..8cb0f77ef 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 17
- versionName "1.3.3"
+ versionCode 18
+ versionName "1.3.4"
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 e3d6ae5b3..529b7d86a 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "opengym-frontend",
- "version": "1.3.3",
+ "version": "1.3.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "opengym-frontend",
- "version": "1.3.3",
+ "version": "1.3.4",
"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 b05ec244c..4006d1034 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "opengym-frontend",
"private": true,
- "version": "1.3.3",
+ "version": "1.3.4",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/frontend/src/components/Media.jsx b/frontend/src/components/Media.jsx
index 61b4602e6..1c90fcca8 100644
--- a/frontend/src/components/Media.jsx
+++ b/frontend/src/components/Media.jsx
@@ -13,21 +13,35 @@ import Icon from './Icon.jsx'
// a custom exercise without media. Any other/legacy value behaves as 'full'.
export default function Media({ ex, id, compact, minimizable }) {
const [playing, setPlaying] = useState(true)
+ // 'gif' → the animation failed, the still is showing; 'all' → the still failed too. Media is
+ // fetched from wherever the build points (a mount, a CDN): a dropped connection, an expired
+ // session on a gated instance or a CDN hiccup used to leave the browser's broken-image glyph
+ // on a white block. Now the still stands in for the animation, a neutral tile stands in for
+ // both, and a tap tries again — no text, so nothing new to translate.
+ const [failed, setFailed] = useState(null)
const gifSize = useStore(s => s.S.gifSize)
const update = useStore(s => s.update)
if (!ex.gif) return null
if (minimizable && gifSize === 'off') return null
const mini = minimizable && gifSize === 'mini'
const toggleSize = e => { e.stopPropagation(); update(s => { s.gifSize = mini ? 'full' : 'mini' }) }
+ const showGif = playing && failed == null
+ const onError = () => setFailed(showGif ? 'gif' : 'all')
+ const onTap = () => {
+ if (failed) { setFailed(null); setPlaying(true); return }
+ setPlaying(p => !p)
+ }
return (
- <div className={'exmedia' + (compact ? ' compact' : '') + (mini ? ' mini' : '')} id={id} onClick={() => setPlaying(p => !p)}>
- <img decoding="async" draggable={false} src={playing ? gifSrc(ex) : imgSrc(ex)} alt={exerciseNameFor(ex)} />
+ <div className={'exmedia' + (compact ? ' compact' : '') + (mini ? ' mini' : '') + (failed === 'all' ? ' broken' : '')} id={id} onClick={onTap}>
+ {failed === 'all'
+ ? <div className="exmedia-x"><Icon name="dumbbell" /></div>
+ : <img decoding="async" draggable={false} src={showGif ? gifSrc(ex) : imgSrc(ex)} alt={exerciseNameFor(ex)} onError={onError} />}
{minimizable && (
<button className="giftoggle" onClick={toggleSize}>
<Icon name={mini ? 'expand' : 'minimize'} />{mini ? t('Expand') : t('Minimize')}
</button>
)}
- {!mini && (
+ {!mini && !failed && (
<span className="gifhint">
<Icon name={playing ? 'pause' : 'play'} />{playing ? t('tap to pause') : t('tap to play')}
</span>
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 76a51d0bf..a66b8f414 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -639,6 +639,12 @@ h4.sec{
at 180px you had to scroll a full screen between two exercises done back-to-back */
.exmedia.compact img{height:120px}
.exmedia.mini img{height:84px}
+/* both the animation and the still failed to load: a neutral tile instead of the browser's
+ broken-image glyph; same heights as the picture so the card does not jump. tap retries. */
+.exmedia.broken{background:var(--surface-2)}
+.exmedia-x{width:100%;height:320px;display:flex;align-items:center;justify-content:center;color:var(--label-3);font-size:34px}
+.exmedia.compact .exmedia-x{height:120px}
+.exmedia.mini .exmedia-x{height:84px}
.sethead{
display:flex;align-items:center;gap:8px;padding:0 0 6px;
@@ -715,50 +721,18 @@ h4.sec{
.setrow.eff3 .effcell-stp>button[aria-label="Increase"]{width:22px}
.setrow.eff3 .effcell-stp .val{font-size:14px}
/* effort quick picker sheet: colour-coded preset buttons, hardest (purple) first */
-.effpick{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-bottom:16px}
-.effpick-b{
- display:flex;flex-direction:column;align-items:flex-start;gap:3px;
- padding:12px 14px;border-radius:13px;text-align:left;
- background:var(--surface);border:1.5px solid var(--sep-op);
- border-left:4px solid var(--bc);
- transition:background var(--fast),transform var(--fast),border-color var(--fast);
-}
-.effpick-b:active{transform:scale(.97)}
-.effpick-b.on{background:color-mix(in srgb,var(--bc) 16%,var(--surface));border-color:var(--bc)}
-.effpick-n{font-size:20px;font-weight:700;color:var(--bc);line-height:1;font-variant-numeric:tabular-nums}
-.effpick-f{font-size:12px;color:var(--label-2);line-height:1.25}
-/* the free field sits as a full-width row the same size as a preset button: its "Exact RIR"
- label on the left, a −/value/+ group in the middle, and the scale name on the right, same
- padding and radius as .effpick-b. the whole row borders in the current band colour. */
-.effpick-free{
- display:flex;align-items:center;justify-content:space-between;gap:10px;
- padding:10px 14px;border-radius:13px;margin-top:2px;
- background:var(--surface);border:1.5px solid var(--sep-op);
- transition:border-color var(--fast);
-}
-.effpick-free-l{font-size:14px;color:var(--label-2);flex:none}
-.effpick-free-unit{font-size:13px;font-weight:600;color:var(--label-3);flex:none}
-/* the −/value/+ group: a rounded surface holding a big tappable number between two step
- buttons. tinted (color:inherit) to the band colour when a value is set. */
-.effpick-step{
- display:flex;align-items:center;gap:2px;flex:none;
- background:var(--surface-2);border-radius:10px;overflow:hidden;
-}
-.effpick-step button{
- width:38px;height:40px;flex:none;color:currentColor;font-size:16px;--icon-stroke:2.2;
- display:flex;align-items:center;justify-content:center;transition:background var(--fast);
-}
-.effpick-step button:active{background:var(--surface-3)}
-/* the `.num` base styling (transparent bg, no border) is scoped to `.stp .num`; this input is
- not in a `.stp`, so it must set its own or the browser paints a native white field. */
-.effpick-free-in.num{
- flex:none;width:64px;text-align:center;padding:0;height:40px;
- background:none;border:none;outline:none;color:currentColor;
- font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;
- -moz-appearance:textfield;appearance:textfield;
+/* effort picker: the ⋯-menu list with the value in the icon square, tinted per band; the
+ exact-value row carries the same stepper as the logged cell in the set row. */
+.effpick.menu-list .menu-item .effpick-n{
+ background:var(--bc);color:#fff;font-size:13px;font-weight:700;letter-spacing:-.02em;
+ font-variant-numeric:tabular-nums;
}
-.effpick-free-in.num::-webkit-inner-spin-button{display:none}
-.effpick-free-in.num::placeholder{color:var(--label-3);font-weight:600}
+.effpick .menu-item.on{background:color-mix(in srgb,var(--bc) 14%,var(--surface))}
+.effpick .menu-on.is-on{color:var(--bc)}
+.effpick .effpick-free{padding-right:8px}
+.effpick .effpick-free .stp{flex:none;width:148px}
+.effpick .effpick-free .stp .num{font-size:17px;font-weight:600}
+.effpick .effpick-free .stp .num::placeholder{color:var(--label-3);font-weight:500}
.setrow.done .n{background:var(--acc);color:var(--on-acc)}
.setrow.done{opacity:.45}
/* drop-set drops / rest-pause bursts riding on a work row, editable like the row itself
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index dbad680d0..29a38ff5e 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -1368,53 +1368,50 @@ export const glyphPicker = (current, onPick) => {
// RPE sees the same buttons labelled on its own scale (toScale), coloured identically — the
// colour is the effort, not the number, so 0 RIR and 10 RPE are both the "went to failure" end.
function EffortPicker({ kind, value, onPick, close }) {
- // Local mirror so the highlighted preset and the free field track typing live; the store is
+ // Local mirror so the ticked preset and the exact field track typing live; the store is
// written on every change through onPick, the same as the stepper did.
const [v, setV] = useState(value ?? null)
const set = nv => { setV(nv); onPick(nv) }
// `v` is in the profile's own scale (whatever sits on the set: s.rir or s.rpe). Compare in
- // RIR so the highlighted preset is right on either scale, and so a typed RPE colours the
+ // RIR so the tick lands on the right preset on either scale, and so a typed RPE colours the
// same as the RIR it equals.
const curRir = rirOf(kind === 'rpe' ? { rpe: v } : { rir: v })
- // The band colour for the value currently on the field, so the exact-value row is tinted the
- // same way the presets and the workout row cell are — null (nothing typed) stays neutral.
const curColor = effortColor(curRir)
const commit = nv => { close(); onPick(nv) }
const pick = rir => commit(toScale(kind, rir))
+ const hd = EFFORT[kind].hd
+ // Same list the ⋯ menus use: a tinted square with the value where the icon goes, the sentence
+ // as the row title, a tick on the current one. The exact field is the app's own stepper,
+ // tinted like the logged cell in the set row, so the sheet and the row read as one thing.
return <>
- <h3>{t('How hard was that set?')}</h3>
- <div className="muted small" style={{ marginBottom: 14, lineHeight: 1.45 }}>
- {t('Tap how many reps you had left, or type an exact {0}.', EFFORT[kind].hd)}
- </div>
- <div className="effpick">
+ <h3 style={{ marginBottom: 2 }}>{t('How hard was that set?')}</h3>
+ <div className="muted small" style={{ marginBottom: 10 }}>{t('Tap how many reps you had left, or type an exact {0}.', hd)}</div>
+ <div className="list menu-list effpick">
{EFFORT_PRESETS.map(p => {
const label = fmtNum(toScale(kind, p.rir)) + (p.tail ? '+' : '')
const on = curRir != null && curRir === p.rir
- return <button key={p.rir} className={'effpick-b' + (on ? ' on' : '')}
- style={{ '--bc': p.color }} onClick={() => pick(p.rir)}>
- <span className="effpick-n">{label}</span>
- <span className="effpick-f">{t(p.feel)}</span>
- </button>
+ return <div key={p.rir} className={'item menu-item' + (on ? ' on' : '')} style={{ '--bc': p.color }}
+ {...tappable(() => pick(p.rir))}>
+ <span className="lrow-i effpick-n">{label}</span>
+ <div className="grow"><div className="tt">{t(p.feel)}</div></div>
+ <span className={'menu-on' + (on ? ' is-on' : '')}><Icon name="check" /></span>
+ </div>
})}
- </div>
- {/* The free field keeps the flexibility the stepper had: a value between two presets, in
- the profile's own scale, capped to the top of it (there is no RPE 12). Sized like a
- preset so it reads as the seventh option — "or type your own" — not an afterthought.
- A −/+ pair flanks the number for 0.5-step nudging without leaving the sheet, coloured
- by the band the current value falls in (the same colour the presets and the row cell
- use); tapping the number itself still types an exact value. */}
- <div className="effpick-free" style={curColor ? { borderColor: curColor } : undefined}>
- <span className="effpick-free-l">{t('Exact {0}', EFFORT[kind].hd)}</span>
- <div className="effpick-step" style={curColor ? { color: curColor } : undefined}>
- <button aria-label="Decrease" onClick={() => set(stepEffort(kind, v, -1))}><Icon name="minus" /></button>
- <NumberField className="effpick-free-in" decimal nullable value={v ?? ''}
- placeholder={EFFORT[kind].hd} onChange={nv => set(capEffort(kind, nv))} />
- <button aria-label="Increase" onClick={() => set(stepEffort(kind, v, 1))}><Icon name="plus" /></button>
+ <div className="item menu-item effpick-free">
+ <div className="grow"><div className="tt">{t('Exact {0}', hd)}</div></div>
+ <div className="stp effcell-stp"
+ style={curColor ? { color: curColor, background: `color-mix(in srgb, ${curColor} 20%, var(--surface-2))` } : undefined}>
+ <button aria-label="Decrease" onClick={() => set(stepEffort(kind, v, -1))}><Icon name="minus" /></button>
+ <span className="val"><NumberField decimal nullable value={v ?? ''} placeholder="–"
+ onChange={nv => set(capEffort(kind, nv))} /></span>
+ <button aria-label="Increase" onClick={() => set(stepEffort(kind, v, 1))}><Icon name="plus" /></button>
+ </div>
</div>
- <span className="effpick-free-unit">{EFFORT[kind].hd}</span>
</div>
- <div style={{ height: 10 }} />
- {v != null && <Button variant="ghost" className="dim" icon="xmark" onClick={() => commit(null)}>{t('Clear rating')}</Button>}
+ {v != null && <>
+ <div style={{ height: 10 }} />
+ <Button variant="ghost" className="dim" icon="xmark" onClick={() => commit(null)}>{t('Clear rating')}</Button>
+ </>}
<div style={{ height: 4 }} />
</>
}
diff --git a/website/api.html b/website/api.html
index 3a8a7b30e..528e6bc5a 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.3).
+ Built by scripts/build-api-docs.mjs from api/openapi.yaml (openGym API v1.3.4).
Regenerate with: node scripts/build-api-docs.mjs -->
<html lang="en">
<head>
@@ -232,7 +232,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.3</span>
+ <span>openGym v1.3.4</span>
<span>28 endpoints</span>
<span>AGPL-3.0-or-later</span>
</p>