The app is now KuentaGYM everywhere a user can see it, and a fresh profile no
longer starts on upstream's English/kg defaults. Both are this fork's decisions,
so both are pinned by tests rather than left to a find-and-replace.
Rename (1,270 references, 149 files)
- Visible surfaces: the Login/Home/mobile-onboarding wordmark, the Settings
version line, the printed plan, the PWA title + manifest, and the 17 branded
strings across all 14 locale packs.
- Infrastructure: repo links, the container images and the release endpoints now
name git.dploy.lol/dsantillan/kuentagym; .gitea/workflows/docker-publish.yml
publishes to this forge's registry instead of gitea.com.
- The Android/iOS application id stays ch.duartesantos.opengym on purpose:
changing it would make the mobile app a different app that could never update
an installed copy.
Three things the mechanical pass would have broken, fixed here
- The update check asked gitlab.com for upstream's releases and would have
installed upstream's APK, putting the old name back on the phone. It now reads
this fork's Gitea releases API (the assets shape differs), with the tests
rewritten to the payload Gitea actually returns.
- Renaming the mobile state/pairing files (opengym-state.json,
opengym-remote.json) would lose the on-device copy of a history whose WebView
storage may have been evicted, and silently unpair the device. Both are read
under their old names and written forward under the new ones.
- Renaming the exported plan-file marker (openGym_plan) rejected every plan
shared before the rename as "not a plan file". Both markers are accepted.
Defaults: pounds and Spanish
- DEF.unit = 'lb', DEF.lang = 'es', plus every fallback that independently
assumed en/kg (the <html lang> attribute, the Settings pickers, the Store, the
MCP, the Coach payload).
- Server-generated push copy existed only in English and pt-BR, so a Spanish
profile would have been notified in English; Spanish added.
- The demo seed states unit: 'kg' — its seeded numbers are kilograms, and
inheriting the new default would have introduced an 82.4 lb lifter benching 60.
- The module-level language in i18n-core stays English: it is the only language
whose strings need no pack, so `t()`, dates, numbers and lists agree before a
pack loads. Starting there on 'es' formats a Spanish-shaped UI with English
strings.
Also
- api/package.json's test glob missed push-messages.test.js and
verify-error.test.js, which sat beside the modules they cover and never ran.
- README, docs/, website/ and the issue templates no longer describe upstream's
GitLab/GitHub pipeline, Discord, sponsorship or public demo as if they were
this fork's; upstream history and attribution are preserved (NOTICE.md).
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.
· 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.
The MCP code came in with 5–8 line file headers, JSDoc on every
one-line wrapper, and inline explanations that referenced the PR
itself ("so the MCP server can reuse it") — none of which matches
api/server.js or frontend/src/lib/, where comments are one-line,
fact-shaped and never mention the change that introduced them.
Trimmed across mcp/src/*.js, i18n-core.js, i18n.js, exercises.js,
format.js, mcp/test/tools.test.js, mcp/vitest.config.js and
mcp/README.md. Tool prefaces lost their numbers; duplicate fs.watch
rationale folded into one; the ASCII import diagram in the README
replaced with a paragraph; the cross-references and self-references
removed. Also fixed two real defects: a corrupted Cyrillic word in a
state.js comment and a missing space in a tools.test.js comment.
No code changes; 92 frontend + 32 MCP tests still pass.
A Model Context Protocol bridge that lets an external LLM application (Claude Desktop,
Cursor, Cline, Continue, …) read a user's openGym profile directly from ./data — no new
container, no extra auth, no third-party service. The LLM client spawns the server
locally as a stdio process (per the official MCP model); reads the same state-<uid>.json
the api server writes; reuses the pure training helpers from frontend/src/lib/*.js so
the numbers it answers with match what the Stats screen shows exactly.
Eight tools in v1, all read-only:
· list_routines, get_routine — names + exercise counts + per-exercise targets
· get_week_plan — Mo/We/Fr assignments and today's routine, accounting for any
date-specific overrides (a "rest" override cancels the day)
· list_workouts, get_workout — newest-first session summaries + per-set breakdown
· get_bodyweight — weigh-ins with the goal line and signed deltas vs goal
· estimate_1rm — Epley/Brzycki/Lombardi formulas, all-time best + trend per exercise,
or a PR table across all reps-mode exercises
· muscle_balance — which muscles are trained vs neglected over a week/month/all window
State is read with fs.watch (mtime fallback for platforms where watchers are flaky) so
the server reflects a session the web UI just finished without a restart. No passkey
material, VAPID keys, or session secrets ever cross the boundary — handlers only ever
serialize fields from the state object plus the user's name from db.json.
The MCP server has exactly one runtime dependency beyond the SDK: none. zod is the SDK's
transitive; vitest and Stryker are devDeps only. Tests run against the demo seed fixture
(demoSeed.js) — 32 cases pinning the JSON shape and the most user-facing edge cases
(empty state, missing routine, rest-day override, zero-workout muscle_balance, three
1RM formulas, superset links, timed/cardio set labels).