Commit Graph
766 Commits
Author SHA1 Message Date
Duarte Santos ab1bfe31b6 coach: Plan-Einstieg nutzt die schon uebersetzten Coach-Strings 2026-08-07 14:48:02 +02:00
Duarte Santos a0ac473df7 Merge remote-tracking branch 'pr/54' into coach 2026-08-07 14:47:25 +02:00
root 577c86b487 derive secondary additions via smOf overlay - raw dataset never mutated 2026-08-07 13:12:42 +02:00
AlexandClaude Opus 5 4ee9a2abbf Coach: a way in, and instructions for getting there
Two gaps found by deploying the thing and then trying to use it.

The Coach had no entry point. Its three routes have existed since the UI
landed and nothing in the app linked to them — not the nav, not Home, not
Plan, not Settings. The hub's back button already pointed at /plan, so that is
where the link was always meant to be. On a configured instance the feature was
enabled, credentialed, running, and reachable only by typing the URL.

It sits behind the same coachAvailable() predicate every other Coach surface
uses, so an instance without the feature sees exactly the Plan screen it saw
before.

And there were no setup instructions anywhere. This document said the Coach is
"off until an admin turns it on" and then never said how to turn it on: ten
sections on what it does and why it is safe, nothing on the four steps that get
you from a running instance to a working Coach. .env.example has no Coach knobs
and SELF_HOSTING mentions it only in the backup caveat, so there was nowhere
else to look either.

The new section covers building the target that has a runtime in it, minting a
token with `claude setup-token`, connecting and testing it on the admin card,
and where a user starts. It also warns up front about the thing a multi-profile
instance discovers the hard way: in instance mode the credential binds to the
first profile that spends it and every other profile is refused by design, so
one person gets the Coach and the rest get a refusal.

api 72/72, frontend 404/404, build clean, 11 locales in sync.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 11:45:45 +01: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
root d0075eeddf rest notification: service-worker path for Android, use existing string 2026-08-07 09:10:43 +02:00
root 86f3476f5f fatigue: saturating volume-based model, no window cliff, reachable level bands 2026-08-07 09:02:38 +02:00
AlexandClaude Opus 5 ef61df50f2 Coach: the Codex provider, and a credential that stays out of your backups
The Codex CLI adapter, its runtime and sandbox in the coach image only, and the
one placement decision this PR exists to get right.

Codex keeps a refreshable sign-in cache of its own rather than taking a token on
the environment, so it needs somewhere durable to write. That is ./coach-auth —
a sibling of ./data, never a folder inside it, mounted separately, owned by
`coach`, mode 0700.

The placement is the point. docs/SELF_HOSTING §5 tells owners to back up with
`tar czf … data/`, so anything under ./data lands in every archive people are
instructed to produce. Workout history belongs there; a live refresh token does
not — it keeps working after that archive is copied to a laptop or a cloud
drive. Keeping the cache outside ./data is what lets the backup instructions
stay true about what they capture, and §5 now says so explicitly rather than
leaving the reader to find out.

I got to define this rather than fix it: no Codex path was ever committed here,
so the nested layout the fork had never reached this repo. A test asserts the
sibling relationship directly, because "outside ./data" is the kind of invariant
a later refactor breaks by tidying.

bubblewrap and the Codex CLI are added in the coach target only — bubblewrap is
a Codex requirement, so an owner who never opted in carries neither. The image
job now asserts both directions: present and runnable in the coach image
(codex-cli 0.147.0, bubblewrap 0.11.2, /coach-auth as coach:0700), and absent
from the default one.

Codex is usable through the existing connect route with an API key, which needs
no new surface. Its ChatGPT device-code sign-in is not in this PR — see the PR
description for what that still needs.

api 73/73, frontend 404/404, both image targets built and inspected, 11 locales
in sync at 767, library in sync at 1324.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 07:28:16 +01:00
AlexandClaude Opus 5 64fd67cfa8 Coach: the eleven locales
139 Coach keys added to each of the eleven locale files — 767 keys each, in sync.
English is the source language and has no file, so a key present in only some
locales falls back mid-sentence with nothing failing anywhere; check-locales
compares the union, which is what makes "in sync" mean something.

