Commit Graph
800 Commits
Author SHA1 Message Date
Konstantinos Thermos 6730549845 Coach: cap the plan arrays in the schema, not only in the prompt
create.md asks for "1-7 routines, each 3-12 exercises" and validate.js slices at MAX_ROUTINES /
MAX_EX_PER_ROUTINE, but the schema the endpoint decodes against had no bound at all. A model that
starts repeating itself never reaches the validator: qwen2.5:3b walks the library id by id, three
sets of eight apiece, until it exhausts the 16k output limit — twelve minutes for an answer that
arrives truncated, which the adapter turns into "the answer was cut off at the output limit" and a
job that would already have hit COACH_JOB_TIMEOUT_MS.

maxItems on the two arrays states the caps that already exist, where the decoder can enforce them.
2026-09-04 18:58:23 +03:00
Konstantinos Thermos dafc80f1d6 Coach: the create schema requires a routine id and a week
CREATE_SCHEMA is handed to OpenAI-compatible endpoints as a grammar to decode against, and it
left both `routines[].id` and `week` optional. Small local models take that offer: llama3.2:3b
and qwen2.5:3b both answer with routines that carry no id, and a week naming what they wrote
into `name` instead. Nothing in the week then resolves, validate.js reports "the week schedules
0 days but 3 were asked for", the repair round produces the same answer again, and the job ends
as `unusable` — "The Coach answered with something the app couldn't use."

Requiring the two fields the week resolves through is enough. With them in the schema,
llama3.2:3b produces a plan that passes validatePlan on the first attempt, against the payload
that failed twice before. The validator is untouched; this only stops the grammar from offering
an answer it can never accept.
2026-09-04 18:46:39 +03:00
Duarte Santos 0cbd32c0f5 mrbatch: Listenmodus beendet den Workout nicht mehr zu frueh, Progression-Sheet speichert trotz Store-Clone, Progression-aus auch bei Swap/Sheet, Stepper snappt nur auf dem Raster, exWeights erst beim Abschluss
Aus dem Subagenten-Test der Workout-MRs:
- !96 x !92: toggle() beurteilte die Einheit des Markers statt die des angetippten Satzes; im
  Listenmodus kam "That's the whole workout!" nach einem Satz einer anderen Uebung.
- !77: Identitaetsvergleich scheitert an jedem Store-Clone (auch der Stangengewicht-Stepper im
  Sheet selbst) -> Vergleich auf Workout-Id, Listenlaenge und Uebung am Index.
- !71: useTarget bei Progression 'aus' auch fuer swapActiveWorkoutExercise und das
  Progression-Sheet im Workout.
- !84: stepWeight snappt nur, wenn der Wert schon auf dem Schrittraster liegt (62.5 +5 -> 67.5,
  nicht 70; 61.3 +1.25 -> 62.5 wie die Progression).
- !92: exWeights werden nur noch beim Abschluss geschrieben (doFinishWorkout), nicht beim
  Abhaken - ein korrigierter Tippfehler oder ein verworfener Workout wird nie zum "Best".
