Commit Graph
583 Commits
Author SHA1 Message Date
Manuel c71cb09515 feat: expose the double progression rep range 2026-08-30 01:23:20 +02:00
Manuel 0ab0f47259 fix: block empty progression step saves 2026-08-29 22:39:15 +00:00
Zoltan K 41df6cb139 i18n: Add Hungarian (hu) — UI, exercise instructions, and exercise names
Rebased onto the Brazilian-Portuguese localization that landed while this was
in progress — that MR introduced EXERCISE_NAME_LANGS/exerciseNameFor()/
exerciseNameSearchText() in lib/i18n-core.js and a generated-pack convention
(scripts/exercise-name-sources/<lang>.json → scripts/build-<lang>-exercise-
names.mjs → frontend/src/exercise-names/<lang>.js), which is exactly the
mechanism this MR originally invented independently as NAME_LANGS/nameFor().
Dropped that duplicate plumbing entirely and reused theirs instead:

- frontend/src/locales/hu.js — full UI translation, 740/740 keys (654 from
  the original translation pass, 86 more added to cover the drop-set/rest-
  pause, equipment-profile, server-pairing and session-note strings that
  landed in the same window).
- frontend/src/instr/hu.js — unchanged mechanism, all 1,324 exercises' step-
  by-step instructions. The upstream exercise dataset (hasaneyldrm/exercises-
  dataset) still has no hu field, so this stays hand-maintained here.
- scripts/exercise-name-sources/hu.json + scripts/build-hu-exercise-
  names.mjs (mirrors the pt-BR ones) → frontend/src/exercise-names/hu.js —
  all 1,324 exercise names, added to EXERCISE_NAME_LANGS. Exercise names
  now render the same bilingual way pt-BR's do: the translated name alone
  when it's the same loanword as English (e.g. "burpee"), otherwise
  "translated (english)".
- One small generalization to exerciseNameFor(): its loanword-casing
  comparison was hardcoded to `.toLocaleLowerCase('pt-BR')`. Changed to the
  active language instead, so it is correct for hu (and any language after
  it) rather than only for pt-BR. No behavior change for pt-BR itself.
- Workout.remove.test.jsx's locale-coverage test hardcoded an expected pack
  count; already fixed once for the 12th language, re-applied here since hu
  is now the 14th — derives the count from LANGS so this stops recurring.

Translated in bulk with AI assistance and validated programmatically (id
coverage against the 1,324-exercise catalogue, key-set parity across all 13
locales via check-locales.mjs, duplicate/collision and encoding checks) —
not yet proofread line-by-line by a fluent human reviewer, same disclosure
standard scripts/exercise-name-sources/README.md and instruction-sources/
README.md already hold the pt-BR translations to.

node frontend/scripts/check-locales.mjs: 13 locales, 740 keys each, in sync.
Full frontend test suite: 39 files / 533 tests passing.
2026-08-29 23:04:10 +02:00
Duarte Santos dc7ee4e2f4 Coach-Chat: bei einem lokalen Modell auf dem Server keine 'ein bis zwei Minuten' versprechen 2026-08-29 21:36:07 +02:00
Duarte Santos b61f1b6f15 Coach auf dem Handy: ein lokaler Endpunkt bekommt 25 Minuten, und der native Transport schneidet nie zuerst ab 2026-08-29 21:26:54 +02:00
Duarte Santos 3fe39fde2f Coach-Onboarding: der Fuss sitzt auf der Tab-Leiste, die Liste laeuft unter ihm durch 2026-08-29 20:55:05 +02:00
Duarte Santos 51bf980e89 Coach-Onboarding: Trainingsdauer als Stunden:Minuten-Raeder statt Uhrzeit, '1 Tag pro Woche', Platz unter der Einwilligung 2026-08-29 20:52:43 +02:00
Duarte Santos 18dd33e9d3 Coach: Fragebogen beim ersten Mal, dann ein Chat mit dem Coach; Admin-Dashboard lesbar
Der Coach ist jetzt ein Gespraech. Beim ersten Mal ein Onboarding im Apple-Stil — eine
Frage pro Bildschirm, 1–7 Tage frei, Trainingsdauer als HH:MM — danach der Chat: die
Antworten als erste Nachricht, eine Tipp-Blase mit gemessener Dauer waehrend der Job
laeuft, der Plan als Karte mit Routinen-Tabs und Begruendungen, Freitext zum Nachbessern,
ein Knopf zum Uebernehmen. Zurueckkommen, Review anfordern, Antworten aendern — alles im
selben Chat. Der Aus-Schalter fuer Nutzer ist weg: abschalten kann nur noch der Admin.