`{0}: rep-range ceiling` is the one string with no prior translation to draw on:
it is the counterpart of the rep-range floor label that 2/6's repsMax change
type needed. Each locale's wording is derived from its own existing floor
string rather than translated independently, so the pair reads as a pair.

Deliberately left in English: the twenty-one canned strings in coach-demo.js.
They are the demo build's fake proposal — long-form coaching prose invented to
make the public demo look alive — and they never reach a self-hosted instance;
the module is dynamically imported behind the DEMO flag precisely so none of it
lands in that bundle. Machine-grade translations of six-line paragraphs would
read worse than the English does, and the locale gate is satisfied either way
because the key set stays identical across all eleven.

frontend 404/404, build clean, 11 locales in sync at 767.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 07:25:01 +01: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
Space-Hermes 84e98425cc feat: prefill freestyle exercises from last workout 2026-08-06 19:54:36 +02:00
Space_Hermes 941d911fa9 feat: enrich common row muscle metadata 2026-08-06 19:46:18 +02:00
root 5b5d65b63e Add local notification on rest timer completion 2026-08-06 19:39:59 +02:00
root 6c91adefcd volWin: plain 90d window filter (upstream-adapted) 2026-08-06 19:17:41 +02:00
root d1cede21d3 fix dropdown label em-dash expression 2026-08-06 19:16:47 +02:00
root 9af028bde3 confirmed UI tweaks: fatigued highlighted (red/amber), strongest gold, strength scale labels, exercise list by current strength, 90d volume on strength rows 2026-08-06 19:16:08 +02:00
AlexandClaude Opus 5 ab1adcdd4f Coach: the screens, and the four things they were supposed to say
The Coach hub, the six-screen intake, the proposal review with per-change
accept/reject, and the admin card — wired into App.jsx and Admin.jsx. Nothing
renders unless the instance offers the Coach, so an admin page on a box that
never enabled it is the page it was before.

Four gaps I named earlier and owed this PR:

CoachProposal had no health disclaimer. The hub and the intake screen both
carry one; the screen where changes are actually accepted did not, which is the
one place it matters — that tap changes what somebody does with their body next
week. It sits immediately above the accept button on both proposal kinds
rather than at the top of a scrolling page, so it is on screen at the decision.

The admin card never showed whether the privilege drop can be performed. It
fails closed, so when it cannot, nothing runs at all, and the admin was left to
learn that from a user reporting silence. It now states the verdict, and the
server's own reason when the answer is no.

Whose account is being spent was not stated anywhere in the UI. Both the admin
card and the user's Coach screen have to name it, and that is only true if
neither infers it from settings — so coach-api gained the /api/coach/account
call that PR 1 built the route for and nothing had used since.

The credential UI was wired to a server shape that does not exist: it read
d.auth.state, which GET /api/admin/coach never sent, and posted to
/auth/setup-token, /auth/key and /auth/disconnect, none of which are routes.
Every credential button was dead. The card now uses the connect/disconnect
routes from 3/6, and the admin payload carries an auth summary — state, type
and account label, never the credential — with `unreadable` as its own state,
because ./data restored without its `secret` has a specific cause and a
specific fix rather than being "not connected".

Left out on purpose: the ChatGPT device-login sheet. It is Codex's, it calls
routes that do not exist, and Codex is 6/6 — so it comes back with the provider
it belongs to rather than shipping as unreachable UI here.

api 72/72, frontend 404/404, build clean, 11 locales in sync. The new strings
fall back to English until 5/6 adds them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 11:02:25 +01:00
AlexandClaude Opus 5 49be4e0626 Coach: the Claude provider, and an AI runtime you only carry if you ask
The Agent SDK adapter, its dependency, and the packaging that keeps both out
of the image an owner gets when they never wanted the Coach.

