Commit Graph
669 Commits
Author SHA1 Message Date
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
Luke M 44138e07d7 feat: add starter plan chooser and loading flow 2026-09-03 11:36:39 +02:00
Luke M 89fdd1b787 feat: add additional starter plan definitions 2026-09-03 11:36:27 +02:00
Sebastian G 0f1500b102 i18n and tests 2026-09-03 11:24:17 +02:00
Sebastian G a797729dd0 feat(checkin): gym membership QR check-in (mobile-only)
Add a mobile-only gym check-in screen: saved membership codes shown as
QR codes in a swipeable carousel, reached from a 'Check in' card on Home.
Cards are added by typing the code, importing a photo, or scanning with
the camera. Only the code value + symbology are stored — never a photo;
the QR is regenerated from the value on every display.

Rendering uses lean-qr (MIT); camera scan and photo decode use
@capacitor-mlkit/barcode-scanning (Apache-2.0), pinned to the 7.x line
for Capacitor 7. Both are documented in NOTICE.md and bundled only in the
mobile build — the whole feature folds away in web/demo builds via MOBILE,
so nothing new lands in the web bundle. No backend/schema change: gymCards
rides the existing state sync and backup like every other field.

Non-QR symbologies are readable but not reproducible, so capture refuses
them rather than storing a code that would display wrong bars.

Native wiring: CAMERA permission + ML Kit barcode_ui meta-data
(AndroidManifest), NSCameraUsageDescription (iOS Info.plist), mlkit plugin
registered via cap sync. Debug builds get an applicationIdSuffix '.test'
and an 'OpenGymTest' label so a test build installs alongside the real app.
2026-09-03 11:10:58 +02:00
Sebastian G ab95bacaa1 improved RIR edit handling 2026-09-03 10:00:53 +02:00
Manuel 6013874e99 fix: require explicit next after completed exercise 2026-09-02 21:07:48 +02:00
Manuel 697e482033 fix: capture working weight automatically 2026-09-02 17:48:53 +02:00
arhx91 c6d8e873ce Fixed and tested deload spiral 2026-09-02 17:39:09 +02:00
Sebastian G 5e42bd29d6 feat(workout): colour-coded RIR/RPE quick picker 2026-09-02 17:22:02 +02:00
Sebastian G 5375dcc758 Merge remote-tracking branch 'origin/main' into feat/copy-routine
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
2026-09-02 13:29:30 +02:00
Ameer KhanandClaude Opus 5 733dfa9d37 MCP: preview_session — what a routine will actually open with
get_routine reports what a routine stores. That is not what the athlete
sees. buildSets() consults the confirmed working weight and the previous
session's reps first, and applyPrescription() then overwrites the weight
with whatever the progression policy decided — so the routine's own
sets/reps/weight are the last fallback, not the first.

The gap is not academic. A routine holding "squat 3x8 @ 60 kg" opens at
75 kg when Greyskull deloaded from the last logged session, and an LLM
reading get_routine will confidently name a weight the app never shows.
Editing the routine to fix it changes nothing, which is worse.

preview_session mirrors beginWorkout() exactly — buildSets,
applyPrescription, applyIntensifierPlan — and returns, per exercise:
the planned target, the policy's decision with its stated reason, the
opening set rows including planned drop sets, and which of plan /
confirmed weight / history each number came from. `overridden` lists
just the exercises where the stored plan and the opening session
disagree, so the discrepancy cannot be scrolled past.

Read-only, no new dependency, one new tool registration. This is the
Phase 1.5 `progression_next` item from the README roadmap, named for
what it answers.

9 tests: precedence in both directions (plan wins with no history,
confirmed weight beats plan, policy beats both), reps carrying from
history, drop-set rows, explicit routine_id, rest day, unknown id.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DUgSPgBBqMYdy4vnKjK3bE
2026-09-02 08:18:56 +00:00
mzspicoli ad4bee99be Timer flash: blink the real theme instead of a black/white overlay, skip it while the app is backgrounded
The completion alert (Settings → "Flash screen when timer ends") laid an
opaque black/white rectangle over the whole screen, so the app's own UI
flickered into view between pulses. It now flips document.documentElement's
data-theme (light/dark) three times and settles back on whatever theme the
user actually had — same duration, no overlay, no rectangle. Fully dark ->
light, dark, light; fully light -> dark, light, dark; either way it lands
back where it started.

