affac4a2a0ed10ed480900f7e03d338b8ea013d4
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
87bfd6d4c4 |
Rebrand to KuentaGYM, and start a new profile in pounds and Spanish
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). |
||
|
|
2899f27fa6 |
CI: Pipelines fuer Fork-MRs, Testberichte im MR, Stack-Check der Images, Trivy+SBOM, Release-Preflight
Was die Pipeline neu kann: - release:preflight prueft auf einem v*-Tag, dass frontend/api-package.json und CHANGELOG zum Tag passen und der Commit auf main liegt - bevor 40 Minuten Build anlaufen. - test:* liefern JUnit (Fehler stehen im MR-Widget) und Coverage (Badge + Diff-Annotation); test:frontend misst das Bundle und zeigt im MR die Differenz zu main. - verify:stack startet die gerade gepushten Images ueber die echte docker-compose.yml und fragt sie durch nginx ab; verify:scan (Trivy) scannt beide Images und legt je ein CycloneDX-SBOM ab, das der Release verlinkt. - Der Release nennt Digests, Pull-Befehl und APK-SHA-256. - mr:fork-pipelines startet die Pipelines von Fork-MRs bekannter Contributor hier im Projekt (Fork-Pipelines laufen sonst im Fork ohne Runner); Erstkontakte bekommen das Label ci-approval-needed. Braucht PIPELINE_API_TOKEN und den Zeitplan SCHEDULE_JOB=fork-mrs. Korrekturen: - web/Dockerfile: npm ci --ignore-scripts statt "npm ci || npm install" - der sharp/libvips-Download hatte v1.3.1 rot gemacht, und der Fallback ignorierte das Lockfile. - interruptible + Retry bei Runner-Fehlern fuer alle Jobs, Timeouts pro Job, release-cli gepinnt, Docker-/Rules-Vorlagen statt Copy-Paste. - Zeitplaene unterscheiden sich per SCHEDULE_JOB, damit Renovate und der MR-Starter sich nicht gegenseitig ausloesen. |
||
|
|
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. |
||
|
|
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.
|
||
|
|
92914dea43 |
MCP: read-only stdio server for LLM apps to query workout history
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). |