2026-09-04 17:16:49 +02:00
Duarte Santos 80cccdd2e0 mrbatch (!87): Muskel-Explorer folgt dem Geraete-Profil wie Library/Picker, Zurueck-Pfeil links, Satz nicht doppelt, Library-Tab bleibt markiert 2026-09-04 17:13:47 +02:00
Duarte Santos 6e9f5e7b9c mrbatch: preview_session baut die Session ueber session-start.js (Progression aus, Deload-Routinen, Warm-up-Schritt), meldet auch Zeit/Cardio-Overrides; Rest-Toast auch nach verstecktem Ablauf 2026-09-04 17:11:24 +02:00
Duarte Santos 0f021aa06d mrbatch: pt-BR-Guard nachgezogen, Sheet-Mock kennt starterPlanSheet, Listenmodus folgt !92 (kein Auto-Weiterspringen) 2026-09-04 16:57:42 +02:00
Duarte Santos f767d007a5 Merge !90: MCP: preview_session — what a routine will actually open with
# Conflicts:
#	mcp/README.md
2026-09-04 16:54:53 +02:00
Duarte Santos dfc63543ea Merge !94: feat: add Upper/Lower, Full Body and 5×5 starter plans
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
2026-09-04 16:54:38 +02:00
Duarte Santos 194aa15f0e Merge !87: feat: add muscle exercise explorer
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
2026-09-04 16:54:38 +02:00
Duarte Santos dab232a591 Merge !96: feat(workout): add configurable list view for active workouts
# Conflicts:
#	frontend/src/views/Workout.jsx
2026-09-04 16:54:38 +02:00
Duarte Santos d8130443a9 Merge !72: Exercise picker: the "+" adds now instead of opening the detail sheet
# Conflicts:
#	frontend/src/views/RoutineEdit.jsx
2026-09-04 16:54:08 +02:00
Duarte Santos 4bca5336d1 Merge !85: feat: add copy routine button to RoutineEdit view
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
2026-09-04 16:53:52 +02:00
Duarte Santos f00400206d Merge !92: fix: capture working weight automatically 2026-09-04 16:53:52 +02:00
Duarte Santos 26847dac3b Merge !80: fix: use available width for exercise selector 2026-09-04 16:53:52 +02:00
Duarte Santos e94bd1250e Merge !82: BodyMap tests: import the geometry before the first render 2026-09-04 16:53:52 +02:00
Duarte Santos 566463c45f Merge !81: MCP: get_routine reports an exercise's own rest 2026-09-04 16:53:52 +02:00
Duarte Santos 6c22076d35 Merge !77: Show and edit progression policy during workouts 2026-09-04 16:53:52 +02:00
Duarte Santos 11bb1392f8 Merge !93: Fixed and tested deload spiral 2026-09-04 16:53:52 +02:00
Duarte Santos 953d91c806 Merge !71: fix: keep no-progression routine targets 2026-09-04 16:53:52 +02:00
Duarte Santos dca8393a7a Merge !89: Timer flash: blink the real theme instead of a black/white overlay, sk 2026-09-04 16:53:52 +02:00
Duarte Santos b301b8c81d Merge !84: fix: use exercise weight step for workout controls
# Conflicts:
#	frontend/src/views/Workout.jsx
2026-09-04 16:53:51 +02:00
Duarte Santos 8fb22e7994 Merge !97: bugfix: RIR counter ins supersets required two clicks per increment 2026-09-04 16:53:32 +02:00
Daniel Patrón Gómez 98ed4ddcb1 Merge branch 'main' into feat/workout-list-view 2026-09-04 16:14:27 +02:00
Duarte Santos dca6bcdf2d Images: alpine-Upgrades beim Bauen, npm aus dem publizierten api-Image, APK-Checksumme bei jedem Build
Der Trivy-Scan meldete 13 Funde, alle im api-Image und keiner in einer Abhaengigkeit der App:
2x openssl aus alpine (node:22-alpine hinkt alpines Fixes hinterher) und 11x in npms eigenem
gebuendelten Baum (tar, brace-expansion, pacote, ...). Beide Images ziehen jetzt `apk upgrade`
beim Bauen; das publizierte api-Image (Target default) verliert npm komplett - der Server
startet mit `node server.js`, nichts spawnt npm. build:api-check prueft das. Das coach-Target
behaelt npm fuer die Codex-CLI.