Separately: the rest/work timers reuse their tick on 'visibilitychange' to
stay accurate after the tab is throttled in the background. That reuse had
a side effect — reopening the app (or the tab regaining focus) after the
countdown had already finished while hidden replayed the completion beep,
vibration, flash and toast, even though nothing was actually watching when
it ended. Now those perceptible effects only fire if the countdown reaches
zero while the app is genuinely visible; finishing hidden only sends the
existing push notification, and reopening later stays silent.
2026-09-02 07:27:30 +02:00
Duarte Santos 272bf785ee Website: Kaffee auch als Menue-Zeile, und der Becher bleibt grau
Auf dem Handy war der Becher in der Leiste gelb -- das war zu laut. Jetzt
ist er ueberall dasselbe Grau wie die uebrigen Kopf-Links.

Dazu kommt die Zeile im Menue-Sheet zurueck, direkt unter Discord: der
Becher steht rechts am Rand, genau dort, wo GitLab seine Sterne und
Discord seine Mitgliederzahl hat. Beide Wege bleiben -- Becher in der
Leiste und Zeile im Menue.

Cache-Bust auf ?v=16.
2026-09-01 19:02:22 +02:00
Duarte Santos d9e50a4b5b Website: der Kaffee-Link sieht aus wie ein Link, nicht wie ein Knopf
Auf dem Desktop war die gelbe Pille zu laut neben dem Download. Jetzt ist
es derselbe graue Text wie GitLab und Discord, nur mit dem Becher davor --
kein Gelb, kein Rund.

Auf dem Handy bleibt der Becher in der Leiste statt ins Menue-Sheet zu
fallen: rechts neben dem Download, ohne Text und darum im BMC-Gelb, damit
das Logo allein noch etwas sagt. Der Sheet-Eintrag faellt dafuer weg.

Cache-Bust auf ?v=15.
2026-09-01 18:49:47 +02:00
Duarte Santos 5080a8e384 Website: Kaffee-Link neben Discord in den Header
Der Header hat bisher nur unten im Elsewhere-Block auf Buy Me a Coffee
gezeigt. Jetzt steht der Link mit dem BMC-Becher direkt neben Discord --
als hohle Pille, damit der volle Knopf der Download bleibt.

Auf allen vier Seiten identisch (inkl. der api.html-Vorlage im
Generator), unter 1000px faltet er wie die anderen ins Menue-Sheet.
Cache-Bust auf ?v=14.
2026-09-01 18:42:27 +02:00
Duarte Santos d93258ad3f Doku: die vier Features nachtragen, die noch nirgends standen
README, Startseite und Referenz beschreiben jetzt, was seit v1.2.14 auf main
liegt und bisher nur im Code stand:

- Stangengewicht/Scheiben-Rechnung (README-Punkt, Feature-Karte, Absatz unter
  "Running a workout"),
- Wochenstart Montag/Sonntag,
- die Ruhetagszeile auf Home, die die naechste Einheit nennt — als Zusatz am
  vorhandenen "Guided workouts"-Punkt, nicht als zweiter fast gleicher,
- "Exercise animations: Full/Small/Hidden" (887a036), das seit dem Release
  ueberhaupt nicht dokumentiert war.

Dabei zwei Zaehler nachgezogen, die seit den letzten beiden Sprachen falsch
waren: die Feature-Karte sagte "13 languages / instructions in 11", about.html
"learned 13 languages" — es sind 14 und 12, und die Uebungsnamen sind auch auf
Ungarisch zweisprachig. Die Karten-Ueberschrift zaehlt jetzt sechzehn.