api/Dockerfile builds two targets. The default one runs `npm ci --omit=optional`
and ships no AI runtime at all (~158 MB); `--target coach` drops that flag and
adds @anthropic-ai/claude-agent-sdk (~455 MB). The SDK's runtime ships as a
per-platform package, so on this Alpine base the lockfile resolves the musl
build — the kind of thing that only fails on somebody else's machine, which is
why the new api-image CI job builds *and runs* both targets rather than merely
building them.

Both targets now create the unprivileged `coach` user. That is not a Claude
detail: canDropPrivileges() fails closed, so without it every job is refused —
including the fixture provider that exists so the loop can be walked before an
account is connected. The shipped image could not run one.

The adapter imports the SDK lazily, so an absent runtime stays an ordinary
reportable state rather than a boot crash: check() says so, isConnected() goes
false, and /api/config carries no coach key.

Four SDK options are what make this safe next to ./data — tools: [] (no Read,
no Bash, no Grep), settingSources: [], skills: [], strictMcpConfig. They are
one frozen exported object, asserted by value, so re-enabling one is a red
build rather than a quiet capability grant.

Verified against the SDK's own type definitions rather than from memory. Two
things the fork's draft had wrong: SDKResultError carries no `errors` field, so
`message.errors?.join()` was dead code and the failure reason now comes from
`subtype` and `stop_reason`; and the client-app version string was hardcoded at
1.2.3 two releases after it stopped being true, so it is read from package.json.

The credential connect/disconnect routes land here as promised in 2/6 — they
serve a credential, and until this PR there was no provider that had one.
authMode and the per-profile pair still wait for the side that consumes them.

api 72/72 on macOS and on Linux as uid 65534 with the SDK absent; both image
targets built and run; library in sync at 1324.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 10:46:28 +01:00
AlexandClaude Opus 5 2c76da270b Coach: put coach/ in the api image, which never had it
server.js has imported ./coach/config.js since 1/6, and the Dockerfile copies
only server.js. The published api image therefore cannot start:

  Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/coach/config.js'
  imported from /app/server.js

Reproduced by building `api/` at 9082ac5 and running it; /app/coach does not
exist in the image at all. With this line the same build boots and answers
/api/config.

Mine, from 1/6 — the line existed while I was working and was lost when I staged
that PR's files by name. Nothing caught it because the api has no image job: the
test job runs node:test against the source tree, where coach/ is obviously
present. 3/6 adds the api-image job whose whole purpose is that the image is
proven to run rather than merely to build, and rewrites this Dockerfile into the
multi-stage form the optional runtime needs. This is the one-line fix on its own,
because the branch tip currently ships a container that exits on boot.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 10:34:38 +01:00
Space-Hermes eeee4b461c feat: muscle map Fatigue + Strength (detraining) views
Per-muscle fatigue (72h window, 36h half-life, .25/.5 bands) and retained
strength (14d plateau, 28d half-life, .5 floor) views on the Stats page
behind a Balance | Fatigue | Strength segmented control. Pure recovery.js
module with fatiguedMuscles/detrainedMuscles hooks, owner-approved
backward-compatible absolute-level BodyMap extension, 8 i18n keys across
English fallback + 11 locale packs, mounted interaction tests.
2026-08-06 11:33:21 +02:00
Duarte Santos 9082ac5a2d Coach: was durch das Gatter kam, weil es nur gezaehlt und nicht geprueft wurde
Vier Stellen, eine Ursache: strukturierte `after`-Werte werden auf Zugehoerigkeit
geprueft, aber nicht auf die Form-Invarianten, die der Apply-Pfad voraussetzt.
Skalare Aenderungen sind dicht, die zusammengesetzten waren es nicht.

reorder akzeptierte doppelte Ids. ['0001','0001'] hat die richtige Laenge, jede Id
ist enthalten — Server und Client liessen es durch, die dritte Uebung war weg und
die verbliebene stand als dasselbe Objekt in zwei Slots. Ausgerechnet der einzige
Aenderungstyp, fuer den changeValues() null liefert: im Review-Screen ist kein
Vorher/Nachher zu sehen, das es haette verraten koennen. Jetzt Set-Vergleich auf
beiden Seiten.