Das Admin-Dashboard fuehrt in nummerierten Schritten (Provider → Endpunkt → Zugang →
Modell → Test) mit Statuspille und Klartext; Limits, Konto und Isolation unter
'Advanced', die Jobs unter 'Activity'.
2026-08-29 20:45:22 +02:00
Duarte Santos aef950cf7c Coach: die Bibliothek im Payload ist gedeckelt (160, ausgewogen, das eigene Training immer dabei)
Bisher gingen alle 1.324 Uebungen mit — 10k+ Tokens pro Job, teuer gegen eine Cloud-API
und in den Kontext eines kleinen lokalen Modells passte es gar nicht. Jetzt: Round-Robin
ueber die Koerperteile in Katalogreihenfolge (deterministisch), Plan- und History-Uebungen
werden immer eingepinnt, damit eine Review benennen kann, worueber sie spricht. Dazu
COACH_JOB_TIMEOUT_MS fuer Boxen, auf denen ein lokales Modell laenger als fuenf Minuten
braucht.
2026-08-29 20:42:24 +02:00
Duarte Santos 1986a507b0 Coach auf dem Handy: ueber den gepaarten Server, oder mit eigenem API-Key
Einstellungen → KI-Coach hat zwei Antworten. Ein gepaartes Handy ist ein normales
Profil und nimmt die Web-Regel — der Server rechnet mit dem Provider, den sein Admin
eingerichtet hat. Ein Handy mit eigenem Key laesst dieselbe Pipeline (api/coach/core)
lokal laufen: Payload, Prompt, HTTPS-Adapter, Parser, Validator, eine Reparaturrunde;
der Key liegt im sicheren Speicher (Keychain/Keystore), nie in S. Nichts davon wird
geladen, bevor ein Modus gewaehlt ist — coach-local ist ein eigener Lazy-Chunk (156 KB),
und CoachSetup importiert aus dem Kern nur die Provider-Tabelle und fuenf Kategorienamen.
Provider-Aufrufe gehen ueber CapacitorHttp statt durch die WebView (kein CORS), und
zwar als expliziter Shim, damit die api()-Aufrufe eines gepaarten Handys unberuehrt
bleiben. Ein lokales Tageslimit, weil hier der Nutzer zahlt. 33 neue Strings in
zwoelf Packs.
2026-08-29 17:28:02 +02:00
Duarte Santos 7047346da1 Coach: Anthropic, OpenAI, Gemini und jeder OpenAI-kompatible Endpunkt per API-Key
Vier Provider, die nur HTTPS sprechen — kein Agent-SDK, keine CLI, kein coach-User:
sie laufen auf dem Default-Image. Eine Factory (core/adapters/http.js) bildet jede
Antwort auf den bestehenden {code,text,stderr}-Vertrag ab, damit die Pipeline nichts
Neues lernen muss: 401/403 werden 'auth', ein abgeschnittenes JSON 'provider' statt
die einzige Reparaturrunde zu verbrennen. Ollama/LM Studio/vLLM/OpenRouter laufen
ueber dieselbe Chat-Completions-Form mit eigener Basis-URL und optionalem Key.