Kein Versionsbump: main bleibt unreleased, das sammelt sich fuer v1.2.15.
2026-09-01 14:40:36 +02:00
Duarte Santos 44bb67a71c Wochenstart: Montag oder Sonntag, und die ganze App folgt
Wo eine Woche anfaengt, ist eine oertliche Konvention, keine Tatsache: Europa
faengt meist am Montag an, Amerika und weite Teile Asiens am Sonntag. Die App
hat Montag vorausgesetzt — nicht an einer Stelle, sondern an sechs, jede mit
ihrer eigenen Kopie von `(getDay() + 6) % 7`.

Neu: Einstellungen → Allgemein → "Woche beginnt am", zwei Knoepfe. Gespeichert
wird S.weekStart als getDay()-Index, Standard 1 — jedes Profil, das es vor
dieser Einstellung gab, sieht also weiter genau die Woche, die es kennt.

Gelesen wird das Feld nirgends direkt. In lib/format.js stehen jetzt
weekStartOf, weekOrder, weekDayOffset und startOfWeek, und alles, was eine
Woche zeichnet oder gruppiert, fragt dort nach: die Wochenliste im Plan, der
Tage-Streifen und der Wochen-Zaehler auf Home, das Kalender-Raster samt
Spaltenkoepfen, die Wochen-Serie, das 7-Tage-Fenster der Muskelbilanz (das
"diese Woche" heisst und nicht "die letzten sieben Tage") und die Wochenpunkte
im Anstrengungs-Diagramm. Der geteilte Plan-Ausdruck laeuft in der Reihenfolge
dessen, der ihn exportiert.

weekKey() gibt dafuer nicht mehr die ISO-Kalenderwoche zurueck, sondern das
Datum des ersten Wochentags. Der Schluessel wird nur verglichen, nie angezeigt
und nie gespeichert — und "2026-35" ist Montag-definiert, es gibt kein
Sonntag-Gegenstueck, auf das man ausweichen koennte.

Die Hilfsfunktionen kommen mit jedem Wochentag klar; angeboten werden nur zwei.
Ein Samstagsstart braeuchte einen Locale-String und sonst nichts.
2026-09-01 14:23:23 +02:00
Duarte Santos 9d7abdab44 Admin-Dashboard: jede Karte sagt in einem Satz, wofuer sie da ist
Das Dashboard war fuer jemanden geschrieben, der es taeglich sieht. Wer es
zweimal im Jahr aufmacht, muss sich erinnern, was "synced 3d ago" heisst, ob
ein Invite-Code weg ist, wenn er widerrufen wird, und was mit den Daten
passiert, wenn ein Konto deaktiviert wird. Alles Antworten, die die Seite
kennt und nicht gesagt hat.

Jede Karte oeffnet jetzt mit einem Satz: die Invite-Karte sagt, ob Anmeldung
ueberhaupt invite-only ist (steht laengst in /api/admin/users, wurde nur nie
angezeigt) und dass jeder Code einmal funktioniert; die Nutzer-Karte sagt, dass
Deaktivieren nichts loescht; das Aktivitaetslog sagt, was drinsteht. Der
Deaktivieren-Knopf trägt denselben Satz noch einmal direkt darunter, weil man
genau dort zoegert.

Widerrufen fragt jetzt nach, statt sofort zu loeschen — die einzige Aktion auf
der Seite, die ohne Rueckfrage etwas kaputtmachen konnte. Codes sind in
"Unused · tap to copy" und "Already used" getrennt, sind selbst tippbar und
haben zusaetzlich einen Kopier-Knopf mit 44px-Trefferflaeche.

Optisch: `tag` wird `adm-pill` — ein Wort mit Punkt davor, statt farbigem
Kleingedrucktem. Kuerzel ausgeschrieben ('3m ago' → '3 min ago', 'Active 7d' →
'Active 7 days', 'ex 2/5' → 'exercise 2 of 5', 'off' → 'disabled'), Trennlinien
auf `var(--hair)` wie im Rest der App, leere Zustaende sagen, was zu tun ist.

Neu: frontend/src/admin.css. Englisch-only wie die Seite selbst, also keine
Strings in den Sprachpaketen.
2026-09-01 14:16:09 +02:00
Duarte Santos ddaaf12929 Home: an einem Ruhetag steht dort, wann die naechste Einheit ist
Die Today-Zeile war an einem Ruhetag eine Sackgasse: "Pausentag", Punkt. Die
Antwort auf die naechstliegende Frage — wann dann? — steht schon im State, nur
hat sie nie jemand ausgesprochen.

