Commit Graph
76 Commits
Author SHA1 Message Date
dsantillan aa6ec8ef22 Salud: a card opens onto the day, hour by hour, and onto the days before it
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Reported as "le doy a cualquier actividad y solo me presenta los pasos de hoy… debiera
presentarme una medida por hora, y no me da el histórico". Two separate things, and only one
of them was the app's fault.

**The history was the automation's setting.** With Date Range on its default (`Today`) every
sync carries today and nothing else, so there is exactly one day in the file to draw. That is
why a card looked frozen: not a rendering bug, a range that was never sent. The setup steps
now say `Previous 7 Days` and say why.

**The hours were thrown away by us.** Even when the phone sends 288 readings a day, the
receiver folded every one of them into a single day aggregate, so "8,123 steps today" was all
there could ever be — a number you cannot look into. Worse, the recommended setting was Time
Grouping `Days`, which sends one point per metric per day: the intraday detail never arrived
in the first place. The recommendation is now `Hours`, and the storage keeps the hours.

The merge rule for them is the same shape as the day rule, for the same reason: a payload
whose datapoints all sit on the hour is HAE's own hour grouping, and the hour *in progress*
grows on every run of a five-minute automation, so it is replaced and never unioned — 500 +
900 + 1,340 steps in one hour is a number no watch recorded. The day is then recomputed as
the sum of its hours, which is what keeps the card and the detail from ever disagreeing, and
which also makes switching an automation from Days to Hours mid-day converge instead of
double-count. Raw samples (real timestamps) still union by instant plus numbers, and they now
land in their own hour, which is where intraday detail comes from when nothing is grouped.

Three things that would have been silent bugs, caught while writing it:

- The hour rule is decided from the **whole payload**, never from one timestamp. A five-minute
  automation produces samples that sit exactly on the hour, and reading one of those as an hour
  total wipes the hour it belongs to. There is a test with a 09:00:00 and a 09:05:00 sample in
  one payload, and it fails against the per-point version of the rule.
- A day that arrived as a day total keeps its hours beside it, and a day stored before this
  existed keeps its aggregate when the first hour shows up — recomputing it from hours it does
  not have would delete 2,000 steps. Both are mutation-checked (removing either guard fails a
  test).
- A payload grouped by hour writes the ledger row anyway, because a later payload with real
  minutes can describe the same instant and the union path can only see the ledger. Without it
  the raw-sample route test double-counts a single sample.

The hours are the bulky part of this data, so they are kept for a week (the day aggregates
still live the full 400 days), pruned when the night's file is written, and fetched one metric
and one day at a time — `GET /api/vitals/hours`. A screen listing forty cards downloads none
of them; the day view carries only a count per day, which is what tells the sheet whether it
is worth asking. The sheet draws the hours, the days before it (tapping one moves the hour
list to that day), and every field the watch sent; when the automation groups by Days it says
so instead of leaving a gap where a chart should be.

Coverage: 6 new tests in `api/test/vitals.test.js` (19 total) and a route test in
`api/test/server-vitals.test.js` (5), the hour/history model in `vitals-view.test.js` (31),
three render tests through the real sheet, the route documented in `api/openapi.yaml` and
`website/api.html`, and `docs/HEALTH.md` with the settings, the new merge row and the two
symptoms now in Troubleshooting.
2026-09-23 13:28:58 -04:00
dsantillan 9e580c4794 Cards you can see through, a splash that waits, and iOS launch screens
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
**The transparency was there and invisible.** `--glass` was a near-black at 55% alpha, and a
dark film over a dark background reads as solid no matter what the alpha says — so the cards
looked exactly as opaque as before. It is 34% now, the family tint weighs a little more
(14%) and the blur is 10px instead of 16: heavy blur flattens the backdrop into one colour,
which hides the very thing that is supposed to show through.

The opaque `@supports` fallback is gone as well. It was copied from the tab bar, where it is
right — the bar floats over scrolling text — and it is wrong here: a card sits in the page
flow and the only thing behind it is the aura. On any device that took that branch, the
cards were solid by construction.

**The splash now waits, which is what a launch screen does.** It stays until the boot is
finished, with a floor of 1.1s so it can actually be read (a warm boot takes milliseconds,
and a splash that lasts that long is a flicker) and a ceiling of 6s so a request that never
answers cannot hold anybody behind a photograph — their workouts are already local. The mark
pulses slowly while it waits, so it looks like a screen that is loading rather than a
photograph that is stuck.