coach.json haelt Key, Modell und Bindung jetzt PRO Provider — Wechseln wirft nichts
mehr weg; die flache v1.2.11-Datei wird einmalig hochgehoben. Das Privilege-Gate
fragt den Adapter, ob er ueberhaupt einen Prozess startet. Die Admin-Karte zeigt
endlich den API-Key-Knopf auch bei Anthropic, listet Modelle vom Endpunkt und
nimmt eine Basis-URL entgegen.
2026-08-29 17:15:22 +02:00
Duarte Santos 697f1b1269 Coach: der Kern, den beide Laufzeiten laden koennen
payload, validate, parse, die Prompt-Montage, der Plan-Fingerprint und die
invoke→parse→validate→repair-Schleife ziehen nach api/coach/core/ — ohne node:*,
damit das Handy sie spaeter genauso importiert wie der Server. Die Bibliothek und
die Prompts werden als ES-Module generiert (scripts/build-coach-assets.mjs), weil
weder createRequire noch ?raw unter beiden Laufzeiten laden. Das Pseudonym wird
uebergeben statt abgeleitet (handle.js behaelt den HMAC). check-core-loadable
prueft unter blankem node, was vitest strukturell nicht pruefen kann.
2026-08-29 17:07:37 +02:00
Duarte Santos 4a9e1e3456 Merge main (v1.2.11) into coach: Pairing, Notizen, Aufwaerm-Saetze, GitLab-CI
Der Coach-Zweig stand seit v1.2.7. Konflikte: beide Seiten behalten (Server-Imports,
Store-Felder, Home-Titel mit naechster Einheit, history.js), das Dockerfile behaelt seine
zwei Targets und kopiert die neuen Server-Module mit, compose zeigt auf die GitLab-Registry.
pt-BR: die 139 Coach-Strings in die Sie-Form gebracht, Fingerprint nachgezogen.
2026-08-29 17:03:39 +02:00
Julius Haring 6585ad5711 test: make pt-PT test work with hevy import 2026-08-29 17:02:41 +02:00
Julius Haring 687ef2562e feat: add hevy map import to csv import 2026-08-29 17:02:41 +02:00
Julius Haring 45f7541508 feat: add hevy pro api import 2026-08-29 17:02:28 +02:00
Duarte Santos cb24bf12d7 Merge merge request !44 (a way out of the required weigh-in) 2026-08-29 16:52:07 +02:00
Duarte Santos 3a79a8dd5a css: the Today row's hover follows the file's own formatting
Same rules, house spacing, plus the note on why the guard is there.
2026-08-29 16:45:24 +02:00
seals187 d0361b3fe0 home: give the Today row a pointer and a hover state on desktop
The row is a clickable div, so the desktop cursor never changed and nothing
answered the mouse. Both are behind @media (hover: hover) so a tap on a phone
does not leave the row stuck in a hover state. Closes #14.
2026-08-29 16:44:34 +02:00
mflova 090f615e8b fix: reschedule native workout reminders by date 2026-08-29 14:32:22 +00:00
Suthep ce0e5d4aef Fill in th.js missing keys and fix a mismatched key
- check-locales.mjs was failing: th.js had 628/741 keys. One key
  ('...rest after both') didn't match the source string used in code
  ('...rest when done'), and 112 keys were missing outright — most of
  them the whole tail block (equipment profiles, mobile-app pairing,
  session notes) that never made it into th.js.
- Renamed the mismatched key and added Thai translations for the 112
  missing keys, preserving {n} placeholders and section comments to
  match the other locale files.
- Workout.remove.test.jsx hardcoded 12 locale packs; bumped to 13 now
  that th.js is a complete pack.