nextTrainingDay() sitzt neben effectiveRoutine und schaut ab morgen sieben Tage
voraus. Es nimmt ein ISO-Datum statt die Uhr zu lesen, damit Aufrufer und Tests
sich einig sind, was "heute" ist. Ein Tag mit einer Routine ohne Uebungen zaehlt
nicht: den zu starten landet in einer leeren Session, ist also keine Antwort
(dieselbe Bedingung, die auch die TabBar vor dem Start prueft). Verschiebungen
aus dayPlan gelten in beide Richtungen — ein auf 'rest' gesetzter Tag faellt
raus, ein per Datum eingeplanter kommt rein. Ist die ganze Woche Pause: null,
und die Zeile bleibt wie sie war.

Angezeigt nur, wenn heute wirklich nichts ansteht — kein laufendes Training,
keine Routine, kein schon erledigtes Training. Strings in allen vierzehn
Sprachen, pt-BR-Fingerabdruck nachgezogen.
2026-09-01 14:13:36 +02:00
Duarte Santos 45c4756cd0 Stangengewicht: Scheiben-Rechnung pro Seite, pro Uebung einstellbar
Wer an der Stange arbeitet, rechnet vor jedem Satz dasselbe im Kopf: was muss
pro Seite drauf. Die App kennt beide Zahlen laengst — das Gesamtgewicht steht
im Satz, der Stangentyp in der Uebung — und hat sie nie zusammengebracht.

Neu: lib/bar.js mit den ueblichen Stangen (Olympia 20 kg, EZ 10, Multipresse 9,
Trap 25) und den Markierungen, die ein lb-Profil wirklich im Rack hat (45, 25,
20, 55) — keine umgerechneten 44,1 lb, die auf keiner Stange stehen. Das
Stangengewicht liegt in S.barWeights pro Uebung und in der Profil-Einheit, wie
jedes andere Gewicht im State: ein Einheitenwechsel beschriftet um und rechnet
nicht, sonst waere die Stange die eine Zahl, die unter dem Nutzer wegrutscht,
waehrend die Totale drumherum stehen bleiben.

Eingetragen wird weiterhin das Gesamtgewicht. Historie, Progression und 1RM
bedeuten exakt das, was sie vorher bedeutet haben — die Stange ist reine
Anzeige-Metadatei und speist nur die Rechnung "(Total − Stange) / 2".

Im Workout haengt der Chip "Stange 20 kg · 30 kg pro Seite" am Satz, der als
naechstes dran ist (erster offener; ist alles abgehakt, der schwerste). Ein
Tipp darauf oeffnet dieselbe Stepper-Zeile, die auch in Uebungsdetail und
Konfiguration steht — auf 0 gestellt faellt die Uebung auf den Standard ihres
Stangentyps zurueck, dieselbe "0 loescht den Schluessel"-Form wie bei den
nullbaren Satzfeldern.

Strings in allen vierzehn Sprachen; der pt-BR-Vererbungs-Fingerabdruck ist
nachgezogen (4 Overrides, 3 geerbt).
2026-09-01 14:11:51 +02:00
Sebastian G ca9829d2b5 test: update pt-BR override count for Copy routine strings (338 -> 340)
The Copy routine feature added 2 pt-BR override strings but the snapshot
count in pt-br-locale.test.js was not updated, failing the pipeline.
2026-09-01 09:47:33 +02:00
Sebastian G e854d9dce7 i18n: add translations for Copy routine in all 14 locales 2026-08-31 22:21:09 +02:00
Sebastian G 19f09dcccc feat: add copy routine button to RoutineEdit view 2026-08-31 21:10:36 +02:00
Manuel 6fece17197 fix: align manual weight normalization 2026-08-31 19:12:18 +02:00
Manuel 40ae5a6f9d fix: use exercise weight step for workout controls 2026-08-31 18:54:22 +02:00
Duarte Santos 75fb168a03 website: the Discord member count next to the star count
The nav has advertised the repo's stars since the GitLab move but said nothing about
the community, which is by now the larger number of the two. Both links now carry
their count: GitLab ★ 185, Discord 1,084.