superset konnte eine Uebung mit sich selbst verknuepfen. Der Partner-Splice nimmt
den Anker unter sich weg, danach schreibt das Tagging durch einen Index, der nicht
mehr aufloest — TypeError nach halbem Umsortieren. Der Client-Test prueft die
Meldung, nicht nur dass geworfen wird: geworfen hat der Bug auch.

add-routine hat unbekannte Exercise-Ids stillschweigend herausgefiltert, waehrend
validatePlan bei derselben Sache abbricht. Das ist FR-16, und es gilt hier genauso:
sonst bekommt jemand die Routine ohne die Uebungen, die es nicht geben konnte,
unter der Summary derjenigen, die er gesehen hat.

`before` war das einzige Feld, das ungeprueft durch das Gatter ging — ein Objekt
beliebiger Groesse landet im synchronisierten Coach-Log, ein bloss falsch getyptes
("3 sets" statt 3) laesst markStale eine voellig gute Aenderung deaktivieren. Der
Plan liegt im Validator bereits vor, also wird `before` dort gelesen statt von der
Antwort uebernommen.

api 68/68, frontend 404/404, Build sauber, Library in sync bei 1324.
2026-08-06 11:22:25 +02:00
AlexandClaude Opus 5 34d41b8e64 Coach: the validator, and the apply path it exists to protect
PR 1 stopped at transport and held every answer as `unvalidated`. This closes
that seam.

validate.js is the gate: a closed list of eighteen change types with no default
case, every exercise id resolved against the real catalogue, every target
resolved against the plan it claims to be about, and a rationale required on
every change. A hostile note in someone's free text can talk a model into saying
anything at all; it cannot invent a change type. Its errors join the parse
failures on the same single repair round, so a model that named an exercise
nobody has is told which one — and a model that cannot be told is a failed job
rather than a retry loop.

frontend/src/lib/coach.js is the other half: snapshot, apply, revert, and the
staleness rules. Applying happens on the client because it is ordinary local
editing — offline, synced like everything else, reversible without the server
knowing. A change-set is all-or-nothing, and a change aimed at something the
user has since edited by hand is disabled with its reason rather than silently
overwriting them.

Two things the seam was hiding, both from PR 1:

hashPlan hashed the pre-1.2.4 field list while canonicalPlan had already learned
repsMax, bodyweight and side — so it computed all three and threw them away. A
rep ceiling raised by hand fingerprinted as an untouched plan, on exactly the
exercises where that ceiling is how progression works. Both runtimes now hash
what canonicalPlan reports, with a test per field.

`refine` reads pending.bundle, and pending only ever carried `unvalidated`, so
`previous` resolved to null every time: the model was asked to refine a plan it
had never been shown. It works now, and the fixture echoes whether the previous
bundle arrived so a test can tell the difference.

The validator also enforces the two rules prompts/common.md states and could
not guarantee: unilateral reps are a total across both sides and must be even,
and a rep ceiling may not sit below its own floor.

"Nothing to change" keeps the reading it came with, on the profile's own record
— deliberately not in the instance log, which stays counts and outcomes only.

api 65/65, frontend 403/403, build clean, locales in sync, library in sync at
1324 exercises. No new dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 08:25:42 +01: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.
v1.2.5
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 de7f25cbe7 Coach: der Test-Lauf laeuft, und CI kann die Jobs ueberhaupt erreichen
Drei Sachen, die nie gelaufen sind, weil die CI fuer die api noch nicht existierte.

canDropPrivileges faellt unter Linux zu, solange der Prozess nicht root ist und
kein `coach`-User im Image steht. Ein CI-Runner ist Linux, laeuft als normaler
User und hat keinen `coach` — also hat dort jedes enqueue() refused, und acht
Tests waeren mit dem neuen api-Job rot geworden. Die Suite pinnt das Urteil
jetzt selbst, statt es vom Host zu erben; der Test, dem die Verweigerung selbst
gehoert, pinnt die Gegenrichtung und laeuft damit erstmals wirklich (vorher
sprang er auf jedem Host raus, auf dem der Drop zufaellig klappte — und rief
require() in einem ESM-Modul auf).