**The long white is iOS, before any of our code runs.** The deployed HTML already carries
the aura's base colour inline, so what is left is the installed web app's own launch screen:
iOS paints it before the page exists, and without an `apple-touch-startup-image` that
matches the device it paints nothing. Fourteen entries now cover the phone and tablet sizes
the app is opened on, cropped from the same photograph (each device fetches only its own).
build-app-icons.mjs fails when the sizes it generates and the sizes index.html links
disagree, because a missing entry is the blank screen this exists to remove.
2026-09-23 11:47:52 -04:00
dsantillan c3c1c2836c Salud: Today by default, chart panels, and an aura behind the whole app
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Three things the screen was missing, plus the launch photo.

**Today.** The period filter started at 30 days, which buried the question a five-minute
cadence exists to answer: what do the numbers say right now? "Today" is now first and the
default, and it means today — the grid drops metrics nobody has measured today (the scale
is not stepped on every morning), and if nothing has come in yet the grid falls back to
everything and says so rather than showing an empty screen. The number on every card was
always the newest reading; what is new is that the card says which day it is and when it
landed ("hoy · hace 12 min"), so the claim can be checked instead of trusted. The screen
also refreshes itself every minute while it is open, which is what makes a five-minute
cadence visible.

The filter and the charts want different windows, and the view keeps them apart: a
sparkline or a trend needs history, so the fetch never asks for less than a week even in
"Today", and anything labelled with a window says which one it is. (The alternative —
fetching one day and drawing nothing — would have made Today the one mode with no charts.)

**Chart panels.** Every tile carries a 52px sparkline, which shows a shape and cannot be
read. The first few metrics in the catalogue's own order now get a full-width panel each:
axes, the window's min / avg / max, and the card's own colour, so a panel and its tile are
recognisably the same metric.

**The aura.** index.html carries the three "Diamond Weave" layers and index.css puts the
base colour on `body` where the blend modes composite against it, with `#app` lifted to
z-index 1 so the absolutely-positioned layers cannot paint over the page (everything modal
was already higher). Dark keeps `screen`; the light theme switches the same layers to
`multiply`, because screened amber over white is amber that has been washed away. The blur
radii follow the spec per breakpoint, and the layers are fixed rather than absolute so
scrolling never repaints two 200px blurs.