build:apk schreibt die .sha256 jetzt bei jedem Build (die Artefakt-Warnung auf Branches ist weg),
hochgeladen wird sie weiterhin nur vom Release-Tag.
2026-09-04 15:34:49 +02:00
prasad-gade05 e4139a4e9f feat: add muscle exercise explorer 2026-09-04 19:03:02 +05:30
Duarte Santos 4924ad8aeb Merge !95: gym membership QR check-in, in app and PWA, with a Settings switch 2026-09-04 15:21:53 +02:00
Duarte Santos 50a8b96285 cap sync: secure-storage and ML Kit plugin in the generated gradle/Podfile lists 2026-09-04 15:16:23 +02:00
Duarte Santos aa487d29f4 Gym check-in in the browser/PWA too
The feature was gated behind MOBILE because scanning went through the native ML Kit
plugin. iPhone users only have the PWA, so: route, Home card and Settings switch on
every platform; photo import and a live camera sheet decode in the browser with
BarcodeDetector where it exists and jsQR (Apache-2.0, lazy chunk) otherwise. The app
build keeps ML Kit. Round-trip test lean-qr -> jsQR.
2026-09-04 15:15:31 +02:00
Duarte Santos 0af9f55528 Gym check-in: Settings switch to turn the feature off
Off hides the Home card and the /checkin route; saved cards stay. On by default,
profiles without the key read as on. pt-BR: trailing comma the MR's last override
line was missing, override count 600.
2026-09-04 14:42:48 +02:00
Duarte Santos 5478b2d621 CI: Image-Digest robust auslesen (buildx druckte den ganzen Block, dotenv-Upload scheiterte) 2026-09-04 14:09:40 +02:00
Duarte Santos 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.
2026-09-04 14:06:50 +02:00
Sebastian G 3197f9e9be Merge remote-tracking branch 'origin/main' into feat/gym-checkin-qr
# Conflicts:
#	frontend/package-lock.json
#	frontend/package.json
#	frontend/src/index.css
#	frontend/src/lib/pt-br-locale.test.js
#	frontend/src/locales/hu.js
#	frontend/src/locales/th.js
2026-09-04 13:14:01 +02:00
Sebastian G 2c5678e877 feat(update): gate in-app updater to Android only
The updater downloads an .apk and hands it to the system package
installer, which only exists on Android. Add an isAndroid() flag in
mobile.js and run the update check behind it, so the update row never
appears on iOS or the web build.
2026-09-04 13:01:42 +02:00
Sebastian G 15b95eb434 test: derive update-check versions from __APP_VERSION__ instead of hardcoding
The semver comparison tests hardcoded v1.2.11-relative versions, so they
broke when package.json bumped to 1.2.14. Derive test versions from the
running __APP_VERSION__ so the suite stays correct across version bumps.
2026-09-04 13:01:42 +02:00
Sebastian G 7958d0fcd4 feat: SHA-256 verification, download progress, native installer, i18n
- SHA-256 hash check on downloaded APK (Web Crypto API, no new deps)
- Download progress bar in a locked sheet (stream-based tracking)
- Native Android InstallPlugin (FileProvider + ACTION_VIEW intent)
- REQUEST_INSTALL_PACKAGES permission in AndroidManifest
- applicationIdSuffix .debug for debug builds
- Update row only shown when an update is available
- Label changed to 'openGym v{0} available', icon to 'info'
- All 7 new UI strings translated in 12 locales
- pt-BR snapshot count updated (291 → 298)
2026-09-04 13:01:42 +02:00
Sebastian G 106a3abee0 feat: add update check in settings
Check GitLab releases API on settings open to determine if a newer
version is available. Shows current version (up to date) or the new
version number with download/install action.