testRun() griff auf ein `job`, das in seinem Scope nicht existiert: ReferenceError
bei jedem Klick auf "Test the Coach", und weil der Wurf vor dem try lag, blieb
jedes Mal ein Temp-Verzeichnis liegen. Ohne Nutzer gibt es kein Profil, das
zahlt — im Instance-Modus ist das der gebundene Credential, im Profile-Modus
niemand.

Danach antwortete die Fixture auf den Test-Prompt mit einem ganzen Trainingsplan,
weil ohne Payload-Fence auf 'create' geraten wird. Genau dieser fehlende Fence
unterscheidet den Rundlauf von einem echten Job.

Dazu zwei Kleinigkeiten: /api/coach/disclosure verriet den Provider an
Nicht-Angemeldete, und der Poll, der ein Proposal verfallen laesst, lieferte als
einziger kein cap-Feld zurueck.
2026-08-04 16:11:43 +02:00
Alex 7be3978476 Coach: server plumbing, consent, payload boundary, credential model
First of six. Everything here is transport and boundary: a job can run, its
answer can be parsed, and nothing yet judges whether that answer is safe to
act on. The validator and the apply path are the next PR, and the seam is
explicit — jobs.js carries an answer no further than `unvalidated`, and a
test pins that so the next PR has something to replace.

Whose account pays, settled first because it decides what the rest may be:

  instance  one account in coach.json, for the single-profile instance
  profile   one account per profile, in its own coach-auth-<uid>.json

In instance mode the credential binds to the first profile that spends it and
every other profile is refused — no job, not a dismissible warning. A warning
moves the decision onto whoever clicks past it and the decision is about
somebody's personal subscription. A profile credential is deliberately not a
field on state-<uid>.json: that blob syncs and travels in the user's export,
and a credential in a backup is the mistake we are avoiding, not repeating.
openGym does not interpret any provider's terms; it offers the shape that
does not need the interpretation and refuses the shape that does.

The privilege drop now fails closed. It only ever engaged when the server ran
as root, so adding a USER line to the Dockerfile for unrelated hardening would
have silently left the provider runtime on the server's uid. On Linux, no drop
means no job, and the admin card says so.

./data is no longer sealed with a blanket 0700. It is a host bind mount and
this container is root, so sealing it landed on the host as root-owned and
took the owner's own directory hostage — backup scripts, jq, the MCP server in
issue #19. The files that hold secrets carry 0600 themselves instead, which is
what the directory mode was standing in for; db.json gained an explicit mode
rather than inheriting umask once the blanket came off.

Bodyweight and per-side, folded in rather than deferred: v1.2.4 made `weight`
mean *added* load on a bodyweight exercise, so it is 0 on a good session and
every load-shaped signal reads flat. Uncorrected, the Coach would have looked
at a working push-up progression and proposed adding weight to a push-up. The
payload carries bodyweight/side/repsMax, the session reader carries set count,
and the prompts say reps then sets are the progression and per-side targets
step in twos. coach-parity.test.js pins the server's three copied reading
rules against the frontend's originals over a table of configs — modeOf was
never actually pinned, and it is the one that was predicted to drift.

No AI dependency lands here: api/ still installs @simplewebauthn/server and
web-push and nothing else. Jobs run against the in-repo fixture provider, so
CI needs no account, no network and no image build.

