Commit Graph
100 Commits
Author SHA1 Message Date
Duarte Santos 5a1f1d673f Merge merge request !1 (equipment profiles) 2026-08-25 14:03:32 +02:00
Duarte Santos f5b215f109 import: fix the gravl column aliases so they can actually match
mapHeader normalises the header before comparing ('Weight (kg)' -> 'weight
kg') but matches the alias list raw, so an alias written with parentheses
never matches. Three of the added ones were dead entries whose normalised
twin was already in the table; 'set duration (sec)' had no twin, so gravl's
per-set duration was dropped and its cardio rows skipped entirely.

Also moves that column from "time" to "seconds", which is what it is:
toMinutes() would have read gravl's 22 seconds as 22 minutes.

Adds the gravl sample from the merge request as a regression test.
2026-08-25 14:01:45 +02:00
Duarte Santos 880a9c184e Merge remote-tracking branch 'mrq/21' into integrate2 2026-08-25 14:00:13 +02:00
Duarte Santos 669756a6dd exercise search: cache the normalised haystack per exercise
matchExercise rebuilt an NFD-normalised corpus for all ~1300 catalogue
entries on every keystroke (~8ms desktop, several times that on a phone).
Cache it in a WeakMap keyed by the i18n version so a language switch
rebuilds the translated terms, and custom exercises re-cache on their own
because the store hands out fresh objects on update.
2026-08-25 14:00:13 +02:00
Duarte Santos 1bd69c75ff Merge remote-tracking branch 'mrq/13' into integrate2 2026-08-25 13:59:18 +02:00
Duarte Santos 0d3ddabc96 Merge remote-tracking branch 'mrq/17' into integrate2 2026-08-25 13:58:59 +02:00
Duarte Santos 142b444c8f Merge remote-tracking branch 'mrq/14' into integrate2 2026-08-25 13:58:59 +02:00
Duarte Santos 39577f6f2e Merge remote-tracking branch 'mrq/18' into integrate2 2026-08-25 13:58:59 +02:00
Duarte Santos f8024d344d website: Download auf v1.2.9, jetzt die aus der CI
Erste APK, die nicht von Hand gebaut wurde. Zertifikats-Fingerprint gegen den
alten 1.2.8-Build und den Keystore geprueft - identisch, Updates installieren
sich also ueber bestehende Installationen.
2026-08-23 22:03:23 +02:00
Duarte Santos cc036406dc website: die Issue-Zahl kam anonym als undefined zurueck
Die GitLab-Projekt-API liefert einem nicht eingeloggten Aufrufer nur star_count
und forks_count - open_issues_count gibt es dort nur mit Session. site.js hat es
trotzdem gelesen und damit "undefined" in die Kachel geschrieben.

Die Zahl steht stattdessen im X-Total-Header des Issues-Endpunkts, und GitLab
fuehrt den in Access-Control-Expose-Headers, der Browser darf ihn also lesen.
Schlaegt der Aufruf fehl, bleibt der Platzhalter stehen statt einer leeren
Kachel.
2026-08-23 21:36:04 +02:00
Duarte Santos 02b02de1b2 CI: PUBLISH_LATEST auch aus per API gestarteten Pipelines
Die Regel pruefte nur auf source == web. Ueber die API gestartet ist die Quelle
"api", der Job lief dann nur zufaellig mit - naemlich ueber die
Default-Branch-Regel, waehrend das Script die Variable trotzdem sah.
2026-08-23 21:31:31 +02:00
Duarte Santos ba7ad8423f CI: latest auch ohne Release veroeffentlichen koennen (PUBLISH_LATEST)
Die docker-compose.yml im Repo zeigt auf :latest, aber latest entsteht nur aus
einem v*-Tag - bis zum ersten GitLab-Release laeuft ein `docker compose pull`
also ins Leere. Das war ein Fehler im Umzug.

Eine von Hand gestartete Pipeline mit PUBLISH_LATEST=1 baut jetzt genau wie ein
Tag: multi-arch, latest, X.Y und X.Y.Z, Version aus frontend/package.json. Der
Weg wird ohnehin gebraucht, sobald ein Basis-Image eine CVE fixt und latest
nachziehen muss, ohne dass sich am Code etwas geaendert hat.
2026-08-23 21:28:28 +02:00
Duarte Santos 24b61c2411 Den signierten APK auf GitLab legen und von README und MOBILE.md verlinken
Bis die Release-Pipeline laeuft, gab es auf GitLab keinen APK zum Laden. Der
aktuelle signierte Build (1.2.8, derselbe, den die Website ausliefert) liegt
jetzt in der Generic Package Registry unter opengym-android/1.2.8/ - genau dem
Pfad, den der build:apk-Job spaeter selbst befuellt. Daneben die .sha256:
sideloaden heisst, dass niemand die Datei fuer dich geprueft hat.

Anonym ladbar, ohne Login - nachgerechnet, die Pruefsumme des heruntergeladenen
Exemplars stimmt mit der lokalen ueberein.
2026-08-23 21:08:54 +02:00
Duarte Santos dc765083fe Buy-Me-a-Coffee-Badge oben, und den toten Sponsor-Verweis ersetzen
Der grosse gelbe Button stand schon unten in der README, aber der Satz darueber
schickte Leute zum "Sponsor button at the top of the page" - das war GitHubs
FUNDING.yml-Knopf, den es auf GitLab nicht gibt. Stattdessen jetzt ein Badge in
der Kopfzeile neben dem Discord-Badge, und der Satz zeigt dorthin.
2026-08-23 20:50:06 +02:00
Duarte Santos 2b3ffad314 Discord ueberall dort verlinken, wo Leute nach Hilfe suchen
Der Server war nur auf der Website verlinkt - im Repo selbst nirgends, obwohl
dort inzwischen das meiste passiert. Jetzt: Badge und eigener Punkt im
Community-Abschnitt der README, erste Zeile der Tabelle in CONTRIBUTING, und ein
Hinweis in der Frage-Vorlage.

Mit der Trennung, die der Sache entspricht: Discord fuer die schnelle Frage,
Issue fuer alles, was der Naechste ueber die Suche finden koennen soll - und
Exploits gehoeren in keines von beiden, sondern in ein vertrauliches Issue.

Statischer Badge, kein Live-Zaehler: das Server-Widget ist aus, shields.io wuerde
sonst "widget disabled" anzeigen.
2026-08-23 20:47:21 +02:00
Duarte Santos d1c2247e82 CI: auf einem Release-Tag ohne Signing-Key abbrechen
Ein Release darf keinen APK ausliefern, den niemand installieren kann. Fehlt auf
einem v*-Tag ANDROID_KEYSTORE_B64, ist an den geschuetzten Variablen etwas kaputt
- dann soll der Job scheitern statt still eine unsignierte Datei zu bauen.
2026-08-23 20:25:12 +02:00
Duarte Santos d2035e0562 CI: Renovate als Dependabot-Ersatz, geplante Pipelines bauen nichts mit
GitLab hat kein Dependabot, also laeuft Renovate als Job - aber nur in einer
*geplanten* Pipeline (monatlich, 1. um 04:00), damit es nie mit einem Push um
Runner-Minuten konkurriert. renovate.json uebernimmt die Politik aus
.github/dependabot.yml eins zu eins: monatlich, pro Oekosystem gruppiert, Majors
einzeln, ungerade Node-Majors raus, android/ und ios/ folgen den @capacitor/*-
Paketen statt eigene Bumps zu bekommen.

Damit die geplante Pipeline nicht nebenbei die Suite laufen laesst und die
edge-Images neu schiebt, haben test, build, apk und pages jetzt eine
"schedule -> never"-Regel.
2026-08-23 20:21:56 +02:00
Duarte Santos f38036fab6 CI: SHA256 zum APK veroeffentlichen, Pages-URL richtigstellen
Ein per Sideload installierter APK ist von niemandem geprueft worden, also soll
die Pruefsumme daneben liegen statt gar nicht zu existieren: das Release haengt
jetzt openGym-<ver>.apk.sha256 mit an.

Pages laeuft unter GitLabs "unique domain" (opengym-bc111a.gitlab.io);
duartesantos8.gitlab.io/opengym/ leitet mit 308 dorthin um.
2026-08-23 20:18:02 +02:00
Duarte Santos b2ee031cf1 CI: buildx den dind-Daemon ueber einen benannten Docker-Kontext geben
"could not create a builder instance with TLS data loaded from environment" -
der docker-container-Treiber liest DOCKER_HOST + DOCKER_CERT_PATH nicht direkt.
`docker context create tls-environment` friert genau diese Umgebung als Kontext
ein, und darauf laesst sich der Builder anlegen.
2026-08-23 20:12:07 +02:00
Duarte Santos 925190109f Umzug nach GitLab: CI/CD fuer Tests, Images, APK, Pages und Releases
gitea.com hat keinen Actions-Runner, also gab es dort seit dem Umzug weder
Container-Images noch einen gebauten APK noch gruene Tests auf Merge Requests.
GitLab kann alles vier, also zieht das Projekt dorthin um.

.gitlab-ci.yml deckt die komplette Kette ab:
- test: Frontend-Suite (346 Tests), Locale-Checks, Fatigue-Probe, MCP-Suite
- build: api- und web-Image nach registry.gitlab.com/duartesantos8/opengym/*,
  auf v*-Tags amd64+arm64 mit latest/X.Y/X.Y.Z, sonst amd64 als edge
- package: signierter APK (zipalign + apksigner) plus Upload in die Generic
  Package Registry; der Key liegt in geschuetzten CI-Variablen und existiert
  damit nur auf main und v*-Tags
- deploy: der Browser-Demo-Build auf GitLab Pages
- release: GitLab-Release mit dem passenden CHANGELOG-Abschnitt und Links auf
  APK und Images

GitHub konnte "Tag gepusht" von "Release veroeffentlicht" unterscheiden und hat
Images nur aus letzterem gebaut (Issue #87). GitLab kann das nicht - dort ist die
Tag-Pipeline das, was das Release anlegt. Die Regel steht deshalb als Kommentar
im CI-File, und v*-Tags sind geschuetzt.

Ausserdem: Issue-/MR-Vorlagen unter .gitlab/, und saemtliche Repo-Links in
README, Docs, App, Dockerfile-Labels, docker-compose und Website zeigen auf
GitLab. site.js liest Sterne und Releases jetzt aus der GitLab-API (andere
Feldnamen, deshalb neue sessionStorage-Keys). SECURITY.md hat wieder einen
privaten Meldeweg: ein vertrauliches Issue.

.github/ und .gitea/ bleiben liegen - Spiegel bzw. fuer den Tag, an dem das
GitHub-Konto zurueckkommt.
2026-08-23 20:10:07 +02:00
Duarte Santos 8b99a644ed Release v1.2.9: Aktivitaetslog im Admin-Dashboard, Demo wieder online
Wer sich anmeldet, wer es vergeblich versucht und was ein Admin aendert, stand
bisher nirgends — der Server hat schlicht nichts protokolliert.

Aktivitaetslog:
- ./data/audit.log, eine JSON-Zeile pro Event, angehaengt statt neu geschrieben.
  Bewusst NICHT in db.json: die Datei wird bei jedem Save komplett neu geschrieben,
  und der Login-Handshake ist unauthentifiziert — ein Log darin haette aus einem
  Muell-Request einen vollen Rewrite gemacht.
- Aufbewahrung ist eine Obergrenze, kein Archiv: AUDIT_MAX (5000) bzw. AUDIT_DAYS (90).
- Per Default an (AUDIT_LOG=0 schaltet es ganz ab). IP-Adressen per Default AUS;
  AUDIT_IP=net speichert nur das Netz, full die ganze Adresse. Nie der User-Agent,
  nie die Passkey-ID eines Fehlversuchs, nie ein abgelehnter Invite-Code.
- Adresse kommt aus CF-Connecting-IP, dann X-Forwarded-For, dann X-Real-IP —
  ein Cloudflare-Tunnel schreibt den Besucher NICHT in XFF, dort steht sonst nur
  der Tunnel selbst und sieht dabei voellig plausibel aus.
- Loeschen wird selbst protokolliert, die Event-IDs zaehlen weiter: die Luecke bleibt sichtbar.
- Neue Karte in views/Admin.jsx (Filter, "Show more"), Aufbereitung in lib/audit.js
  mit 20 Tests. GET /api/admin/audit und POST /api/admin/audit/clear, beide hinter requireAdmin.

Demo:
- Die Live-Demo laeuft wieder, jetzt auf der Projektseite selbst statt auf GitHub Pages:
  opengym.duarte-santos.ch/demo/. Das eingebettete Telefon auf der Startseite geht damit auch
  wieder — es muss derselbe Host sein, X-Frame-Options ist SAMEORIGIN.

Doku: README-Config-Tabelle, .env.example, SELF_HOSTING, SECURITY (inkl. der
api/server.js-Zeilenverweise, die wieder stimmen).
2026-08-23 16:12:35 +02:00
Duarte Santos e709f152c8 website: Download-Seite auf v1.2.8 (APK vom 19.08. mit der Back-Geste ist live) 2026-08-22 15:37:17 +02:00
Duarte Santos c2e41937cb Release v1.2.8: Umzug nach gitea.com, Android-Back-Geste, Medien-Lizenz, Umami
Die Sammelversion fuer alles seit v1.2.7: der Umzug nach gitea.com (Images,
Klon-URL, Anlaufstellen, CI), die Zurueck-Geste auf Android via @capacitor/app,
die richtiggestellte Medien-Lizenz und die Umami-Zaehlung auf der Website (im
Frontend nur, wenn beim Build gesetzt -- selbstgehostet bleibt telemetriefrei).

api/package.json auf 1.2.8 nachgezogen; frontend/package.json und
android/build.gradle standen schon auf 1.2.8.
2026-08-22 15:32:04 +02:00
Duarte Santos 6dfb36c46a Lizenz der Uebungsmedien richtiggestellt: MIT-Metadaten, Bilder (c) Gym visual
"exercise data from hasaneyldrm/exercises-dataset (CC)" stand ueberall -- im
README, in NOTICE.md, auf der Website, in den Settings, im compose-File und im
fetch-Script. Der Upstream lizenziert aber zwei Haelften unterschiedlich: Namen,
Attribute und Anleitungstexte sind MIT, die Bilder und GIFs sind (c) Gym visual
und liegen dort mit einer nicht uebertragbaren Erlaubnis.

- NOTICE.md trennt die beiden Teile, zitiert die MIT-Lizenz im Wortlaut und
  nennt die Gym-visual-Terms
- README/Website/Settings sagen jetzt MIT + (c) Gym visual statt "CC"
- compose und fetch-media.sh drucken die Herkunft beim Download, damit es auch
  sieht, wer die Doku nicht liest

An der Nutzung von openGym aendert das nichts: die Medien lagen nie im Repo, in
der History, im Image oder im APK -- jede Instanz laedt sie beim ersten Start
vom Upstream. An der Weiterverwendung der Medien schon: dafuer braucht es eine
eigene Lizenz von Gym visual.
2026-08-22 15:32:04 +02:00
Duarte Santos c588d219ba website/: den Stand nachgezogen, der seit dem GitHub-Ausfall live ist
Die Seite auf opengym.duarte-santos.ch wurde am Ausfalltag direkt im dist bearbeitet,
die Quelle hier blieb auf dem alten Stand: GitHub-Links, GitHub-API fuer die Zaehler,
Demo-iframe auf die tote Pages-Instanz.

Uebernommen: Hinweisblock zur Sperre auf allen drei Seiten, Links und Zaehler auf
gitea.com (site.js liest jetzt stars_count/open_issues_count und die Releases von
dort), Discord-Abschnitt, Demo-Sektion als "Temporarily offline" mit Verweis auf APK
und Selfhosting, dazu die neuen Styles und der Umami-Tag der Website.

Die Zeitleiste auf about.html fuellt sich, sobald hier Releases stehen - die
Release-API von gitea.com liefert aktuell noch nichts.
2026-08-22 13:56:26 +02:00
Duarte Santos f94fa7c0e3 Umzug nach gitea.com: Images, Klon-URL, Anlaufstellen und CI umgestellt
Das GitHub-Repo ist mit dem gesperrten Account weg, mit ihm die GHCR-Images, die
Pages-Demo und die Discussions. Alles, was jemand zum Selbsthosten anklickt, zeigte
aber weiter dorthin.

- docker-compose zieht jetzt gitea.com/duartesantos/opengym-{api,web}; die
  Dockerfile-Labels (source/url/documentation) ebenso
- README, SECURITY, CONTRIBUTING und docs/SELF_HOSTING zeigen auf gitea.com.
  Discussions gibt es dort nicht: Fragen und Ideen laufen als gelabelte Issues,
  Security-Meldungen ueber eine Issue-Anfrage nach einem privaten Kanal statt
  ueber GitHubs Advisories
- Badges auf die Gitea-Shields umgestellt, die tote Pages-Demo aus dem Kopf
  genommen (die APK bleibt der Weg zum Ausprobieren)
- .gitea/workflows: Tests und Docker-Publish, weiter mit Release- statt
  Tag-Trigger. Kein type=gha-Cache, den gibt es auf den Gitea-Runnern nicht;
  der Push braucht ein Repo-Secret PACKAGES_TOKEN mit write:package
- .gitea/ISSUE_TEMPLATE mit denselben Formularen wie auf GitHub
- .github/* bleibt unangetastet, falls der Account zurueckkommt

Die alten Issue-/PR-Nummern im CHANGELOG bleiben als reiner Text stehen - sie
zeigen auf ein totes Repo und passen nicht auf die Nummerierung hier.
2026-08-22 13:54:26 +02:00
Duarte Santos 4b25a80356 Analytics: Umami auf der Website, im Frontend nur wenn beim Build gesetzt
website/: fester Umami-Tag fuer opengym.duarte-santos.ch (Landing/About/Docs).
frontend/: vite-Plugin injiziert den Tag NUR wenn VITE_UMAMI_SRC und VITE_UMAMI_ID
beim Build gesetzt sind — ein normales 'npm run build' und damit jede
selbstgehostete Instanz bleibt telemetriefrei.

(Die Download-Zeile auf v1.2.7 lag schon uncommitted im Baum und faehrt mit.)
2026-08-20 15:44:59 +02:00
Duarte Santos 19a441d93e Android-Back: @capacitor/app verdrahtet, Zurueck-Geste beendet die App nicht mehr
Capacitor 7 behandelt Zurueck gar nicht selbst, das macht @capacitor/app -- das
Plugin fehlte, also lief jede Zurueck-Geste an der WebView vorbei direkt in
finish(). Die History-Eintraege pro Sheet (#63) haben nur im Browser gewirkt.

Neu: lib/back.js entscheidet Sheet -> Seite -> zweimal Zurueck zum Beenden
(exitApp, weil das Plugin mit registriertem Listener nie mehr selbst beendet),
gesperrte Sheets schlucken Zurueck weiterhin. Version auf 1.2.8/versionCode 9.
2026-08-19 16:30:32 +02:00
Duarte Santos 9007aeefb6 Release v1.2.7: compose reicht BACKEND/NGINX_PORT/PORT durch, Doku und Website nachgezogen, neue Screenshots 2026-08-18 15:33:02 +02:00
Duarte Santos 71b22b3216 Changelog: Unreleased-Abschnitt fuer die gemergte Backlog-Runde 2026-08-18 12:26:34 +02:00
Duarte Santos 5bf149e60b i18n: Checker fuer Quell-Strings, die in KEINEM Pack stehen (check-locales sieht die nicht) 2026-08-18 12:11:51 +02:00
Duarte Santos c17632ea3d Superset-Flow: High-Water-Marken nach dem Entfernen einer Uebung neu setzen, api.js im Test gemockt 2026-08-18 12:08:15 +02:00
Duarte Santos aac6b185ec Merge remote-tracking branch 'pr/80' 2026-08-18 12:03:38 +02:00
Duarte Santos 3b720b0332 Remove-Exercise: Randfaelle abgedeckt (letzte Uebung, Zweier-Superset, cur unterhalb) 2026-08-18 12:03:31 +02:00
Duarte Santos 8fe980343d Merge remote-tracking branch 'pr/83' 2026-08-18 12:02:22 +02:00
Duarte Santos 8323e06819 Merge remote-tracking branch 'pr/94' 2026-08-18 12:00:52 +02:00
Duarte Santos 55b9dcb864 Warm-up: die vier verbliebenen Roh-Lesungen von .warmup ueber isWarmupRow, mit Regressionstests 2026-08-18 11:57:40 +02:00
Duarte Santos 76a2d3b7a5 Merge remote-tracking branch 'pr/93' 2026-08-18 11:55:28 +02:00
Duarte Santos 09baee49a7 Fatigue: linkedom bleibt (Modals-Test braucht es), Monotonie-Probe laeuft in CI 2026-08-18 11:54:55 +02:00
Duarte Santos 374f6bdadc Merge remote-tracking branch 'pr/55' 2026-08-18 11:53:13 +02:00
Duarte Santos 32c9a2380d Healthchecks: 127.0.0.1 statt localhost, konfigurierter Port statt 80, /api/health statt /api/config 2026-08-18 11:50:53 +02:00
Duarte Santos 9976b7a278 Merge remote-tracking branch 'pr/100' 2026-08-18 11:45:37 +02:00
Duarte Santos d4169690a6 Merge remote-tracking branch 'pr/85' 2026-08-18 11:44:58 +02:00
Duarte Santos 55de70ad23 i18n: neue Keys auf den Quote-Stil der Packs ziehen 2026-08-18 11:44:24 +02:00
Duarte Santos f860edd24a Merge remote-tracking branch 'pr/92' 2026-08-18 11:43:51 +02:00
Duarte Santos 329eed4ce0 CI: Images nur noch aus einem publizierten Release, nicht aus jedem Tag (#87) 2026-08-18 11:39:26 +02:00
Duarte Santos 5d7e13361c Website: Download-Zeile auf die v1.2.6-APK 2026-08-18 11:38:37 +02:00
Duarte Santos 274a0276e0 Release v1.2.6: Changelog-Datum auf den letzten Stand, Android zieht mit 2026-08-18 11:31:53 +02:00
Duarte Santos 528cb70a79 Changelog v1.2.6: Session-Supersets, Muscle-Map-Overlay, Medien-Pfade und Import-Aliase 2026-08-11 22:37:31 +02:00
Duarte Santos a7d7f5c24b Fix media paths on routine detail, map the Hevy names that fell through
Two reported bugs, both small:

exercise media (#79): IMG_BASE/GIF_BASE were relative, so on /plan/r/:id --
the app's only two-segment route -- the browser resolved them against the
route and asked for /plan/r/img/..., which nginx's extension block 404s
instead of falling through to index.html. Blank images, nothing in the
console. Absolute defaults; the VITE_* overrides are absolute already, so
the Pages demo and the mobile build are unaffected.

import aliases (#74): Treadmill, Goblet Squat, Cycling and Cable Core
Pallof Press arrived as custom exercises because no word-overlap can reach
the catalogue's names for them. Added those plus the neighbours around
them, and a test file -- matchExercise had none.

Also documents that VITE_IMG_BASE/VITE_GIF_BASE are build-time, which is
why setting them next to docker compose does nothing on a prebuilt image.
2026-08-11 22:35:43 +02:00
Duarte Santos fe585097c8 Merge remote-tracking branch 'pr/64' 2026-08-11 22:30:09 +02:00
Duarte Santos d8c734a2b6 muscle overlay: route the exercise detail tags through smOf too
#67 stopped mutating EXDB and moved the secondary-muscle additions into a
derived smOf() overlay, but ExerciseDetail still read the raw ex.sm. The
four curated row additions (0027, 0293, 0499, 0861) were silently dropped
from the detail sheet's tag row -- "rear deltoids" was the third visible
tag on all four, so the slice(0,3) did not hide it.

Caught on merge, before it shipped.
2026-08-11 22:30:04 +02:00
Duarte Santos 087ce34674 Merge remote-tracking branch 'pr/67' 2026-08-11 22:29:14 +02:00
Duarte Santos 157ca90f3b Merge remote-tracking branch 'pr/60' 2026-08-11 22:29:05 +02:00
Duarte Santos 35181af2aa Merge remote-tracking branch 'pr/48' 2026-08-07 16:24:44 +02:00
Duarte Santos 13ed730a0c Changelog v1.2.6: Muscle-Map-Recovery, Rest-Notification, Rear-Delt-Sekundaers 2026-08-07 11:35:04 +02:00
Duarte Santos 7e60ac20f2 Merge remote-tracking branch 'pr/44' 2026-08-07 11:33:51 +02:00
Duarte Santos 06a1e0a709 Merge remote-tracking branch 'pr/49' 2026-08-07 11:33:37 +02:00
Duarte Santos d99f0ef2f1 Merge remote-tracking branch 'pr/51' 2026-08-07 11:33:17 +02:00
Duarte Santos 9daf637044 Gastmodus abschaltbar: ALLOW_GUEST=0 nimmt die Tuer ohne Konto raus (#42) 2026-08-07 08:10:19 +02:00
Duarte Santos b2b3577744 Release v1.2.6: Freestyle-Sessions starten dort, wo du aufgehoert hast 2026-08-07 07:38:56 +02:00
Duarte Santos 551b072c54 MCP: die zweite Einheit an einem Tag ist erreichbar, und ein leeres 1RM sagt warum
Zwei Befunde aus dem Parity-Durchlauf gegen echte Daten. Die Arithmetik stimmte
ueberall (rund 120 Werte gegen eine unabhaengige Nachrechnung, null Abweichung)
— diese beiden nicht.

get_workout nahm `.find(x => x.d === date)`. Wer morgens hebt und abends laeuft,
hat zwei Einheiten am selben Datum, und die zweite war ueber gar keinen Weg
erreichbar: es gab nirgends eine id, und die Frage nach dem Lauf bekam die
Zahlen des Zugtrainings — vollkommen selbstbewusst vorgetragen. list_workouts
liefert jetzt `id`, get_workout nimmt `workout_id` oder `date`, und bei zwei
Treffern am selben Tag antwortet es mit beiden zur Auswahl statt zu raten.

Und `best: null` hatte zwei gegensaetzliche Ursachen in einer Form: nie
trainiert, oder immer ueber der 12-Wiederholungs-Grenze. Eine Wade, die seit
Monaten mit 15ern im Log steht, las sich damit als "keine Aufzeichnungen".
no_estimate_reason unterscheidet die beiden, und formula_note steht jetzt auch
auf diesem Zweig — bisher gab es die Erklaerung nur in der PR-Tabelle.

Drei Regressionstests dazu (36 statt 33), mcp/README zu get_workout nachgezogen.
2026-08-04 17:48:52 +02:00
Duarte Santos e007f76d43 MCP: CI laeuft ueberhaupt erstmal, und der Server ueberlebt seinen Client nicht
Fuer mcp/ gab es keinen CI-Job — weder die 33 Tests noch sonst irgendwas lief je
auf GitHub. Jetzt laeuft beides bei jedem PR, der mcp/ oder frontend/ anfasst.

Dazu der Check, den die Testsuite prinzipiell nicht machen kann: vitest loest
ueber Vite auf, also gehen dort import.meta.glob, ?raw und .jsx anstandslos
durch. Genau so kam ein Vite-only-Import in ein gemeinsames Lib-Modul und liess
33 gruene Tests ueber einem Server stehen, der beim Start starb.
check-node-loadable.mjs laeuft deshalb unter nacktem node — dass es ausserhalb
von vitest laeuft, IST der Test. Gegengeprueft: Bug wieder eingebaut → Exit 1
und history.js/progression.js/tools.js namentlich gemeldet; sauber → Exit 0.

Und der fs.watch-Handle haelt die Event-Loop offen, sobald es eine State-Datei
zu beobachten gibt — der Prozess ueberlebt damit den Client, der ihn gestartet
hat, obwohl die mcp/README genau das Gegenteil verspricht. Ein unref() reicht;
nachgemessen: mit State-Datei vorher Exit 124 (haengt), jetzt Exit 0, und der
Watcher invalidiert den Cache unveraendert weiter.
2026-08-04 16:40:03 +02:00
Duarte Santos e28345dd13 Release v1.2.5: der MCP-Server, und sonst nichts an der App
Letztes publiziertes Release war v1.2.4, also ist das hier v1.2.5 — alles seit
dem Release in EINE Nummer. Inhalt ist genau eine Sache: der optionale
MCP-Server aus PR #19 nebst dem i18n-Kern-Split, der ihn ueberhaupt erst unter
reinem Node ladbar macht.

An der App selbst aendert sich nichts. Wer keinen KI-Client benutzt, merkt von
diesem Release ueberhaupt nichts: nichts wandert in den Docker-Build, die
docker-compose.yml bleibt unberuehrt.

Kein neues APK — der Bundle-Hash bewegt sich zwar (der Modulgraph haengt jetzt
direkt am i18n-Kern), aber verhalten tut sich die App identisch. Die
Download-Zeile auf der Website bleibt deshalb bei v1.2.4.
2026-08-04 16:35:34 +02:00
Duarte Santos ba412cb36d MCP: die Lib bleibt unter reinem Node ladbar, und die Testwerte stimmen wieder
Der MCP-Server ist ein nacktes `node src/index.js` — kein Vite, kein React. PR 19
hatte dafuer den reinen Kern nach i18n-core.js gezogen; v1.2.4 hat danach in
history.js `t` wieder aus i18n.js geholt, und damit import.meta.glob ueber die
Locale-Packs plus useSyncExternalStore in einen Prozess, der beides nicht hat.
Der Server starb beim Import:

  TypeError: (intermediate value).glob is not a function

Die Testsuite konnte das nicht sehen: vitest transformiert import.meta.glob, also
liefen 33 gruene Tests gegen ein Binary, das nie startet. i18n.js re-exportiert
ohnehin genau dieses `t` aus dem Kern — history.js, mobile.js und plan-share.js
holen es jetzt direkt von dort, und mitgeschleppt wird nichts mehr.

Dazu die Werte, die der v1.2.4-Seed verschoben hat: Volumen 18500 → 18412.5
(Handsumme w×r ueber die zwanzig erledigten Saetze), Koerpergewicht 78.6 → 78.4,
Wiegung 78.5/1.5 → 78.3/1.3, Dauer 51 min → 1h 11m — samt der Zusicherung, die
sich das "N min"-Format noch fest verdrahtet hatte. Jeder Wert nachgerechnet,
nicht aus einem roten Lauf abgeschrieben.

Und das FORMULAS aus Punkt 2 des Reviews, das als einziges stehengeblieben war.
2026-08-04 16:30:34 +02:00
Duarte Santos f554b6b004 Merge pull request #19 from Pengboi/feat/mcp-server
MCP: read-only stdio server for LLM apps to query workout history

Ein Node-Prozess, den der LLM-Client selbst startet und der dieselben reinen
Helfer aus frontend/src/lib benutzt wie die Stats-Seite — also stehen dort
dieselben Zahlen. Read-only, kein Container, kein zusaetzliches Auth, nichts
verlaesst die Box. Wer keinen KI-Client benutzt, merkt nichts davon.
2026-08-04 16:30:14 +02:00
Duarte Santos 7c69e57b4f Website: the download is v1.2.4
The APK on opengym.duarte-santos.ch is the 1.2.4 build (versionCode 5, same
signing key, so it installs over 1.2.3). The meta line said 1.2.3.
2026-08-01 17:09:28 +02:00
Duarte Santos 663e0b3987 Release v1.2.4: the effort stats, and bodyweight training that knows it is
v1.2.3 is published, so this is the next patch and everything since it belongs in
this one version: the Effort card and the readings built on it, the bodyweight and
per-side work from issues #31/#32/#33, and two fixes worth naming.

Versions bumped in frontend, api and the Android module (versionCode 5). CHANGELOG
gets the release heading and a Fixed section, README two feature bullets.
2026-08-01 17:07:17 +02:00
Duarte Santos 5a0345c905 Merge bodyweight: issues #31, #32, #33 2026-08-01 17:06:31 +02:00
Duarte Santos 1e86d6ace2 Config sheet: a stepper is not a list-row accessory
Added weight sat inside a list row next to its label, which is fine for a switch
and wrong for a stepper: the control took the width it needed and left the text
column wrapping one word per line. It now gets the same full-width treatment as
sets and reps, with the explanation underneath, and reuses the "Added (kg)" label
the set table already uses.

Also stops a long value overlapping its own title in a list row — flex:none meant
"Follow the routine (Linear progression)" ran straight through "Rule", since the
title's column was already free to shrink to nothing. The value shrinks and
ellipsises instead. Pre-existing, visible in every settings row with a long value.
2026-08-01 17:00:30 +02:00
Duarte Santos a5e360cde5 Settings can register on an invite-only instance too
The sign-in screen asks for an invite code when the server says it needs one. The
same registration reached from Settings never did: it collected a name, called
passkeyRegister without the second argument, and the server refused it. On an
invite-only instance that path could not succeed at all, with nothing on screen to
explain why.

It now reads /api/config and shows the code field on the same terms, reusing the
sign-in screen's own strings so nothing new needs translating.
2026-08-01 16:52:30 +02:00
Duarte Santos 00b4f543a3 Per side stays on reps work, where reps exist
Switching a per-side exercise to Time carried `side` onto the hold: the config
sheet hides the toggle in that mode but still saved the flag, and the workout
badge then halved a rep count a timed set does not have, reading "0 per side".

Dropped at all three points it could get through — the config sheet no longer
writes it outside reps mode, the badge no longer renders outside it, and the plan
serialiser refuses it on a hold so an older file cannot bring it back.
2026-08-01 16:48:57 +02:00
Duarte Santos 4afffcb248 Per side: log the total, show the split
Feedback on #31: a rep count that sometimes means one side and sometimes both is
the ambiguity, not the fix for it. So the logged number is the total — 16 — the
same as every other set in the app, and the split is derived for planning: "8 per
side" on the exercise, "3 × 16 · 8/side" on the plan line and the printed sheet.

Unilateral targets step in twos. 16 → 18 → 20, in the config stepper, the set-row
stepper and the bodyweight rep progression, because half of an odd total is a rep
one side never gets. Turning the flag on rounds an existing target up to even, and
a saved target is stored even for the same reason. An odd total that arrives some
other way still displays honestly, as 8.5 per side, since that is what it means.

Volume loses its per-side case: both sides are already in the number logged.
2026-08-01 16:47:44 +02:00
Duarte Santos c33ff15d9d Bodyweight work, logged the way it is done
A push-up has no weight to type and the app asked for one anyway, on a quarter of
the catalogue. Issues #31, #32 and #33 are the same gap seen from three sides: the
app assumed progress lived in the load.

Two flags on the exercise config rather than two new modes, because "bodyweight"
and "per side" are equally true of a rep set and a timed hold:

  bodyweight — seeded from the equipment the dataset already records. The weight
               column is gone, the set row is one stepper, and the working-weight
               prompt stops asking about a weight that was never there. A belt
               weight reads as an addition and hands progression back to the
               normal policies, because now there is something to add.
  side       — 8 logged is 8 per side. The total is spelled out where there is
               width for it, and volume counts both sides so a routine that moved
               to single-arm work no longer halves itself on the chart.

Bodyweight progression grows reps, and now sets: a rep ceiling sends the reps back
to the bottom and adds a set instead of climbing forever, stopping at six with the
advice it should have given all along. No ceiling keeps the old behaviour exactly.

Both flags are written to a plan only when they disagree with the catalogue, and
absent reads as false, so every existing plan, workout and backup is read
unchanged.
2026-08-01 16:37:52 +02:00
Duarte Santos aefb13b544 Merge pull request #30 from DuarteSantos8/dependabot/github_actions/actions-6382876e44
Bump docker/login-action from 4.5.2 to 4.6.0 in the actions group
2026-08-01 14:49:21 +01:00
Duarte Santos 1f40230727 Dependabot: majors arrive on their own, and Capacitor waits
Grouping by ecosystem cut the noise, which was the point, but it also let a
Capacitor 7 → 8 migration turn up as "the frontend group, 7 updates" — six
routine siblings and one native-platform migration, indistinguishable in the
list. CI would have gone green on it too: the test workflow builds the web app
and never touches the mobile flavour, so the check would have been reassuring
about something it had not looked at.

Minor and patch stay grouped and quiet. Majors get their own PR per ecosystem,
where being alone is the signal.

Capacitor majors are ignored outright for now: Capacitor 8 declares Node >= 22
and the build host runs 20, and frontend/android and frontend/ios are committed,
so the upgrade also means migrating Gradle/AGP and the Podfile. That is a piece
of work to schedule, not a PR to merge. The comment says to drop the ignore once
the build host moves to Node 22.
2026-07-31 20:35:12 +02:00
Duarte Santos de65e1099a Merge pull request #28 from DuarteSantos8/dependabot/github_actions/actions-d8aa18c958 2026-07-31 19:30:56 +01:00
Duarte Santos 611987545a Dependabot: don't chase Node majors that were never LTS
The first run offered node:22-alpine → 25-alpine in both Dockerfiles. Odd
majors are Current, not LTS, and stop getting fixes about six months in — for
an image other people self-host that trades stability for nothing. Even majors
are still proposed, so 22 → 24 will show up as a PR, which is the move actually
worth reviewing.
2026-07-31 19:32:57 +02:00
Duarte Santos accc3c1038 Sessions you can actually end, and invite codes worth guessing at
SECURITY.md documented three weaknesses two hours ago. Documented is better than
hidden; fixed is better than documented.

Sessions were a signed cookie the server trusted for a year, and /api/logout
only cleared it in the browser you clicked it in — a copy left on a shared
machine stayed good until it expired, and the only way to end it was deleting
./data/secret and signing out the entire instance. The cookie payload now
carries the user's session version, and POST /api/logout/all bumps it, which
kills every cookie that account ever had. Settings grows a "Sign out
everywhere" row for it.

Cookies already in the wild have no version field. They read as version 0 and
match a user who has never bumped, so nobody is signed out by this deploy and
db.json needs no migration — sv appears lazily on the first bump. Verified
against a server running the new code with a db.json shaped like the live one.

Session default drops from 365 days to 90, overridable with SESSION_DAYS. The
expiry is baked into each cookie when issued, so lowering it never cuts an
existing session short.

Invite codes go from 32 to 64 bits. The app has no rate limiting by design and
/api/register/options answers whether a code is valid, so the code itself has to
be the part not worth guessing. Existing codes still work — validation is an
exact string compare. Unused old ones are worth revoking and reissuing.

What did not change: no rate limiting, still the reverse proxy's job, still the
first caveat in SECURITY.md. requireUserVerification stays false — raising it
could refuse passkeys that already exist, which is a lockout, not a fix.
2026-07-31 19:32:57 +02:00
Duarte Santos 1574811af0 Wake-lock test: stop assigning to a global Node now owns
The first CI run found this, which is the point of having one. Node 21+ defines
globalThis.navigator itself as a getter with no setter, so `globalThis.navigator
= {...}` throws under ESM strict mode. This box runs Node 20, where the global
does not exist and the assignment is fine — the test has never failed locally
and never would.

Only the first test failed: its afterEach deletes the built-in accessor, so
every later test assigned cleanly against the hole it left. defineProperty works
on both runtimes.

Production images are node:22-alpine (web/Dockerfile, api/Dockerfile), so the
version CI runs is the right one and the test was what needed fixing.
2026-07-31 19:21:03 +02:00
Duarte Santos b45dbca2a6 Demo: rate the sets, so the demo shows the effort stats
The live demo is the shop window, and it was the one place the new Effort card
could not appear — demoSeed fabricated twelve weeks of training with no ratings
at all, so every chart that reads effort rendered empty or absent.

The seed now rates about 82% of finished sets, deterministically as before:
effort tracks position in the session and the block's progression, one deload
week sits well away from failure, the first three weeks are written in RPE as if
imported from another app, and one exercise stays unrated throughout so the
partial-coverage case is visible rather than theoretical. Only reps-mode sets
are rated — a reps-in-reserve number on a cardio set would be nonsense.
2026-07-31 19:12:18 +02:00
Duarte Santos 3a120df205 A security policy, and dependency updates that stay quiet
openGym ships passkeys, a signed session cookie and an admin dashboard, and
people run it on the open internet. Until now someone finding a hole had no
option but a public issue.

SECURITY.md documents the model as it actually is, verified against server.js
rather than described from memory: what the session cookie is and how long it
lasts, that it cannot be revoked individually, that ./data is unencrypted and
its holder can mint a session for any account, that there is no rate limiting,
and what changing RP_ID costs. A self-hoster deciding whether to run this for
other people deserves that list up front.

Dependabot is monthly and grouped one PR per ecosystem — a default setup on a
solo project produces noise that stops being read, which is the opposite of the
point. Android/iOS are left out on purpose: Capacitor pins those to the npm
packages, so bumping them separately breaks the mobile build.

Also: api/ has had two dependencies since notifications landed. CONTRIBUTING
still claimed one.
2026-07-31 19:12:18 +02:00
Duarte Santos 051a37abbf CI: actually run the tests, and hold the locales to one key set
There are 159 unit tests and nothing ran them. Both existing workflows fire on
push to main only, so the two outside pull requests merged so far were reviewed
by eye alone. This runs the suite, the build and a locale check on every pull
request.

The locale check exists because of a bug that shipped last week: a feature added
17 strings to de.js only, and the other ten languages fell back to English
mid-sentence with nothing failing anywhere. The checker compares every locale
against the union of all keys, so a string added to one file flags the other ten
instead of passing unnoticed.
2026-07-31 19:12:18 +02:00
Duarte Santos 8440cf3546 Changelog: the effort stats, under Unreleased
v1.2.3 is published, so this is the start of the next version rather than an
amendment to that one — it stays under Unreleased until there is a release to
fold it into.
2026-07-31 19:00:42 +02:00
Duarte Santos b0d176aba3 Merge branch 'effort-stats': the effort ratings, read back as statistics
Sets have carried an RIR/RPE rating since v1.2.3, but nothing ever read it
back — the number lived in the set label and nowhere else. This is the other
half: a trend per week, the spread across the scale, the share of sets taken
near failure, a hard-sets mode on the muscle map, and the rating riding along
on each exercise's own curve.
2026-07-31 18:49:41 +02:00
Duarte Santos 42ac8c8513 Send questions to Discussions, and put a Sponsor button on the repo
Discussions has been enabled since the start and empty since the start, so
every question arrives as an issue — the tracker is carrying design debates and
"how do I" alongside actual bugs, and the answers end up buried in closed
issues where the next person searching won't find them.

The "New issue" screen now offers Q&A, Ideas and Show-and-tell before the
templates, which is where that traffic gets intercepted; README and CONTRIBUTING
say the same thing in a table.

FUNDING.yml does nothing until the account is enrolled in GitHub Sponsors —
GitHub simply doesn't render the button. Stated plainly next to it: openGym is
AGPL, there is no paid tier and nothing is held back for sponsors. A project
that starts selling access to its maintainer stops being the thing people
starred.
2026-07-31 18:43:15 +02:00
Duarte Santos f232b5ba7e Effort stats: the other ten languages, and drop what nothing calls
The card shipped translated into German only, so every other UI language fell
back to the English source strings mid-sentence — the locale files have been
key-for-key identical until now, and they are again (607 each).

exerciseEffort() had no caller: Stats builds its per-exercise curve from the
points it already has, which are filtered by training mode, so the library
version would have drawn a different set of sessions. Removed with its tests
rather than left as a second answer to the same question.
2026-07-31 16:55:21 +02:00
Duarte Santos caaf61d91e Stats: read the effort back — trend, distribution, hard sets, per exercise
Rating a set only paid off inside the set label until now: Stats never looked at
rir/rpe at all. It reads them now, in four places.

lib/effort.js aggregates everything in RIR and converts back to whichever scale the
profile reads. A history that mixes the two — own logs in RIR, an imported file in
RPE — has to average as one series or every chart draws half the data, and RIR is the
internal unit because its zero is real where RPE's floor of 6 is a convention.

- an Effort card: average and share of sets taken near failure, the week-by-week curve
  with the week's volume in the tooltip, and where the sets land on the scale
- the muscle map gains a hard-sets mode: a muscle can lead on volume and still never
  be trained near failure
- Exercise progress carries effort on the top-set dots and as a curve of its own — the
  same weight with more left in the tank is progress a weight-only line draws flat
- LineChart learns an inverted axis (RIR counts down as it gets harder) and per-point marks

Every number carries how much of the training it speaks for: rating is optional and off
by default, so an unrated set is left out rather than read as failure, and an average
waits for five rated sets before it claims to be one.
2026-07-31 16:17:08 +02:00
Duarte Santos 4c829b6d1f Release v1.2.3: fold in the screen lock, the rest timer and the settings grouping
v1.2.3 was tagged but never published, so everything since v1.2.2 -- the last
published release -- belongs in this one version rather than a new number.

CHANGELOG gets the three new sections, README a feature bullet, SELF_HOSTING a note
that the Wake Lock API wants HTTPS (or localhost) like passkeys do and that iOS
refuses it in Low Power Mode. Website: the APK line said v1.2.2 while the download is
1.2.3, and the feature grid gained the screen-awake card.
2026-07-31 15:35:36 +02:00
Duarte Santos c5e131f81c Rest timer: take 15 seconds off, not only add them
addRest now accepts a negative step, and taking off more than is left finishes the
rest instead of counting into the negative -- which also kept a negative duration out
of the progress bar and out of the server-side push schedule.

Three controls and the clock do not fit one line on a phone: at 360px the bar was
left with about 30px and stopped saying anything. The rest variant stacks -- clock and
bar on top, controls beneath, -15 and +15 together in number-line order, Skip pushed
to the far edge so the button that ends the rest is not next to the one you tap to buy
more time. Scoped to #timer.rest, so the work timer keeps its single row. Back to one
line at >=1000px, and the card is nearly opaque now -- the set rows underneath were
reading through it.
2026-07-31 15:35:27 +02:00
Duarte Santos 248da53dca Keep the screen awake while a workout is running
Locking and unlocking the phone between every set was the worst part of logging on
one. Settings -> During a workout -> Keep screen awake, on by default; the lock is
held only while S.active exists, so it follows the workout rather than the route and
lets go when you finish.

The browser drops the lock whenever the document stops being visible, which is what
happens the moment you glance at a message, so wakelock.js keeps its own 'wanted'
intent and re-acquires on every visibilitychange. It also releases a sentinel that
arrives after a release landed mid-request, and swallows the rejection iOS gives in
Low Power Mode. Where the API is missing the row shows disabled instead of offering
a switch that does nothing.

Settings is regrouped by what each thing affects while the row needed a home:
General (language, units), During a workout (rest timer, keep awake, sounds, effort),
Notifications, Appearance, Data. Nothing removed, no setting changed meaning.
2026-07-31 15:35:18 +02:00
Duarte Santos 42d3659615 Release v1.2.3: effort per set, and the RPE your old app already had
Everything published since v1.2.2 is one number: the RIR column from #21 and
the RIR/RPE scale choice built on top of it, plus the importer reading the
RPE that Hevy and Strong export.

Changelog, README, roadmap and the website all describe the feature as it
actually shipped — a rating that is optional, keeps its scale per set, and
is deliberately not an input to progression or the 1RM estimate.

Android versionCode 4: it has to increase strictly or the APK will not
install over the v1.2.2 build already out there.
2026-07-31 00:16:43 +02:00
Duarte Santos ca917f0320 Merge branch 'effort-metric': effort per set (RIR / RPE)
Adds an optional per-set effort rating on either of the two scales people
actually use, generalising the RIR column from #21 rather than bolting a
second one next to it, and teaches the importer to read the RPE that Hevy
and Strong already export.
2026-07-31 00:14:51 +02:00
Duarte Santos 54fb14be13 Import: bring the RPE other apps already recorded
Hevy and Strong both write an RPE next to every set and the importer was
dropping the column, so a history imported from either arrived flatter than
the file it came from. It is read now, along with an RIR column if a file
happens to have one.

A blank cell stays unrated rather than becoming 0, and a written-out 0 is
only a rating on the RIR scale — RIR 0 is a set taken to failure, while RPE
runs 1-10, so an app writing 0 there means "nothing here" and reading it as
an effort would stamp one on every unrated set in the file. Ratings above
the scale are capped rather than thrown away, junk is ignored, and effort
only rides along on weighted rep sets — a treadmill row has nowhere to show
it. A file carrying both columns is read as RIR, the precedence setLabel
already reads them back with.

The import summary reports how many sets brought a rating, and says where
to switch the column on when the profile is not logging effort yet —
otherwise the ratings arrive invisibly and look like they were lost.

Export needed no change: the backup is the whole state serialised, so both
fields and the setting travel with it. There is a test pinning that now,
along with 11 for the import paths.
2026-07-30 23:59:01 +02:00
Duarte Santos 6905117352 Effort stepper: count up from the bottom of the scale
The first + on an empty cell jumped straight to a "typical working set"
(RIR 2 / RPE 8), skipping 0 and 1 with no way to see why. A stepper that
lands somewhere other than where counting would take you is just puzzling,
so it now starts at the bottom of the scale and walks up in even steps like
every other stepper in the app: RIR from 0, RPE from 6 — the scale is only
meaningful for working sets and anything lighter is a warm-up nobody rates.

Stepping back off the floor clears the cell again, so a mistap is undoable
instead of sticking at 0 — which on the RIR scale claims the set went to
failure. − on a cell that was never filled in still leaves it empty.

The stepping moved out of the view into stepEffort/capEffort in history.js,
where it can be tested: 16 new cases covering the scale walk, the floor and
ceiling, the clear-on-undershoot, half-step rounding, junk settings values,
the showRir overlay every load path performs, and a session's worth of
logging end to end.

A typed value is still only capped, never floored — clamping up would turn
the "1" of "10" into the floor and fight the input.

The help sheet no longer claims the highlighted row is where + starts; it is
where working sets usually land. Reworded in all 11 language packs.
2026-07-30 23:52:57 +02:00
Duarte Santos 0c6c22c04b Effort help: show the two scales as one table, (i) before the control
The sheet explained RIR and RPE in three paragraphs, which is a bad way to
say "these are the same judgement counted from opposite ends" — you had to
hold both sentences in your head to see the correspondence. A conversion
table shows it in one look: RIR and RPE in fixed tabular columns you can
read straight down, the feel in words next to them, and the row a working
set usually lands on highlighted in the accent.

The table is built from the same parts as the app's grouped lists (surface
fill, inset hairlines) instead of a real <table>, so it inherits the card
look and wraps on a narrow phone.

The (i) moves ahead of the segmented control: you reach the explanation on
the way to the choice rather than past it.

The three paragraph strings are replaced by the table's strings in all 11
language packs.
2026-07-30 23:42:21 +02:00
Duarte Santos 4e27461b7e Effort per set: RIR or RPE, whichever scale you think in
The RIR column becomes a three-way setting (Off / RIR / RPE). Both scales
measure the same judgement from opposite ends — RPE 8 is RIR 2 — so they
share one column and one stepper, but keep their own field on the set.

A set is never silently rewritten into the other scale: switching the
setting changes what new sets ask for, and old sets still read back with
the scale they were logged with.

Profiles carrying the old showRir boolean keep their column (effortOf
falls back to it until the new setting is chosen), so a backup or another
device that still has the flag does not lose the column.

The steppers now know the scale: the first + lands on a typical working
set (RIR 2 / RPE 8) instead of the end of the scale, and typed values are
capped at 10 — there is no RPE 12.
2026-07-30 23:35:47 +02:00
Duarte Santos fa978a1bb4 Merge PR #21: optional RIR column on reps-mode sets
octaviodimarco's RIR (reps in reserve) stepper for reps-mode sets, opt-in under
Settings → Units & timer, plus a fixup for the leftover RIR-0 stamp and the
header alignment.
2026-07-30 19:53:21 +02:00
Duarte Santos c08381e558 RIR: an unlogged RIR stays unlogged, and the header lines up
A set that never had an RIR could still end up carrying one: NumberField mapped an
empty field to 0 and the − button clamped to 0, so one stray tap stamped '(RIR 0)' —
went to failure — on the set for good, in history and in backups, with no way back.
An optional field now clears to null (the key is dropped), and stepping down from
empty leaves it empty. A typed 0 still logs a real 0.

The row's three-stepper sizing also has to reach the header, or the labels sit up
to 5px off the columns they name.
2026-07-30 19:53:14 +02:00
Duarte Santos ab0c98ba85 Android: versionCode 3 for the v1.2.2 APK
Same versionName — v1.2.2 was never published, so this is still that release — but the code
has to increase strictly or Android refuses to install over the build already out there.
2026-07-25 15:05:12 +02:00