- New lib/update.js: checkForUpdate(), downloadAndInstall()
- Settings Data section: update row with auto-check on mount
- Dialog for re-check confirmation when already up to date
- APK download + installer trigger on Android via Capacitor
- Falls back to opening releases page on web
- 16 unit tests for version check logic
2026-09-04 13:00:25 +02:00
Sebastian G eb59240e2f fix: superset RIR counter fixed 2026-09-04 10:46:53 +02:00
Daniel Patrón Gómez e278051fae feat(workout): add configurable list view for active workouts 2026-09-04 10:09:30 +02:00
Duarte Santos d6f0db9b4b v1.3.1 v1.3.1 2026-09-04 09:51:25 +02:00
Duarte Santos 565311accc Handy: 'Use my self-hosted openGym' erkennt den Coach des gepaarten Servers
Der Mobile-Boot und das Pairing haben /api/config nie geladen, nur die Web-Variante und der
Login-Screen. Auf dem gepaarten Handy stand deshalb im Coach-Setup immer 'Your server has no
Coach enabled' — waehrend der Admin auf einen gruenen Test schaute (Discord-Meldung, 2026-09-04).
Jetzt: refreshConfig() fragt immer, loadConfig() cached nur noch darueber; Boot (remote) und
connectToServer laden die Config, der Setup-Screen fragt beim Oeffnen neu und zeigt bis dahin
'Loading…'. Regressionstest fuer load/refresh.
2026-09-04 09:51:01 +02:00
Duarte Santos 8b7abe5c26 Website: der AI Coach steht auf der Startseite 2026-09-03 23:24:30 +02:00
Duarte Santos 6b3c7d0ed7 v1.3.0 v1.3.0 2026-09-03 23:08:45 +02:00
Duarte Santos eead4afd88 assets: Brand-Dateien wieder raus, die 11d5632 versehentlich mitgenommen hat
BMC-Cover, Logo-Varianten und Merch-Vorlagen lagen unversioniert im Arbeitsverzeichnis und
sind mit einem git add -A in den Stats-Commit gerutscht. Sie gehoeren nicht ins oeffentliche
Repo; ab hier sind sie wieder unversioniert (in der Historie bleiben sie, main ist gegen
Force-Push geschuetzt).
2026-09-03 23:05:05 +02:00
Duarte Santos 11d5632156 Stats: die Strength-Liste sagt, wie lange ein Muskel nicht trainiert wurde
Die Zeilen unter der Strength-Karte zeigten die Saetze der letzten 90 Tage — fuer Muskeln,
die genau deshalb in der Liste stehen, weil sie lange nicht trainiert wurden, also fast immer
0, und sonst als ungerundeter Float (1.2000000000000002). Jetzt: Wochen seit dem letzten
Training bzw. 'not trained', gerundete 90-Tage-Saetze nur darueber, wenn es welche gibt.
Balance-Zeilen runden ueber fmtNum.
2026-09-03 23:01:34 +02:00
Duarte Santos 12309f394b Website: APK-Zeile v1.2.16 · 4.8 MB 2026-09-03 22:55:28 +02:00
Duarte Santos f190f0ba4a v1.2.16: das Web-Image baut wieder, und ein MR-Check dafuer
web/Dockerfile kopierte nur frontend/, aber frontend/src importiert den Coach-Kern aus
api/coach/core (../../../api/coach/core/*). Der Build-Stage liegt jetzt unter /app/frontend
und bekommt api/coach/core an derselben relativen Stelle wie im Repo. Neuer Job
build:web-check baut das Web-Image in jeder MR-Pipeline, die frontend/, web/ oder den Kern
anfasst (der API-Check gab es schon, den Web-Check nicht — deshalb ist v1.2.15 durchgerutscht).
Auf der VM gebaut und geprueft: App-Shell 200, Coach im Bundle.
v1.2.16
2026-09-03 22:45:31 +02:00
Duarte Santos 6c4af7d5fc v1.2.15 v1.2.15 2026-09-03 22:36:31 +02:00
Duarte Santos 02c75b320d Coach: ein API-Key gilt fuer die ganze Instanz, Warm-ups zaehlen nicht, Retries bei 429/5xx, sichtbare Admin-Felder
- Instanz-Modus: nur eine persoenliche Anmeldung (Setup-Token/OAuth) bindet sich an das
  erste Profil, ein API-Key ist gemessen und wird von allen Profilen unter den Tageslimits
  geteilt. Die Bindung passiert jetzt wirklich beim Einreihen eines Jobs (jobs.enqueue),
  vorher gab es sie nur in den Tests.
- HTTP-Adapter: 429/500/502/503/504/529 werden zweimal mit kurzer Pause wiederholt, ein
  4xx nie. retryDelayMs fuer Tests.
- Payload: Warm-up-Saetze wie in progression.js aus readSession/stalls, done/planned,
  Top-Satz, setsByBodyPart und workingWeights herausgefiltert; in vollen Sessions als
  warmup:true markiert, common.md sagt dem Modell, was das ist.
- Admin-Karte: .field im Card hat jetzt eine sichtbare Flaeche, die Limit-Zahlenfelder
  sind echte Felder statt weisser Browser-Boxen; Text zu 'Whose account pays' unterscheidet
  API-Key und persoenliche Anmeldung.
- Neuer Test e2e-apikey: Key ueber die Admin-Routen einlegen, Modelle listen, Review durch
  die echte Queue gegen einen lokalen Anthropic/OpenAI/Gemini-Stand-in, inkl. Header,
  Cache-Block, Schema, Retry und Auth-Fehler. api 150, frontend 1029, mcp 45 gruen.
2026-09-03 22:27:10 +02:00
Duarte Santos 63cf1deaed Merge main (v1.2.14) in coach-providers
Konflikte: zwoelf Locale-Packs (beide Seiten haengen Strings an, sechs doppelte
Schluessel bereinigt), Admin.jsx/admin.css (Coach-Karte bleibt, main-Umbau uebernommen),
Workout/Home/Plan/sheets (main gewinnt), docs.html (Coach-Kapitel war doppelt).
Ungarisch und Thai sind auf main dazugekommen und bekommen die 334 Coach-Strings.
pt-BR-Fingerprint nachgezogen.
2026-09-03 22:17:29 +02:00
sebastian.goendoer e57eac027f fix: read fresh store value in set-stepper bump to prevent stale closure in supersets
In a superset both ExerciseBlock instances subscribe to the same store
slice. When one member's field is updated the store clone invalidates all
entry references, causing both instances to re-render. The +/- button
handlers were closing over the set object from the previous render, so
the first tap wrote the correct value but the replacement closure made
the next tap operate on stale data -- requiring two taps per visible
increment instead of one.

Fix: read the current field value directly from the store at call time
instead of relying on the render-time snapshot.
2026-09-03 21:40:11 +02:00