**The launch screen.** assets/splash.jpg is a 3862×5786 photograph from a camera, so
nothing ships it raw: build-app-icons.mjs now derives public/splash.webp (1170px wide, 62 KB
— WebP because it is a photo) for the boot screen and resources/splash.jpg (2732×2732,
fitted on the aura's base colour rather than cropped, so a portrait composition survives)
for @capacitor/assets. The 12 MB original is gitignored: the derived files are committed,
so a clone still builds, and the script says what is missing when regeneration is asked for
without it.
2026-09-23 11:32:51 -04:00
dsantillan c150101232 The app's own mark: assets/logoym.png becomes the icon, the brand, and the Start button
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Every icon the app ships now comes from one source image, generated rather than drawn:
frontend/scripts/build-app-icons.mjs writes public/icon-512.png (declared "any maskable"
in the manifest, hence an opaque square), public/icon-180.png (iOS home screen and
favicon), public/logo.png (transparent, for the UI) and resources/icon.png (the
@capacitor/assets source for the native shells).

The file was a PNG despite its .jpeg name — it has a real alpha channel — so it is
assets/logoym.png now. It is the file the owner dropped in, and the icons are derived
from it, which is what keeps the PWA icon, the home-screen icon, the in-app mark and the
native icon from ever drifting apart.

The emblem is dark green (its most common colour is #031808, its accents are greens too)
with transparent corners, which decides two things. The icon squares are filled with that
same dark green and the mark is centred at 88% of the canvas: the corners blend into it,
the maskable safe circle stays clean, and a transparent icon can't disappear on a dark
home screen. And the tab bar's Start button keeps the accent as a RING instead of a fill —
on the old lime disc the emblem would have read as a dark blob. The ring still marks the
primary action, and it still turns orange with the pulse while a session is running, with
the label underneath saying Start / Resume / Workout, so nothing that button communicated
was lost by swapping its glyph for the mark.

Login, the mobile onboarding and the boot placeholder in App.jsx showed the dumbbell glyph
as a stand-in for the brand; they all show the mark now, so the app cannot flash a
different logo on its way in. Three now-unused Icon imports go with it.

Icons are written as 256-colour palettes: measured against the full RGBA versions the mean
per-channel error is 1.5/255, invisible, and the files are ~2.5× smaller (161 KB for
everything the browser downloads, against 532 KB of source). Transparency survives it as
the palette's own alpha entries — verified, not assumed.

docs/MOBILE.md says how to regenerate and why resources/icon.svg is now inert
(@capacitor/assets tries .png before .svg, so the new icon.png wins), and that comment is
repeated in the SVG itself so nobody edits the file that no longer decides anything.
2026-09-23 10:41:33 -04:00
dsantillan 8d190bb591 Salud moves to Home's header: a sixth tab pushed Start off centre
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
The tab bar is a flex row of equal columns with the Start button raised in the
middle, so the tab count has to stay odd. Adding Salud as a sixth pushed that disc
half a column to the right, and it read immediately as "the button moved" — the
app's primary action is the one thing in the bar that must not drift.

Salud is now the heart button in Home's header, next to the gear, with the same
destination and the same route (/health). It is reachable from Settings → Data as
well, which was already there. The tab bar is back to five: Home, Plan, Start,
Stats, Exercises.

Two tests, because this is the kind of change that regresses silently: TabBar.test.jsx
asserts the odd count and that the raised button is the middle child (plus that no tab
points at /health), and Home.health-door.test.jsx asserts the heart sits in the same
non-shrinking container as the gear and navigates to /health — if that breaks, the
screen is only reachable from Settings, where nobody looks for it.

Also: the Comments in Home, TabBar, README, CHANGELOG and docs/HEALTH.md now say
where Salud is, and one test assertion checks flexGrow/flexShrink rather than the
`flex: none` shorthand — the CSSOM rewrites that to `0 0 auto`, which is what the
first version of the test tripped over.
2026-09-23 10:23:31 -04:00
dsantillan 691e664d3f Apple Health (Salud): a per-profile ingest endpoint, and a tab that draws it
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
An iOS automation in Health Auto Export POSTs Apple Health to /api/vitals/ingest,
and the new Salud tab (next to Plan) draws whatever arrived: steps, heart rate,
sleep, weight, oxygen, workouts and every other metric HAE can export, grouped into
cards with a trend, a sparkline and a 7/30/90/365-day range. Nothing on that screen
is an input, and the watch's workouts stay out of the history on purpose — they
carry no sets and no weights, so folding them into progression, PRs and the recovery
model would be inventing data.

The interesting part is duplicates. A five-minute automation re-sends overlapping
windows: with Date Range "Today", appending would count a day of steps again on
every run, and with "Since Last Sync", replacing would throw away everything but the
last five minutes. So the endpoint decides per payload instead. Datapoints that sit
on midnight are HAE's own day grouping, i.e. a *total*, and a day total replaces the
day it names — re-sending the same day all afternoon converges on that day's total.
Anything else is a real sample, identified by its instant plus its numbers and
stored once, which is right for overlapping and disjoint windows alike. Every sync
answers with a receipt (received / duplicates / stored), so a misconfigured
automation is visible rather than silent, and day keys come from the date the phone
wrote — never the server's clock, or every evening's steps would land on tomorrow.

Per profile and private by construction. Each profile mints its own ingest key
(Salud → ⚙), which is write-only: it can add to that one profile's health file and
cannot read a single number back, so a key leaking out of a phone is a nuisance
rather than a disclosure. It is its own credential, so rotating it disconnects a
phone without signing anybody out anywhere. The data lives in
data/vitals-<uid>.json, outside the synced state document, so a year of heart rate
never round-trips through localStorage on every device, and it is bounded on write:
400 days per metric, a 72 h dedupe ledger, the newest 300 workouts.

Two traps that only exist in production, both fixed here and both of which would
have shipped broken. api/Dockerfile copies the modules server.js imports by name,
and vitals.js was not on that list — a container that boots straight into
ERR_MODULE_NOT_FOUND. And the web container's nginx capped every /api body at 5 MB,
which a health export with Summarize Data off exceeds; that one route now gets the
API's own 32 MB while every other path keeps 5 MB, with the shared proxy settings
hoisted to server level so the two locations cannot drift apart.

Coverage: vitals.js (13 tests — overlapping, disjoint, day-grouped, raw, heart rate,
sleep, blood pressure, pruning, timezones), the routes against a real server (4 —
isolation between profiles, a key that cannot read, ten re-sends changing nothing),
the card model (18) and the screen (4). docs/HEALTH.md has the Health Auto Export
settings and the merge table; the five endpoints are in api/openapi.yaml under the
health tag, and website/api.html is rebuilt from it.
2026-09-23 10:11:00 -04:00
dsantillan 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).
2026-09-21 14:29:54 -04:00
Duarte Santos 542c3f493a Serving openGym under a subpath works, with or without the prefix reaching the container (#238)
The app's assets were already relative — the shell loads fine from any directory, which is how
the demo lives under /demo/. What assumed the site root was the API call: `fetch('/api/...')`
went to the proxy's own root, where there is nothing to answer it, so behind
`https://example.com/gym/` the app booted and then could not talk to its server.

It now asks its own address instead: `appBase()` reads the directory the app is being served
from, which the router never leaves — every screen is a hash, and a path that is not a file is
sent back to the app's root before React boots. A proxy that strips its prefix (Caddy's
`handle_path`, Traefik's StripPrefix) therefore needs no configuration at all.

For a proxy that passes the prefix through, the web container takes `BASE_PATH=/gym`, rendered
into its nginx config at start-up like the other settings, so it applies to a prebuilt image.
Wired through docker-compose.yml as well — a documented setting the compose file does not pass
on is no setting at all.

Both shapes were checked in containers rather than read: with BASE_PATH empty the shell, the
assets, /api and the deep-path redirect behave exactly as before; with BASE_PATH=/gym all four
work under the prefix and the redirect stays inside it. The first attempt passed at /gym/ and
404'd /gym/assets/app.js, because a regex location outranks the prefix block and never saw its
rewrite — the cache-control blocks carry it too now. The built app was then loaded in a browser
under /gym/ and its own requests go to /gym/api/config and /gym/api/me.

Reported by leon332157.
2026-09-20 20:16:52 +02:00
Boris KurktchievandClaude Fable 5.1 7abada3bfc docs: behind an auth proxy, let the icons and the manifest through without a login
iOS fetches the Home Screen icon outside the page, without the session cookie
(observed on iOS 26.6 behind Teleport: the page and the manifest reach nginx,
the icon request never does, iOS draws a letter tile). The manifest attribute
in the previous commit covers the manifest fetch; the icon fetch is the proxy's
to exempt. Names the knob for Authelia, Authentik, Cloudflare Access and
oauth2-proxy, and says what a proxy without path exemptions has to do instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-12 20:02:43 -04:00
Duarte Santos 8266cca1ad Merge !110: nginx resolver configurable so /api works outside Docker, #148 (T13o)
# Conflicts:
#	web/nginx.conf.template
2026-09-12 22:53:45 +02:00
Duarte Santos 88a1c317e5 Docs: where push works (iOS only from the Home Screen, the APK uses local notifications), the 15-minute catch-up and the self-healing subscription 2026-09-12 13:28:06 +02:00
Boris Kurktchiev db48e6e00d web: nginx allows 5 MiB on /api/ to match the API (#160 finding 10); SELF_HOSTING names the proxy body limit 2026-09-11 10:23:58 -04:00
Duarte Santos 38a0b52e36 Mirror to GitLab from GitHub Actions; docs: GitHub is home, GitLab the mirror
A push to main or a v* tag on GitHub is forwarded to gitlab.com by a workflow, fast-forward
only, main before the tags so the tag pipeline finds its commit on main. Pull mirroring on
gitlab.com is paid, so the push runs from this side; it needs a project token with the single
scope write_repository (Maintainer role, for the protected main and v*) as the secret
GITLAB_MIRROR_TOKEN, handed to git through a credential helper rather than a URL.

README, CONTRIBUTING, MOBILE and the changelog now say what the site says: issues and pull
requests on GitHub, the GitLab mirror only for the CI that builds the release artefacts, the
merge requests still open there reviewed until they are through.
2026-09-11 11:58:39 +02:00
Duarte Santos 53b46fde14 Docs: openGym is back on GitHub — both repos carry the same history, releases and images
The README, CONTRIBUTING, MOBILE and SELF_HOSTING pages said the GitHub repo was offline and
GitLab was the only home. The account is back: GitHub gets the tags, the releases v1.2.9 to
v1.3.5 with APK and checksum, the GHCR images and the Pages demo; GitLab keeps its CI, issues
and merge requests. Links now name both, the pages.yml comment no longer calls itself dormant.
2026-09-11 11:16:51 +02:00
Duarte Santos b4f8bdf2fc CI: build the signed APK on every main push, and a build:ios job that waits for a Mac runner
build:apk was a manual job on main since it cost ~8 shared-runner minutes; the project runner
on the VM pays for it now, so every main push produces the APK (same key as the release,
artifact at /-/jobs/artifacts/main/browse?job=build:apk) and a broken Android build is caught
before the tag. Merge requests keep the manual button.

build:ios: mobile bundle + xcodebuild archive without a signing identity → unsigned .ipa
(AltStore/Sideloadly), tag builds also into the generic package registry opengym-ios/<ver>/.
Only exists once IOS_RUNNER_TAG names a registered Mac runner; untested until then.
2026-09-10 14:48:57 +02:00
TheInfamousToTo 2df725de84 web: make the nginx resolver configurable so /api works off Docker
The /api location re-resolves BACKEND on every request, which needs a resolver
address, and that address was hardcoded to 127.0.0.11 — Docker's embedded DNS.
Nothing listens there on another runtime, and an unreachable resolver does not
fail fast: every /api request hangs until it times out, with nothing in the
error log to say why. On Kubernetes that means the app shell loads and the whole
API is dead.

RESOLVER now carries it, defaulting to 127.0.0.11 so Docker and every existing
compose file are unchanged. Kubernetes sets it to the kube-dns service address;
Podman to whatever its network provides. Documented next to the four other
render-time settings in SELF_HOSTING.md, since it belongs to the same "fitting
it into an existing stack" problem.
2026-09-07 21:42:51 +03:00
HenryandClaude Sonnet 5 f97fcbccd7 docs/COMBINE_ROUTINES: carry the spec onto the implementation branch
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVbWJtoyQU4WgwFR4eAKgy
2026-09-06 19:27:24 +01:00
HenryandClaude Sonnet 5 bf4ffffcc7 docs/LIST_VIEW: correct the list-mode footer description
Move/Swap/Remove and the "marked Current" hint are gated by
S.wc.exerciseButtons (off by default) — the lean default keeps them in
each exercise's ⋯ menu. Also note compact hides the pair buttons and that
list/compact blocks use the compact ExerciseBlock prop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QqZBhX7PVNsRqLhkTt9y3
2026-09-06 19:27:24 +01:00
HenryandClaude Sonnet 5 e7a4597478 Workout view: add a "compact" layout and a per-session ⋮ switcher
S.workoutView gains a third value, 'compact': the list layout with each
ExerciseBlock rendered `dense` — no media, tag chips ("Best:" included),
note lines, "Last time" recap, bar/plates chip or progression-guidance
line. Just the name, the ⋯ menu and the set rows. Everything stripped is
still on the ⋯ menu or is display-only.

- Settings → During a workout → Workout view is now a 3-way Segmented
  (Cards / List / Compact).
- The workout header gains a ⋮ button (menuSheet) that writes
  s.active.workoutView, overriding the layout for the running session.
- beginWorkout / beginBackfill snapshot S.workoutView onto s.active, and
  the render prefers A.workoutView || S.workoutView — so changing the
  saved default never disturbs a workout already in progress.
- 'Compact' added to all 14 locales; pt-BR inheritance fingerprint
  regenerated (inherited 613 → 614).

cards / list behaviour is unchanged. Component tests in Workout.test.jsx,
Settings.workoutview.test.jsx and a new sheets.workoutview.test.jsx;
docs/LIST_VIEW.md rewritten to the shipped model.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QqZBhX7PVNsRqLhkTt9y3
2026-09-06 19:27:24 +01: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
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 1cb4909901 Coach-Doku: ehrliche Warm-Zeiten (eine bis wenige Minuten, je nach CPU)
Gemessen auf der Staging-VM (~12 Prompt-Tokens/s): Review mit frischer Payload 222 s warm;
'etwa eine Minute' gilt erst auf moderner Hardware.
2026-08-31 08:46:09 +02:00
Duarte Santos ae9d6785ac Coach: Admin-Karte als Setup-Assistent, sichtbarer Einstieg im Plan, Doku-Kapitel auf der Website
Solange der Coach aus ist, zeigt die Admin-Karte einen sauberen Pitch mit einem Knopf statt
halb ausgegrauter Regler; danach ein echter Assistent: nur der naechste offene Schritt ist
aufgeklappt, ein Fortschrittsbalken zaehlt mit, fertige Schritte falten sich zur Quittung.
Arbeitende Knoepfe sind getoent statt grau (List models, Replace key), der deaktivierte
Test-Knopf erklaert, welcher Schritt noch fehlt, Provider-Chips haben einen klaren
gewaehlt-Zustand. Der Coach-Einstieg im Plan ist eine deutliche Karte mit Farbverlauf statt
einer Settings-Zeile. Website: das #coach-Kapitel erklaert Pipeline, Provider, den komplett
lokalen Betrieb inkl. "jedes Modell, das du pullen kannst, kannst du nutzen" und ehrlicher
RAM-/Tempo-Beratung; docs/AI_COACH.md ergaenzt Modellwahl und Performance auf kleinen Boxen.
2026-08-31 08:07:43 +02:00
Duarte Santos 9edcdaa9f3 Coach: Vorschlaege bleiben, Diagramme in den Karten, Workout-Debrief, Vergleich auf der Instanz, Routine verbessern
Was der Coach vorgeschlagen hat, verschwindet nach Ja/Nein nicht mehr: die Chat-Zeile traegt
eine Referenz ins Log, das jetzt jede Aenderung samt before/after (auch abgelehnte), Notizen,
Evidenz und bei Plaenen die Routinen behaelt; eine Recap-Karte im Thread und ein Verlauf-
Sheet oeffnen alles wieder. Unter jeder Review liegen die Zahlen aus dem zitierten Fenster —
Sessions, Dauer, Volumen, Koerpergewicht als Kurve mit Ziel, geschaetztes 1RM erste→letzte
Session, Saetze pro Koerperregion — auf dem Geraet gerechnet (lib/coach-insights.js).

Neu: Job-Art `debrief` (eine Session, kein Planeingriff: Score 1–10, lief gut / beobachten /
naechstes Mal; validateDebrief im Core, eigener Prompt), Vergleich mit anderen auf der
Instanz (Admin-Schalter `community`, pro Person Opt-in serverseitig, Mediane ab drei
Teilnehmern, Epley-1RM, lb→kg; auch als `cohort` im Prompt), und "Routine verbessern"
als fokussierte Review. Schnell-Chips ueber dem Composer, deutsche Strings, Doku, Changelog.
Tests: api 136, frontend 799, mcp 36.
2026-08-30 14:31:10 +02:00
Duarte Santos cc878dd353 curated2: review fixes — touch drag (!45), deload seeds (!28), rep-range typing (!69), rebuilt rows on config change (!54), swap keeps history (!43), Hevy retry/dedup/aliases (!30), HTTPS doc (!67), locale gaps 2026-08-30 14:18:09 +02:00
Duarte Santos b3340e31b5 Coach: eine Session ist kein Trend; Changelog, Doku und .env fuer Chat, Timeout und Bibliotheks-Deckel
Die Review-Regel verbietet strukturelle Aenderungen unter drei Sessions oder einer Woche
Daten — qwen2.5:3b hatte auf Staging nach EINER Session eine Bein-Uebung entfernt, 'weil
keine Beinarbeit'. Dazu die Changelog-Eintraege fuer den Chat, das Admin-Dashboard, den
Job-Timeout und den 160er-Deckel, COACH_JOB_TIMEOUT_MS in .env.example und in AI_COACH.md,
und Schritt 3 der Doku beschreibt den Chat statt des alten Intake-Buttons.
2026-08-30 13:56:38 +02:00
Duarte Santos f5e0a33924 curated2: !67 2026-08-30 13:31:08 +02:00
andi242 d65b7cb9a4 add explanations [ci skip] 2026-08-29 20:45:25 +02:00
andi242 4171220067 indent [ci skip] 2026-08-29 19:08:54 +02:00
andi242 28b10fbd1b add info 2026-08-29 19:07:41 +02:00
andi242 39ffb44332 doc links 2026-08-29 18:15:27 +02:00
andi242 2ddcee00e0 finalize 2026-08-29 18:08:01 +02:00
andi242 c1b8ef3190 save progress 2026-08-29 17:57:02 +02:00
Duarte Santos 533ca2c9a4 Coach: Doku fuer die API-Key-Provider und das Handy, und die Image-Pruefungen in der GitLab-CI
AI_COACH.md trennt die zwei Provider-Familien (HTTPS mit Key auf dem Default-Image,
Runtime im coach-Image), beschreibt Endpunkt-Regeln, Modell-Liste, Keys pro Provider
samt einmaliger Migration von coach.json und die zwei Wege auf dem Handy. CHANGELOG
unter Unreleased, .env.example/README/Website/SELF_HOSTING nachgezogen.

.gitlab-ci.yml bekommt test:api (Suite, generierte Assets, core-loadable) und
build:api-check, das beide api-Targets baut und laufen laesst: das veroeffentlichte
Image hat kein SDK/codex/bwrap, bootet, und konstruiert die HTTPS-Adapter; das
coach-Image meldet ein lauffaehiges SDK, /coach-auth ist coach 700.
2026-08-29 17:18:56 +02:00
andi242 118205bc75 save progress 2026-08-29 17:17:35 +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 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
andi242 dc8fcec4be test mermaid shape 2026-08-29 16:42:00 +02:00
andi242 36f7558cc3 graph 2026-08-29 16:34:11 +02:00
andi242 c71791eea6 init 2026-08-29 16:32:51 +02:00
andi242 19899d0fbd be more specific 2026-08-28 19:28:15 +02:00
andi242 5edfc1e78c update md 2026-08-28 19:26:46 +02:00
Duarte Santos 6ea7526bff api + docs: say what went wrong when RP_ID or ORIGIN does not match
@simplewebauthn reports a mismatch as "Unexpected RP ID hash", which tells a
self-hoster nothing about their own .env — and this is the most common support
question in #install-help, where charliebelt is currently stuck behind a
Cloudflare Tunnel with values that look right. The error now names both
configured values back and points at the docs. Neither is a secret: one is the
address bar, the other its hostname.

Extracted as api/verify-error.js so it can be tested without booting a server
that opens files and a port, following push-messages.js.

SELF_HOSTING.md gets the diagnosis in order: read what the server logged on
startup (it prints rpID and origin, and `docker compose restart` does not
re-read .env), then the exact shape of each value as a table, then the
reverse-proxy case, then www., then that changing the hostname invalidates
existing passkeys. Plus the thing adam934912 called a blocker: on a LAN
without certificates there is nothing to configure that makes passkeys work.
2026-08-25 20:00:10 +02:00
Duarte Santos 7d2460c2c2 Merge merge request !20 (intensifiers, pairing, theme, security hardening)
Takes the nine commits as submitted, with three adjustments:

- remote.test.js ran in the node environment while remote.js pulls in
  api.js, which reads navigator.userAgent at module scope — the file failed
  to import. Same @vitest-environment happy-dom pragma the api tests use.
- Drops skills-lock.json. It pins a personal Claude Code skill chain to
  third-party GitHub repos by hash; that is contributor tooling, not a
  project artefact, and this project's GitHub access is gone. CLAUDE.md
  itself is kept — it is an accurate description of the repo.
- Corrects two stale claims in that CLAUDE.md: the website deploys from
  .gitlab-ci.yml, not GitHub Pages, and the CI gate is GitLab, not Gitea
  Actions with a dormant GitHub copy.

pt-BR: 23 of the 44 new pt strings are European (ficheiro, telemóvel,
Definições, «guillemets», tu-forms), so they get Brazilian overrides
rather than being inherited; fingerprint re-baselined.
2026-08-25 14:28:10 +02:00
JoseviandClaude Sonnet 5 781e2441ba mobile: modo "conectar a mi servidor" (emparejamiento por codigo, sin passkeys)
La app movil puede ahora sincronizar de verdad contra un servidor openGym
propio en vez de guardar todo solo en el telefono. Como las passkeys no
funcionan desde el WebView de la app (su origen nunca coincide con el
hostname real), el emparejamiento se hace con un codigo de un solo uso
generado desde una sesion ya logueada en el navegador (Ajustes > "Emparejar
la app movil"), canjeado por un bearer token con la misma firma que ya usa
la cookie de sesion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 07:59:12 +02:00
andi242 740b2e7df5 rewrite 2026-08-24 18:30:31 +02:00
andi242 e6261e7b7b reword clunky sentence/hint to editing in demo 2026-08-24 18:27:24 +02:00
andi242 7e1c0ae023 wording 2026-08-24 18:17:08 +02:00