npm test / npm run build / node scripts/check-locales.mjs all pass now.
2026-08-29 19:12:49 +07:00
Space_Hermes 2199564593 test(sync): codify saved workout state restore contract 2026-08-29 13:57:39 +02:00
tomzt 241b036fe4 Add Thai (th) translation 2026-08-29 17:32:05 +07:00
Manuel 9216aa2f02 test: assert cleared progression steps are omitted 2026-08-28 17:20:36 +00:00
Manuel dcfc7f15a7 fix: allow decimal progression steps below one 2026-08-28 17:17:02 +00:00
Space_Hermes e47a5418dc fix(workout): stop work timer on discard 2026-08-28 14:34:03 +02:00
Space_Hermes a97ae06c68 fix: use history snapshots in recovery maps 2026-08-28 14:32:56 +02:00
Space_Hermes 23b1b719a8 fix(workout): open progression settings from guidance 2026-08-28 13:47:38 +02:00
Space_Hermes 221e365ee8 fix(workout): label progression guidance 2026-08-28 08:04:59 +02:00
Space_Hermes 84274b48d2 Fix disabled routine move control hit targets 2026-08-27 20:06:19 +02:00
Space_Hermes 80b0027bf5 test(workout): cover swipe capture and scroll ownership 2026-08-27 19:55:58 +02:00
Space_Hermes 7422925235 fix(workout): center the actionable superset set 2026-08-27 19:41:34 +02:00
Space_Hermes 933891ee99 Fix routine move controls for grouped exercises 2026-08-27 19:40:49 +02:00
Space_Hermes 03a5bd22ff fix: stop rest timer when removing active exercise 2026-08-27 19:34:08 +02:00
Space_Hermes da161613cf fix(routines): preserve drop click suppression 2026-08-27 19:33:59 +02:00
Space_Hermes 194d62ace3 fix: harden muscle balance stats semantics 2026-08-27 18:34:06 +02:00
Space_Hermes e44d9e7007 fix(routines): harden reorder gesture lifecycle 2026-08-27 18:02:17 +02:00
Horus Gonzalez 0eb36abfdb Give the required weigh-in check-in a visible way out
BwSheet opens `locked` when required (starting a workout) — by design,
so a stray swipe doesn't skip your check-in. But locked also disables
backdrop tap, Escape, and (per Modals.jsx's onPop) the Android back
button/gesture, all silently and all identically on iOS and Android.
The only way out was two ghost buttons below the weight slider, easy
to miss since every other sheet in the app can be dismissed on reflex.

Adds a plain X in the header for the required case — close() only, no
onDone, no nav, so it's a true no-op: whatever screen was underneath
(usually Home, after an accidental tap on "Start") is exactly where
you land. The two existing buttons are untouched; they still cover
"start anyway, skip the weigh-in" and "actually I want a different
workout" as distinct, deliberate choices from a true cancel.

No new strings — reuses the existing 'Cancel' key already translated
in all locales.
2026-08-27 09:03:02 -06:00
Space_Hermes 85ecf3563e feat(workout): swipe between active units 2026-08-27 16:50:59 +02:00
Space_Hermes 5770f3bc04 feat(routines): add long-press reorder 2026-08-27 16:46:25 +02:00
Space_Hermes d5e40db774 feat(workout): add active unit move controls 2026-08-27 12:32:52 +02:00
Space_Hermes cf1e99ac95 feat(workout): safely swap active exercise 2026-08-27 12:07:21 +02:00
Space_Hermes b7631dc9a0 fix(workout): skip rest before warmups 2026-08-27 11:52:02 +02:00
Space_Hermes 82f0b84766 fix(workout): continue after added exercise 2026-08-27 09:15:40 +02:00
Alexby 0b4a224c95 workout: optional per-exercise rest for normal sets
An exercise can now carry its own restSec: the workout timer prefers it
over the global default, a superset rests the longest resolved rest in
the group after each round, and the field travels with shared plans —
normalised on import like every other prescribed number. An explicit
restSec still times its rest when the global timer is turned off; only
the default is silenced. Closes #10.
2026-08-26 16:03:27 +02:00
Moksh 8165e41d8d Fix lrow value overflow 2026-08-26 19:21:16 +05:30
tkyouw 26579e4261 feat: isolate planned deloads from progression 2026-08-26 09:54:24 +02:00
mzspicoli 1aef1d882b feat(timer): add opt-in visual completion flash 2026-08-26 07:28:01 +02:00
doby-llm 4422e4c387 fix(ui): keep picker results above mobile keyboard 2026-08-26 06:39:23 +02:00
doby-llm 40df469fd6 fix(stats): harden historical exercise search fallback 2026-08-26 06:39:23 +02:00