33 api tests, 361 frontend tests (169 of them parity), locales in sync.
2026-08-03 01:00:56 +01:00
Pengboi 09949686c2 MCP: fixes from review (cardio mode, dead code, Stryker drop, docs)
· entryView was passing `e.target || { id: e.id }` to modeOf, which
   doesn't put id on the target when target exists — so a cardio config
   saved as {sets, min, speed} (no mode, no id) fell through to 'reps'
   and the label came back as "0×0". Now uses the same pattern every
   app call site uses (Workout.jsx, Stats.jsx, progression.js):
   modeOf({ ...(e.target || {}), id: e.id }). Same fix applied to the
   setLabel call right below. Added a regression test using a real
   cardio exercise id with a target that has no mode key — would have
   caught the original bug.

 · requireIso/ISO/fmt/friendlyDate/MUSCLES were unused (zod regexes
   cover ISO validation at the SDK layer). Removed, along with the
   misplaced comment that described requireIso but sat above entryView.

 · estimate_1rm's exercise_id schema description referenced
   search_exercises (v1.5) which doesn't exist yet — an LLM reading
   the schema would try to call it. Dropped the reference; the
   Roadmap section in mcp/README.md drops the same mention.

 · resolveUid threw "set OPENGYM_UID to one of: " (empty list) when
   there were zero state files but multiple users in db.json — the
   files array was empty so files.join(', ') rendered nothing. Now
   falls back to the db.json user ids in that branch.

 · Dropped Stryker entirely. The MCP SDK's 93 transitive runtime
   packages are tolerable since mcp/ is opt-in and never enters
   Docker, but a second test toolchain for a 39% mutation score
   wasn't carrying its weight next to the plain vitest suite.
   Removed .stryker.conf.json, the two Stryker devDeps, the
   mutation:test script, the .gitignore entries, and the README
   section. mcp/ now has a single devDep (vitest); 0 vulnerabilities
   (was 2 moderate).

 · CONTRIBUTING.md layout block + a one-line cross-reference in
   README.md's Tech section pointing at mcp/README.md, so people can
   actually find it.

92 frontend + 33 MCP tests pass.
2026-08-02 19:42:36 +01: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.
v1.2.4
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 8de55ce0d9 Merge pull request #29 from DuarteSantos8/dependabot/npm_and_yarn/frontend/frontend-120fce7b1d
Bump react-router-dom from 7.18.1 to 7.18.2 in /frontend in the frontend group
2026-08-01 14:49:40 +01: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
dependabot[bot] 7354b1ca0c Bump docker/login-action from 4.5.2 to 4.6.0 in the actions group
Bumps the actions group with 1 update: [docker/login-action](https://github.com/docker/login-action).


Updates `docker/login-action` from 4.5.2 to 4.6.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v4.5.2...v4.6.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-01 00:45:03 +00:00
dependabot[bot] f5562febca Bump react-router-dom in /frontend in the frontend group
Bumps the frontend group in /frontend with 1 update: [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom).


Updates `react-router-dom` from 7.18.1 to 7.18.2
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@7.18.2/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@7.18.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-version: 7.18.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-01 00:44:33 +00: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
dependabot[bot] be2fb2dd1d Bump the actions group across 1 directory with 10 updates
Bumps the actions group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4` | `7` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` |
| [docker/login-action](https://github.com/docker/login-action) | `3` | `4.5.2` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5` | `6` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6` | `7` |
| [actions/setup-node](https://github.com/actions/setup-node) | `4` | `7` |
| [actions/configure-pages](https://github.com/actions/configure-pages) | `5` | `6` |
| [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) | `3` | `5` |
| [actions/deploy-pages](https://github.com/actions/deploy-pages) | `4` | `5` |



Updates `actions/checkout` from 4 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

Updates `docker/setup-qemu-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

Updates `docker/setup-buildx-action` from 3 to 4
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

Updates `docker/login-action` from 3 to 4.5.2
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4.5.2)

Updates `docker/metadata-action` from 5 to 6
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

Updates `docker/build-push-action` from 6 to 7
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

Updates `actions/setup-node` from 4 to 7
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v7)

Updates `actions/configure-pages` from 5 to 6
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v5...v6)

Updates `actions/upload-pages-artifact` from 3 to 5
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v5)

Updates `actions/deploy-pages` from 4 to 5
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/configure-pages
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/deploy-pages
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-pages-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/login-action
  dependency-version: 4.5.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-31 17:34:50 +00: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