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.
Versions in both package.json files, the lockfile's two self-references and the
Android build (versionCode 11 -> 12, so the APK installs over the last one).
The website's download line goes from v1.2.9 to v1.2.11 — it had been left
behind by the previous release as well.
Changelog covers the six defects found reviewing v1.2.10, the two merge requests
from mflova, and the landing page.
Two things people asked for on release day, both small, both awkward to live
without.
The version was not visible anywhere. mflova asked how to tell which build the
phone app is running and andi242 said he had wondered the same that morning;
issue #7 asks for it too. The support template in #install-help has been telling
people to read it off "the bottom of Settings" — where it was not. It is there
now, read from package.json at build time so it cannot drift from the release it
shipped in. On the phone there is no address bar and no about box, so this was
the only missing way to answer "did the update actually install".
The rest timer had no off switch. andi242, in the per-exercise-timers thread: "I
don't use rest timers, so I find it's a bit tedious to skip the timer every
time." v1.2.10 made that worse rather than better — it now rests after every set
except the last of the session, so an exercise that used to end quietly no
longer does, and there was still no way out. "Off" now sits at the top of the
same list as 60/90/120/150/180.
The guard is inside startRest rather than at the four places that call it, for
the same reason the rest-after-a-set rule became one shared condition: a rule
that has to be repeated is a rule that gets forgotten. 'Off' already exists in
all twelve locale packs, so this adds no translation work.
Two follow-ups to !24 and !25, both about the same screen.
!25 makes LineChart drop its hover whenever `points` changes identity, which is
right — a new dataset has different coordinates and the old marker describes
nothing. But the e1RM branch built its array inline with .map(), so every render
of Stats handed the chart a brand-new array and cleared the tooltip out from
under the pointer. Hovering itself only re-renders LineChart, so it survives
that; anything else touching this screen did not. Memoising the .map() alone
would not have fixed it, because e1rmSeries was itself called fresh on every
render, so the memo's own dependency changed identity every time. Both are
memoised now, which also stops walking the whole workout history on every
render.
!24's grid is two columns, label/value and chevron, and does not place .lrow-i.
On a row that has an icon it would auto-place and shove the layout around. The
one call site has no icon, so this is latent rather than live — written down in
the rule so the next person to reach for stackedValue sees the limit first.
A shared plan carried the sets, reps, weight, progression rule, superset
grouping, note and — since v1.2.10 — the planned warm-ups. It did not carry the
intensifier, so a routine built as "3x5 with a double drop" reached the other
end as a plain 3x5. Silently: parsePlan's `dropped` counter only tracks
exercises it cannot resolve at all, so nothing said a prescription had gone
missing. Drop-sets and rest-pause are how the exercise is prescribed, not a
logging detail, and they belong in the file.
Both fields are now clamped on the way out and on the way in. warmupSets was
clamped only when the rows were built, so a hand-edited file's "999" was shown
verbatim by the config stepper. An intensifier of an unknown type is dropped
rather than passed through: a plan file is someone else's data. The floors are
the ones the config sheet and applyIntensifierPlan already enforce, not new
ones invented here.
There was no plan-share test file at all, which is how a whole prescription
field went missing without anyone noticing. There is one now.
v1.2.10 shipped the session note as one of three kinds of note, and the release
notes say so. Only two of them existed.
buildCompletedWorkout read `active.note` and carried it onto the finished
workout — with a test covering it — but nothing anywhere in the app ever wrote
that field. The only way to get a session note was to open a past workout in
history and type one there, which is a different and much smaller feature than
"notes you can write during a workout". So the workout screen now has one, next
to the finish button: wrapping up is when you know how the session went. It
writes `active.note`, which makes the path that was already there and already
tested actually reachable.
The history one then threw the text away. It saved on blur only, and Escape, the
Android back gesture and swipe-to-dismiss all close a sheet without ever moving
focus out of the textarea — type a note, press Escape, gone. It now flushes on
unmount as well, through a ref, because a cleanup closes over the note from its
own render, which is the empty string it started with. Writing only happens when
the text actually changed, and deleting the workout from that same sheet leaves
nothing to write to, which the guard covers.
The new sheet has a Save button rather than repeating the blur trick.
Also adds both note sheets to Workout.test.jsx's module mock. Workout.jsx reads
sessionNoteSheet during render, so a missing export there is a render crash
rather than a quiet no-op — which is exactly how this was caught.
Three defects, all of them latent before v1.2.10 and live the moment a routine
started planning warm-ups by default.
workoutVolume counted warm-up rows. It was the only consumer that did — onerm,
muscles, recovery and progression all filter them — while the config sheet tells
users in so many words that warm-ups are "left out of volume, records and
progression", and a comment in this very file asserts it. Three planned warm-ups
on a 3x5 at 100kg reported 2562.5 instead of 1500, and that number is written
into the finished workout, so it would have stayed wrong forever.
The ramp aimed at last session's weight. buildSets prepends the warm-ups and
applyPrescription rewrites work rows only, by design — so nothing ever re-derived
the ramp once progression moved the target. Deload 100 -> 50 produced warm-ups of
50 and 75 under work sets of 50: the second "warm-up" heavier than everything it
was warming up for. applyPrescription now finishes by re-ramping, which is where
the invariant cannot be forgotten, rather than at the two call sites where it
already was. A logged warm-up keeps its weight and becomes what the next one
ramps from — it happened, and rewriting performed work is data loss.
insertWarmupRow's early return was unclamped. Once a warm-up sat above the work
weight, every warm-up added after it inherited that number. The clamp guarded
only the other branch. A hand-edited row stays as typed; what stops is the
inheritance.
The tab-bar commit gave two causes for the see-through bar. The first is real
and is what users reported: 72% opacity. The second was invented — that the CSS
minifier collapses a backdrop-filter / -webkit-backdrop-filter pair down to
whichever is written last, so the standard property never shipped and Firefox
got alpha without blur.
It does not. This project builds CSS with esbuild's minifier, which treats the
two as what they are, different property names, and keeps both in either order:
main's stylesheet minifies to five unprefixed and five prefixed, and so does
this branch's. Nothing was ever dropped, and there was no Firefox-only bug.
So the claim comes out of the code comment, out of the CHANGELOG, and out of
the release announcement, where it would have gone to the whole Discord as a
confident technical explanation for something that never happened.
What stays is the part that is true and is the actual fix: 94% opacity, less
blur — which is a genuine win on Android, where a blur behind a fixed element
is recomposited every scroll frame — and the @supports fallback to fully opaque
where backdrop-filter really is unavailable. The prefixed-first ordering stays
too, since that is the right order for a prefixed/standard pair regardless: the
standard name should be the one that wins the cascade. Only the reason given
for it changes.
(The message on 46eaefd still carries the original claim; it is left alone
rather than rewriting a branch mid-review.)
The other half of issue #3. "Breaks sometimes not shown after finished set
(first / last)" — the last-set half was the quiet-finish rule, already fixed.
This is the first-set half.
Completing a set only counts as progress when it goes beyond the most sets this
exercise has had done at once, so that unchecking and re-checking finished work
does not replay navigation or reopen sheets. Correct, but it returned before
anything could time a rest: uncheck a set to fix the reps, check it again, and
nothing starts. If the original rest had already run out, you get no break at
all — which is exactly what was reported, and why it reads as "sometimes".
A re-check now fills that gap and only that gap: it starts a rest when none is
running, and never touches one that is still counting down, because a running
timer belongs to the set you finished most recently. Navigation and sheets stay
gated exactly as before.
Found reviewing this release, and it is this release that makes it bite.
lastEntryFor returns every set that was `done`, warm-ups included, and four
callers then treat position 0 as "your first work set": buildSets seeds the
next session's rows from it, freestyleConfig sizes the config from its length,
and two views print it as "Last time".
Until now that was latent — warm-ups only existed if you pressed "Add warm-up
set", and that button was itself broken in a way that hid this: it handed you a
row at the full working weight, so seeding from it produced the right number by
accident. Fixing the ramp to a real 50% / 75%, and letting a routine plan
warm-ups into every session, turns the latent bug live: work set 1 gets seeded
at half your working weight, then next session at half of that. Your working
weight walks down on its own. A 3x5 also comes back as a 5-set exercise,
because two ramp rows are counted as sets you did.
So lastEntryFor now answers what every caller is actually asking — what you
lifted, not what you warmed up with. Warm-ups were already out of volume,
records and progression; this is the same rule one level up. An entry whose
only completed sets were warm-ups is no longer history at all, and the search
falls through to the session before it.
The regression test covers both seeding paths, planned and freestyle, since
freestyle takes the weight from last time directly and would drift fastest.
The note sheet was checked structurally — imports resolve, symbols exist — but
nothing ever rendered it, so a bad hook order or a wrong store path would have
reached a phone before it reached a test. This drives it through the real sheet
stack: both textareas, the pin (disabled while the note is empty, since pinning
nothing means nothing), and a save that has to land in two different places —
today's note on the entry, the standing note on S.exNotes.
The third case is the one that would have bitten: clearing the note has to drop
the pin with it, or a stale pin resurfaces a note that no longer exists.
Version bumped in both package.json files, the lockfile's self-reference and
the Android build (versionCode 10 -> 11, so the APK installs over the last
one). Changelog covers everything since v1.2.9 in one entry, per the
project's versioning rule.
18 strings from this release, plus the rest-pause explainer that arrived
untranslated with !20. Terminology follows each pack's existing entries
(Wdh. / rip. / powt. / повт., and the "Add warm-up set" wording already there).
pt-BR overrides 8 of them rather than inheriting: the pt-PT versions use
tu-forms and «guillemets» (tuas, podes, treinares, teres), which is exactly
what the locale's own guard test is there to catch. Inheritance fingerprint
re-baselined; the remaining 10 read the same in both variants.
Three kinds of note, because they have three different lifetimes and users
asked for all three:
· a session note on an exercise — what happened today, stored on the workout
entry. It carries a PIN, and that is the whole design: only the person
writing knows whether "shoulder twinged" is a diary line or "go narrower"
is a message to their next self. A pinned note surfaces again the next time
that exercise comes up, where the "Last time" line already is; an unpinned
one stays in that day's history. This is deliberately not a global setting:
the answer differs per note, so a single switch would need constant
flipping, while at the moment of writing it is obvious.
· a standing note on the exercise itself (S.exNotes) — seat height, pin
position, a form cue. True every session, shown every session. This is
elchavalico's request, with ten messages of agreement behind it.
· a whole-session note on the workout, editable from its history entry, where
it is easier to say how a session went once you can see what you did.
A routine's own `note` (!14) stays where it is: it belongs to the plan, not to
the day or to the movement.
Planned warm-ups: `warmupSets` on an exercise config, stacked by buildSets
using the same ramp as the in-session button, so the session starts with them
already there instead of you adding them by hand every time. Written only when
non-zero, so an existing plan keeps its exact shape and reads back as 0. They
travel with a shared plan, and stay out of volume, records and progression via
the phase flag that already existed.
Home's week strip already knew today was finished — its dot goes 'done' from
S.workouts — but the row underneath only ever asked `routine`, so a logged day
kept showing the routine name behind a green Start tag and read as still
outstanding (issue #4). It now reports the session instead. Tapping still
starts another one; it just stops urging.
Stats dropped every point whose value was 0, and a bodyweight pull-up has no
weight, so "Exercise progress" read "No data yet" for exercises with a full
history behind them (issue #5). When nothing in an exercise's history was ever
loaded, its progress IS the rep count, so that is what gets plotted, labelled
in reps. Add a weighted set later and it switches back to weight on its own —
which is also the honest reading, because that is when load became the thing
improving. Same fallback in currentOf, or the picker label went blank and the
exercise sorted to the bottom as if it had no history at all.
Reported as "the navigation bar is half transparent … the information can be
harder to see as it is mixed with the background". Two separate causes.
The bar was 72% opaque. Even with the blur working that is too little to read
labels against a scrolling page, and nobody needs to read what is behind a
navigation bar. Now 94% in both themes, with the blur down from 24px to 10px:
this is a position:fixed element, so the WebView recomposites the blurred
region on every scroll frame, which is the most expensive thing on an Android
screen. Same blur reduction on the rest timer, which is on screen for a whole
session.
The second cause is worse and was invisible from the source: the CSS minifier
dedupes a `backdrop-filter` / `-webkit-backdrop-filter` pair down to whichever
is written LAST, so the standard property was being dropped from the build
entirely and only the -webkit- one shipped. Firefox understands only the
unprefixed name, so it had no blur at all — just the alpha, which is exactly
the reported symptom. All five pairs now put the prefixed line first, with a
comment so nobody tidies the order back.
Adds an @supports fallback to fully opaque where backdrop-filter is genuinely
unavailable (old Android WebViews, reduce-transparency settings), and drops
.ss-card's padding on narrow screens — a superset pays the page gutter twice
and squeezed the reps field, which socialscientist93 diagnosed exactly.
Two session bugs that users reported separately and that both sat in the
"what happens when a set ends" path.
insertWarmupRow read rows[at - 1] to find what to ramp from. For the FIRST
warm-up `at` is 0, so that is rows[-1] — undefined — and the `||` fallback
took the LAST row instead: the heaviest work set. "Add warm-up set" handed
you a warm-up at your full working weight, every time, and you corrected it
by hand. It now ramps from the first work row, each added row closing half
the remaining gap (50% / 75% / 87.5%), rounded DOWN to the exercise's own
loading step — a warm-up a notch light costs nothing, one a notch heavy is a
set you have to strip plates off. The step is passed in by the caller so
history.js keeps no dependency on progression.js, which already imports it.
Rest timers stopped at the end of an exercise: the singleton path called
stopRest() and then skipped startRest(), commented as "final sets finish
quietly". But another exercise follows that set, and you rest before it too —
a two-set exercise timed one rest instead of two (issue #3), and the rest
never carried across the gap. Supersets already had the right rule, so the
condition is now shared as restAfterSet(): rest after every completed set
except the last set of the last exercise, which is where zkssyth landed
independently in Discord.
Hevy writes the equipment in parentheses and says "bicep"/"chest fly"
where the catalogue says "biceps"/"fly", so the word-bag matcher landed
one word off. A real 34-session export arrived with 27 custom exercises
covering a third of its sets.
Three separate causes:
- SYN rewrote 'machine' -> 'lever' before 'smith machine' -> 'smith'
could ever fire, so every Smith-machine name became "smith lever ..."
and matched nothing in the catalogue. The two rules are order
dependent; 'smith machine' now runs first.
- The alias table had no entry for Hevy's vocabulary. Added the names
from a real export, mapped by hand to catalogue ids.
- Hevy exports no category column, so every invented exercise took the
'upper legs' default and a third of an imported history was
attributed to the legs in the muscle map. With no category to read,
the body part now comes off the name instead.
The same export now creates 2 custom exercises instead of 27. The two
that remain, box jump and wall ball, are genuinely not in a 1,324-entry
strength catalogue, and guessing would file them under the wrong lift.
import-match.test.js covers the new aliases, the SYN ordering and the
body-part inference.
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.
Keeps the ExRx-informed primary/secondary metadata for 223 catalogue
entries and the muscle-group UI, with two fixes to the branch:
- muscles.js dropped metadataOf, the muscleSnapshot fallback. A custom
exercise deleted from the catalogue survives in history only as that
snapshot, so without it those sessions silently stopped counting toward
the body map and Stats — loadOfWorkouts returned {} where main returned
{chest: 1}. Restored and widened to the new primaries/secondaries fields.
- It also replaced the shared isWarmupRow import with a local copy that
only matches the exact string 'warmup'. phaseForSet normalises 'warm-up',
'warm_up', casing and whitespace, so warm-up rows written in any other
spelling would have counted as work here while counting as warm-ups
everywhere else. Restored the import.
Both are covered by new tests. Locale conflicts resolved additively; the
three new muscle-group strings read the same in pt-BR, so they stay
inherited and the inheritance fingerprint is re-baselined.
Resolves against !13 and !1: the picker and library keep the multi-token
search and the equipment-profile filter, and matchExercise now builds its
haystack from exerciseNameSearchText, so a pt-BR profile finds an exercise
by the name it actually sees as well as by the English one. The 'chosen'
sort takes !16's locale-aware localeCompare. Adds regression tests for
localized search and for cache invalidation on a language switch.
The new equipment strings landed in pt.js only, so pt-BR inherited European
wording — «guillemets», 'A mostrar', 'Ginásio', 'tens' — and the locale's
own guard test caught it. Adds Brazilian overrides (você, 'Academia',
'Excluir perfil?', curly double quotes) and re-baselines the inheritance
fingerprint: the one newly inherited entry is !14's note placeholder, which
reads the same in both variants ('anilha' is current usage in Brazil too).
The merge request added 18 user-facing strings and no locale entries, so
every non-English profile would have rendered the equipment card, picker
banner and routine warning in English. Terminology follows each pack's
existing 'Equipment' key (Geräte / Equipo / Attrezzi / Sprzęt / Инвентарь …).
Also replaces the literal \u2019 escape in the Settings footer with the
character itself — the locale key has to match the string as it is written.
mapHeader normalises the header before comparing ('Weight (kg)' -> 'weight
kg') but matches the alias list raw, so an alias written with parentheses
never matches. Three of the added ones were dead entries whose normalised
twin was already in the table; 'set duration (sec)' had no twin, so gravl's
per-set duration was dropped and its cardio rows skipped entirely.
Also moves that column from "time" to "seconds", which is what it is:
toMinutes() would have read gravl's 22 seconds as 22 minutes.
Adds the gravl sample from the merge request as a regression test.
matchExercise rebuilt an NFD-normalised corpus for all ~1300 catalogue
entries on every keystroke (~8ms desktop, several times that on a phone).
Cache it in a WeakMap keyed by the i18n version so a language switch
rebuilds the translated terms, and custom exercises re-cache on their own
because the store hands out fresh objects on update.
Cuatro problemas encontrados en una revision de seguridad, los cuatro reproducidos
antes y despues del arreglo.
SSRF + cuelgue del handler. El `endpoint` de una suscripcion push se validaba solo
como "string no vacio", y web-push lo pasa tal cual a https.request: cualquier
usuario registrado alcanzaba cualquier host:puerto que viera el contenedor api,
que comparte red Docker con el resto del stack. Ademas no habia timeout, asi que
un endpoint que aceptaba TCP y se callaba dejaba colgado el handler que hacia
await (>2 min medidos). Ahora el rechazo de direcciones loopback/privadas/
link-local/CGNAT vive en el lookup del propio agente, no en una pasada previa, asi
que no queda ventana de DNS rebinding; y los envios llevan timeout de 10s.
Amplificacion. No habia tope de suscripciones por usuario y sendPush lanzaba un
Promise.all sin limite: una peticion de ~90 bytes producia 200 conexiones TLS
simultaneas al host que eligiera el atacante. Cap de 20 por cuenta y 6 en vuelo.
CSRF. SameSite=Lax deja fuera un origen cross-site pero no un subdominio hermano,
que es el mismo site y es el reparto habitual en self-hosting; y el body se
parseaba como JSON dijera lo que dijera el Content-Type, asi que bastaba un POST
simple sin preflight. Ahora una peticion que cambia estado tiene que ser
Sec-Fetch-Site: same-origin, o traer un Origin igual a ORIGIN donde esa cabecera
no llegue. Exentas las rutas que llevan su credencial en el body y todo lo
autenticado por Bearer, para no romper la app movil.
Fijacion de sesion. Las cookies se reducian con Object.fromEntries, que se queda
con la ultima repetida: un subdominio hermano podia plantar gymsid para el dominio
padre y quedarse con la sesion. En HTTPS la cookie pasa a __Host-gymsid, que el
navegador garantiza host-only; la legacy se sigue aceptando, asi que actualizar no
desloguea a nadie. Un nombre repetido con valores distintos se rechaza entero.
El proxy de Vite reescribe Origin porque el dev server vive en otro puerto.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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>
check-locales.mjs exige el mismo set de claves en las 11 locales; las
cadenas de drop-set/rest-pause (commit 02ea938) y las de tema
"Sistema"/auto-backup solo estaban en es.js, lo que rompia el job
test:frontend en CI y bloqueaba build:apk (dependia de el).
Ademas de Oscuro/Claro fijos, ahora se puede elegir que el tema siga la
preferencia del sistema operativo/navegador, con actualizacion en vivo si
esta cambia mientras la app esta abierta (sin necesitar recargar).
En el build movil (Capacitor) los datos solo viven en el dispositivo, sin
backend. Ademas del export/import manual ya existente, se agrega un toggle
en Settings que escribe una copia fechada en la carpeta Documents (visible
en Files/gestor de archivos) tras terminar un entrenamiento o salir del
editor de rutinas, para que una app de sincronizacion externa (o una copia
manual) siempre tenga algo reciente que llevarse.