Discord hands an invite's guild counts to anyone who appends ?with_counts=1 — no bot
token, no server widget to switch on, and the API reflects the caller's Origin, so the
browser may read it. The count is fetched exactly like the repo counts: once per tab,
cached in sessionStorage, and failing soft — a blocked or revoked request leaves the
link reading "Discord", the way it read before.

The numbers panel on the home page gains a sixth cell for it and loses the "repo" in
its caption, since the counts are no longer all from the repo. Six cells divide evenly
where five left a hole, so the row that used to span the full width at the narrow
breakpoint goes away: six, then three, then two.
2026-08-31 18:28:50 +02:00
Space_Hermes 1224b05d34 fix(workout): make progression guidance actionable 2026-08-31 15:48:10 +02:00
Duarte Santos 523cfc9df7 website: one header on every page, one contents drawer that starts closed
The docs page used to swap the site's links for its own three and unfold the
chapter rail on arrival, so half the navigation vanished the moment you opened
the documentation and a sidebar you never asked for was already there. Both are
gone. Every page — home, about, docs, API — now serves a byte-identical nav bar
and navigation sheet; which page you are on is marked with aria-current at
runtime, so nothing is ever added or dropped from the markup to say it.

The rail is now separate from the header and the same object everywhere: closed
in CSS at every width, opened by one Contents pill, closed by the ✕ in its own
sticky header, by Escape, or by a tap on the dimmed page. No preference is
remembered any more and the stale og_rail key is cleared on sight. One panel
controller in site.js drives both the sheet and the drawer, traps focus while
either is open and hands it back to the button that opened it. api.html no
longer carries a private copy of any of this.

Also: visibility is switched at one instant instead of being transitioned —
interpolating it left both panels hidden through their own opening animation,
so they popped in at the end and nothing inside could take focus until then.
Long inline code breaks instead of widening the page (docs ran 21px wide of a
320px screen), the header folds at one breakpoint rather than three, and every
control in the rail clears 44px.

246 headless assertions across four pages and five widths: nav and sheet
markup identical, drawer shut on first paint, no horizontal overflow, focus
returned, reduced motion honoured, no console errors.
2026-08-31 14:32:32 +02:00
Duarte Santos 572f50cd4f API reference rebuilt: Swagger UI out, a generated static page in the site's own design
api.html was Swagger UI with the site's colors painted over it — a foreign layout in
a black-and-green frame. It is now generated: scripts/build-api-docs.mjs reads
api/openapi.yaml and emits the whole reference as static HTML, so the page needs no
runtime rendering and no CDN bundle. One card per endpoint (method badge, path, one
line of summary) that unfolds into the description, what authentication it wants, the
parameter and body tables and the response codes; the named schemas live once in their
own section and every type links to them. The chapter rail is the site's own .side
markup — the hamburger sheet on a phone, a Contents drawer from 980px up.

The generator is deterministic and re-runnable: node scripts/build-api-docs.mjs
rewrites website/api.html, and the file says so in its first comment. js-yaml is a
build-time devDependency in the repo root; nothing new ships to the browser.

Also drops gym.duarte-santos.ch as an example server from the spec. That instance is
semi-private, and the docs have no business pointing anyone at it: the servers are now
the relative / and a neutral https://opengym.example.com ("your self-hosted instance").
2026-08-31 14:08:24 +02:00
Duarte Santos f2b3a0f028 API documented: hand-written OpenAPI 3.1 spec for every route in api/server.js (passkeys, sync, push, pairing, admin), Swagger-UI page api.html on the site, API link in the nav 2026-08-31 11:06:13 +02:00
Duarte Santos 887a036832 Hide exercise animations during a workout: gifSize gains 'off' — Settings segment Full/Small/Hidden, workout media collapses entirely when hidden, strings in all 14 languages; pt-BR guard re-fingerprinted 2026-08-31 11:02:57 +02:00