Commit Graph
100 Commits
Author SHA1 Message Date
Duarte Santos 0345abc925 No one-rep-max calculator on an assistance machine — it was offering a max of the help you were given (#232) 2026-09-20 20:31:47 +02:00
Duarte Santos 6aa43e7a06 Assistance machines: a sync no longer hands the help back, and Stats reads the best the same way (#232)
Two readers were still folding the kept load upwards, so on a signed-in profile the lighter
setting was saved and then overwritten on the next sync — the symptom the fix was supposed to
remove, one layer down.

`sync-merge` kept the larger `w` per exercise, on the stated grounds that the app only ever
raises it. That is no longer true: on an assistance machine it lowers it, so merging with a
device that still held 30 kg handed back the help the other one had just dropped. Both sides now
go through `beatsWeight`, which knows which way each exercise runs.

Stats tracked its per-exercise best with a plain maximum, so the curve's "best" line disagreed
with the exercise's own record. Weighted reps work now folds by the exercise; reps, duration and
speed are unchanged, since more is better in all three.

Also makes the list-view scroll test deterministic. It waited on the component's 0 ms fallback
and raced under a loaded full-suite run; the test DOM now carries a frame queue the test drains
itself, which is the requestAnimationFrame path a browser actually takes.
2026-09-20 20:27:24 +02: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
Duarte Santos f7b9a80a93 Assistance machines run the other way round: less help is the record, and the plan takes help away (#232)
On an assisted pull-up or dip the stack carries part of your body weight, so 20 kg of help is
a harder set than 30. The app read it like every other lift: 30 kg stayed the best, dropping to
20 was not a record, and progression answered a clean session by asking for even more help.

Which exercises these are is deliberately narrow. Twenty-nine entries in the catalogue have
"assisted" in the name, but only eight are the machine: the rest are partner-assisted stretches,
a medicine-ball twist, band and bodyweight leg curls, where the weight is ordinary load and
inverting it would be the same bug pointed the other way. The rule is therefore the leverage
machine whose name says assisted — and `assisted: true` (or false) on a custom exercise or on a
routine's config overrides it in either direction.

What changes for those eight: the best load folds to the smallest, in a session and across
history; a lighter set is the PR and what the app offers next time; progression takes a step of
help away after a clean session and gives one back on a stall, with wording that says so
instead of "2.5 kg more"; and they are out of the estimated one-rep max entirely, because Epley
on the help you were given rises as you get weaker.

A logged 0 counts as "no load entered" rather than a set done with no help at all, so it cannot
invent a perfect record and ask for negative assistance afterwards.

The progression tests picked their plain lift as "the first catalogue entry that is not cardio,
legs, back or bodyweight" — which is `assisted chest dip`. They now exclude assistance machines
explicitly, since they are about the ordinary direction.

Reported by dpatrongomez. PR #231 fixes the same issue by matching the name alone.
2026-09-20 20:10:21 +02:00
Duarte Santos b5d55467d0 Progression reads the sets the plan asked for, not the extra ones logged on top (#233)
An extra set — the one you add because you felt strong, or to chase a heavy single — was read
as part of the prescription. A heavier bonus set pulled the weight for the next session up
with it, and a bonus set taken short of the target reps reported the whole session as missed
and started counting stalls toward a deload.

`readSession` now stops at the planned number of work sets. A set past that is still logged,
still counts in the volume, the PRs and the history; it just has no say in what the plan does
next. A session with fewer sets than planned is short exactly as before.
2026-09-20 20:01:33 +02:00
Duarte Santos a7d710902c iOS: the keyboard stays open — the viewport guard no longer blurs the field you are typing in (#242)
Tapping the name or invite-code field on the login sheet threw the keyboard straight back
out, about four times in five, and the same happened in every other sheet on iPad and iPhone.

`realign()` corrects a page iOS left displaced after the keyboard closed, and it used to let
go of a text field that still held focus, because WebKit does not blur an input when a button
is tapped and iOS only puts the viewports back once focus has left. The guard around it is
`keyboardOpen()`, which compares `innerHeight` with the visual viewport — and both of those
move while the keyboard animates in, because the browser chrome collapses at the same time.
Measured on iOS 26.6: `innerHeight` fell 684 → 374 while the visual viewport sat at 158, so
the difference dipped back under the threshold and the keyboard read as closed roughly 100 ms
after every tap. The guard then blurred the field the person had just tapped.

The detector cannot be made reliable, so nothing acts on it while somebody is typing: with a
text field focused, `realign()` now does nothing at all — no blur, no scroll, and no unpin of
a body that a sheet has pinned. The correction still runs from `focusout`, which is when iOS
actually needs it, and the two cases the blur was written for already let go of the field
themselves: Workout.jsx blurs when a set is ticked, Modals.jsx when a sheet opens.

Reported by FabianReitz with a screen recording, and diagnosed by hectorroaz, who instrumented
a build on a real device and posted the timings that show the mid-animation misfire.
2026-09-20 19:56:42 +02:00
Duarte Santos c04fd512d4 Rename workout: the two strings #228 brought in are translated in all fourteen packs, and pt-BR inherits them from pt-PT 2026-09-20 19:45:22 +02:00
Duarte Santos 4f003073d0 Merge #190: i18n(de): use standard ß, not Swiss ss (mkoester) 2026-09-20 19:43:05 +02:00
Duarte Santos 9dcda4bfc2 Merge #234: accessibility: typable weight input (Strazdonis) 2026-09-20 19:43:04 +02:00
Duarte Santos 1bb0806436 Merge #237: fix(home): a door to the Start screen — freestyle and Other routines are unreachable on a planned day (kurktchiev) 2026-09-20 19:43:04 +02:00
Duarte Santos b9079c98db Merge #228: workout: allow renaming workout title from header menu (ncbachh) 2026-09-20 19:43:03 +02:00
Duarte Santos 069cb6d9f9 Merge r3/custom-tg-edit: QA round 3 2026-09-20 (dev team) 2026-09-20 18:05:27 +02:00
Duarte Santos 1ee9970c71 Merge r3/admin-null-routine: QA round 3 2026-09-20 (dev team) 2026-09-20 18:05:27 +02:00
Duarte Santos 6859624e0f Merge r3/setrow-band: QA round 3 2026-09-20 (dev team) 2026-09-20 18:05:27 +02:00
Duarte Santos d35ba5643b Merge r3/layout-collateral: QA round 3 2026-09-20 (dev team) 2026-09-20 18:05:27 +02:00
Duarte Santos a0a44cb6c0 Phone-width layout: a list row's title asks only for its own longest word, a date or time field drops a line rather than the screen edge, and the page title steps down instead of shredding
Three pieces of collateral from d7bb67a, which fixed C8/C23 and C25 with two blunter
rules than those findings needed. Both of its fixes stay fixed; what they cost the
rows and titles around them does not.

.lrow-m, the title column. The 104px floor was the width of one long word, but every
row pays it, and a row whose only flexible part is the title has nothing else to give.
In the backfill sheet's Date and Start-time rows the floor came straight out of the
<input type=date>: at 320px it ended 23px off the right of the screen with its calendar
picker entirely off-screen, so on a small phone there was no way to open the picker at
all. The floor also took space from values that used to fit — "Freies Training" became
"Freies …", and the Rule row's value dropped from 141px to 113px. min-width:auto, the
flex default this rule had switched off, is the floor the Progression row was actually
asking for: its own longest word, which for "Routine" is 63px and for "Progression"
96px. Every row now asks for exactly what its title needs and no more. It also closes a
row the floor never reached: German "Intensivierungstechnik" ran 18px over the value
beside it on v1.3.7 and on the branch, and now it does not.

The two rows with a date or time field. Even at its own longest word a title can leave
that field nothing: Polish "Godzina rozpoczęcia" plus the clock is 17px more than a
320px row holds, and the same is true of the Settings reminder row, whose field hung
3px off the screen in every language. Those rows now wrap the field onto a line of its
own under the title, still flush right — the same shape a row with an inline segmented
control already uses when its control and title cannot share a line.

.hdr h1, the page title. min-width:0 on the title block and flex:none on the button are
what keep the header button reachable, and they stay. What came apart was the title left
in the 95 to 125px the Library's "By muscle" button leaves it: hyphens:auto spends a
character's worth of width on the hyphen itself, and in a box that tight that was the
difference between two lines and three — "Упражнения" rendered as "Упра / жнен / ия" in
a 170px header, "Ćwiczenia" and "Gyakorlatok" the same. Below 420px, every phone width
we test, the title now drops a step to 30px, at which all 14 packs take two lines at
most with a character of slack; hyphens:auto is gone, and a word that still does not fit
is broken with overflow-wrap:break-word rather than :anywhere, which moves the whole word
to the next line before breaking it — :anywhere broke "Bartholomew_Jones" mid-word even
at 412px, where a line of its own was waiting for it.

Measured on the QA rig (scripts/opengym-qa/run/r3-layout-collateral/, en/de/ru at
320/368/412 plus all 14 packs at 320/368, the header set also with Roboto injected):
  backfill  <input type=date> / <input type=time> right edge at 320px, de: 343 / 325
            (23px and 5px off a 320px screen) -> 288 / 288, both inside the card, both
            picker icons visible. pl "Godzina rozpoczęcia" 325 (5px off) -> wraps, 288.
            en and ru 288 / 288 on one line. 360, 368 and 412 clean in every pack.
  Routine   value box at 320px, de: 72px ("Freies …") -> 113px ("Freies Train…"). The
            German string wants 119px and the row has 176px for title plus value, so
            v1.3.7's 119px was bought by letting "Routine" spill 6px into the value's
            box. en 72px (clipped) -> 75px, not clipped, as on v1.3.7.
  Rule      value box at 320 / 368 / 412: 113 / 161 / 191 -> 141 / 167 / 191, which is
            v1.3.7's 141 / 167 / 191 exactly.
  C8/C23    "Progression" title box / how far the title runs onto the value, 320px:
            v1.3.7 37px / +47, branch 104 / -20, now 96 / -12 (ru 102 / -12). 368px:
            v1.3.7 65-74 / +10..+19, now 96 / -12. ru 412: v1.3.7 80 / +10, now 102 / -12.
  C25       Library button right edge, ru at 320 / 368: v1.3.7 388 / 388 (off both
            screens) -> 304 / 352, button reachable. Title lines at 320: branch
            Упра/жнен/ия, header 170px -> Упраж/нения, 126px; hu Gyak/orlat/ok, 151px ->
            two lines; pl Ćwic/zeni/a -> Ćwicz/enia. ru at 412 is back to one line.
  headers   15 packs x /library /settings /home x 320/368/412 with Roboto: 135 headers,
            none over two lines, every button on screen. The one title that still takes
            three lines is "Hi Bartholomew_Jones" at 320 and 368 — a 17-character token
            with no break in it; at 412 it is two lines, where the branch had three.
  sweep     Every .lrow of Settings, the routine editor, the exercise config sheet and
            the backfill sheet in all 14 packs at 320 and 368: 1170 rows, 30 of them
            poking out of their row on the branch, 0 now.
Known trade: German "Intensivierungstechnik" and "Keine" cannot both fit a 320px row.
The title now has its word and the value ellipsises to "K…" (46px -> 28px) where before
the title ran 18px over it. Thai wraps "การเพิ่มระดับ" onto two lines at 320 rather than
holding a 104px column open for it.
Vitest: 117 files, 1535 tests green (1533 plus the two added here); locales in sync; the
source-string baseline stays at 33. No new user-facing strings.
2026-09-20 17:46:09 +02:00
Duarte Santos d302088c11 Set rows: every give-way now lasts until the full-size row fits — the L/R effort −/+ shrink once more at 360–365 px and the list view's cards keep their extra width to 404 px (QA re-test of 0b1072d)
Two narrow bands were left where a set row was wider than the content box of the card it sits in,
so its done tick reached into the card's side padding: 360–365 px on an L/R row with an effort
column (over by 6, 5, 4, 3, 2 and 1 px, in a sets card inside a superset card or a list unit,
cards, list and compact alike, with a rating logged or not), and 401–404 px on a plain row with
an effort column in a superset in the list and compact view (over by 4, 3, 2 and 1 px). Nothing
was clipped and nothing left the screen — the page never overflowed and every number field still
had scrollWidth == clientWidth — but a row may not stand in its card's padding.

Both are the same shape: a give-way that ends one pixel before the layout it hands back to fits.
At 401 px the nested cards' padding snapped back to 16 + 14 + 14 per side and took 48 px off the
row in the one pixel the screen had gained, leaving 281 px for cells that want 285; at 360 px the
effort −/+ returned and asked for 35 px more than the row had. So each give-way now ends where
its full-size counterpart fits. The padding give-back for the list view's units, superset cards
and sets cards runs to 404 px instead of 400, because 405 px is the width where the three full
insets and the row's 285 px of cells first add up to the screen. And the effort column, which had
one step (nothing below 360 px, 64 px from 360), gets the intermediate one it was missing: from
360 to 365 px an L/R row's pill is 56 px, its −/+ shrinking to a 12 px floor. They are what that
cell sheds first — a pixel lower they go altogether — and the rating keeps its 28 px tap target.
The weight and reps columns were deliberately left alone: they have the 41 px numbers and the
18 px button floors of every other row, and "WEIGHT (KG)" needs 75.5 px of the weight column's
77, so taking the six pixels there would have wrapped the header onto a second line at the most
common phone width there is.

Measured with scripts/opengym-qa/run/r3-setrow-band/sweep.mjs on the QA rig (slot 31, slot 71 for
fixes-0917), a 1 px sweep from 320 to 440 px across cards / list / compact x effort none / RIR /
RPE x steppers on / off x a plain and an L/R row inside a superset and outside one (3630
measurements per build, values 102.5 / 227.5 kg, 12 / 100 reps per side, RIR 2.5 / RPE 8.5,
Liberation Sans as the Roboto-metric proxy): before, 64 measurements had a row past its card's
content box — exactly 360–365 and 401–404 px — and after, none, with no clipped number field, no
card or unit past its parent or the screen and no page overflow anywhere in the sweep. The empty
effort cell (empty-eff.mjs) was over by the same 6 / 3 / 1 px at 360 / 363 / 365 and is now 0.
The effort cell is 56 px wide at 360–365 px and 64 px again at 366; the weight column stays 77 px
and its header label one line (before: one line at 77 px, two at 73). The picker still opens:
tap-effort.mjs at 360, 363 and 365 px in cards and list, taps at the value's centre ±6 px, 30 of
30 opened it. 320, 368 and 412 px lie outside both edges, and fix-setrow-layout/measure.mjs — the harness of
0b1072d, 108 combinations of width, view, effort, steppers and superset — prints byte-identical
output on this build and on fixes-0917, 0 with problems (QA C2, C3, C4, C5, C21, C22, C24).
2026-09-20 16:29:30 +02:00
Duarte Santos 36123c0d19 Admin: a stored state written before the entry filter opens the drill-down instead of 500ing it (QA C16 follow-up)
GET /api/admin/user mapped S.routines straight off disk — `r.id` on every entry — so a single
null routine threw, the route answered 500 {"error":"server error"} with a stack trace in the
log, and the sheet never left "Loading…". The Disable button lives inside that sheet, so the
one account an operator opened the dashboard to stop was the one they could not: exactly the
end state C16 described, reached through routines instead of workouts. C16 hardened the sheet
and taught PUT /api/data to drop such entries, but a document v1.3.7 accepted still sits on
disk and answers to nobody.

A `records(list)` helper next to readState now hands every reader the entries of a stored list
and nothing else, and both admin routes go through it: the routine map, the body-weight log,
the workout history (whose `.slice()` threw in its own right when `workouts` was an object
rather than an array) and the user list's workout count, which counted entries the drill-down
then dropped and read `null` for a non-array list. A routine's exercise count counts entries
too, rather than the length of whatever `ex` happens to be. PUT /api/data reuses the helper
for the filter it already had, unchanged in behaviour.

The reminder tick walks the same two lists outside any route: a null entry threw there, was
logged and skipped, and cost that profile every reminder from then on, day after day. It
skips the entry now, not the profile.

Measured on QA slot 32 with each shape planted directly in the slot's data dir
(scripts/opengym-qa/run/r3-admin-null-routine/plant.mjs, shots alongside it):

  routines [null, r]     before  GET /api/admin/user 500, sheet "Loading…", 0 Disable
                                 buttons, 16 stack frames in api.log
                         after   200, sheet shows Workouts 1 · Weigh-ins 1 · Routines 1,
                                 disable and re-enable both land in the audit log,
                                 0 stack frames, no console or HTTP errors
  workouts/routines as   before  500, same dead sheet, 12 stack frames
  objects, not arrays    after   200 with empty lists
  bodyweight [null, b]   before  200 but "Weigh-ins 2" for one weigh-in (4 for one plus
                                 three junk entries)
                         after   1, the number of weigh-ins there are
  null and shapeless workout entries, a null customEx, absent lists and an ordinary
  profile all open, disable and enable, before and after.

api/test/server-admin-state.test.js covers both admin routes against ten stored shapes, and
server-reminder.test.js gains the null-entry case: 188 api tests (was 185). Frontend
untouched — the sheet's own guard from C16 still does the work the server cannot: 1533 vitest
green, 14 locales in sync, 33 demo-only source strings.
2026-09-20 16:01:26 +02:00
Duarte Santos 668002b066 Custom exercises: un-ticking the target hands it to a muscle you tapped, not to the topmost one (QA C10 follow-up)
cc116bd gave a custom exercise the primary tapped first as its target and let an edit keep that
target while the muscle is still a primary. Un-tick it, though, and the fallback was the first
entry of the form's primaries — and for an existing exercise that list is seeded from the store,
which holds the muscles in the map's head-to-toe order. So editing "QA Hip Thrust Pull" (upper
legs, primaries Traps/Glutes/Hamstrings, target Hamstrings), dropping Hamstrings and tapping
Quads, put the target on Traps and the library, picker and Muscles rows read "Traps · barbell"
again: exactly the symptom C10 was about.

The form now remembers which primary chips were tapped in this sheet, in that order. That is the
only record of the user's own order, since the stored list has none, and a dropped target goes to
the first of those taps that is still a primary. A tap that only turned a chip off is skipped with
it, and the sorted list stays as the last resort for the user who drops the target and adds
nothing in its place. Stored primaries and secondaries keep the map's order.

Rig check (slot 33, 412 px, seeded exercise, un-tick Hamstrings + tap Quads): tg "quadriceps",
primaries ['trapezius','gluteal','quadriceps'], library row "Quads · Barbell" - the same script on
the branch build reports tg "trapezius" and "Traps · barbell". The C9/C10 sweep (create tapping
Hamstrings, Glutes, Traps; untouched re-save; library, picker, config, Muscles and workout rows in
English and German) prints byte-identical output on both builds: tg "hamstring" before and after
the re-save, no raw muscle ids, cardio reads "Herz-Kreislauf".
2026-09-20 15:52:29 +02:00
Duarte Santos 0fa35030ee Merge fix/layout-misc: QA round 2026-09-19 (dev team) 2026-09-20 13:58:21 +02:00
Duarte Santos 145c668dd1 Merge fix/setrow-layout: QA round 2026-09-19 (dev team)
# Conflicts:
#	frontend/src/views/Workout.test.jsx
2026-09-20 13:58:21 +02:00
Duarte Santos 0b1072dbf8 Set rows: the number outranks the buttons in every row — 102.5 kg, 100 reps, 10.5 km/h, RPE 8.5 and a drop's weight stay readable at 320/368/412 px, and the header sits over the L/R cells (QA C2 C3 C4 C21 C22 C24 C5)
The weight/reps steppers gave their two 32 px buttons priority over the number between them, so
on narrow phones the field shrank to nothing: at 320 px a fresh profile (no effort column,
buttons on) showed an empty reps field and "102" for 102.5; per-side rows lost the reps number at
368 px, and inside a superset at 412; the cardio row's 10.5 km/h read "10"; a per-side drop set's
two fields collapsed to 0 px; with an effort column the decimal weights lost their last digit at
320 px; a weighted timed hold showed "102.!" for its load at every phone width; the logged
effort's value shrank to 4 px under its own digits so a tap on it stepped the rating instead of
opening the picker; and the column header over per-side rows stood 17-23 px left of the cells
because it never accounted for the L/R badge. Only the #235 mitigations existed, scoped to rows
with an effort column.

Every number field now reserves the widest value it shows at its own font (`--num`, plus the
field's padding and 2 px against font rounding), the cell is never narrower than that plus two
button floors (18 px, 16 px on the tightest rows), and the buttons shrink first. The weight and
reps buttons, that is: the effort cell is a `.stp` too and its value is a `<button>`, so that
rule stays off it and the value keeps filling its cell instead of sitting in a 32 px box with
dead space beside it. The effort column keeps a 28 px value with 16 px floors; where a row cannot
hold three numbers and six buttons — every row below 360 px, and an L/R row inside a superset in
the list view below 430 px, where three insets leave it 260 px of a 412 px screen for the 277 its
cells want — the effort's −/+ give way and the value alone stays, still opening the picker; from
430 px up that row keeps its −/+ like the plain row above it. A timed hold logs the seconds first
and the load second, so those two columns swap their reserve and their share at every width, not
only below 360. The header carries `per-side`, `timed` and `plain` from Workout.jsx so its columns
freeze exactly where the cells do; per-side drop rows no longer pay the straight row's 32 px
indent twice; a weighted timed hold (one control more than a straight row) gets the effort-row
sizing below 360 px. The list view's grid gets minmax(0,1fr): with floors on the cells the default
`auto` track grew a unit past the screen and carried the ticks off it, which is also why an
earlier draft's list numbers looked fine. The sets card nested in a list unit or superset card
gives up 8 px of side padding at <=400 px so every row has the same 256 px at 320 as in a plain
card.

Measured with scripts/opengym-qa/run/fix-setrow-layout-2/measure.mjs on the QA rig (slot 70), one
fresh guest per combination, 320/368/412 px x cards/list/compact x effort none/RIR/RPE x buttons
on/off x plain/superset (108 combinations), values 102.5 / 227.5 kg, 12 / 100 reps, 22 min @
10.5 km/h, timed holds of 120 s @ 32.5 kg, 90 s @ 102.5 kg and 600 s @ 227.5 kg, per-side
22.5 x 12 and 102.5 x 100 with drops, RIR 2.5 / RPE 8.5, Liberation Sans as the Roboto-metric
proxy: before (fixes-0917) 0 of 108 clean, 698 clipped fields and the list unit 23 px wider than
a 320 px screen; after 108 of 108 clean, no row or unit overflow, header drift 0 px on plain and
per-side rows, the tightest field ("227.5" in a drop row) 2.1 px of slack. The same matrix at 768
and 1280 px (48 combinations): clean. The timed load — the field the earlier run only ever put
32.5 kg in — has 37 px for "102.5" and "227.5" at 320 px, 44 at 368 and 51-67 at 412, with
scrollWidth == clientWidth everywhere (before 17-29 px for a 41.7 px value, i.e. "102.!").
Effort cell (tap-effort.mjs, RPE 8.5, taps at the value's centre +-6 px, 320/368/412, cards and
list): 30 of 30 open the picker (before: 2-3 of 5 stepped the rating at 320/368); its value is
28 px next to 24.4 px of text on a phone and 71.5 px in a 115 px cell at 1280 px, centred between
the −/+ (before 32 px in a 105 px cell, bunched left). L/R rows in a superset in the list view
(budget.mjs, ss-eff.mjs): the effort −/+ are gone at 320-429 px and back from 430 px, where the
row is 278 px wide and nothing overflows — 1 px short at 428 — and at 768 and 1280 px both
buttons and a 28-35 px value are there, as on the plain row beside them. Per-side drop inputs
(drop-rows.mjs): 34/24 px for "22"/"5" at 320 cards, 368 list+superset and 412 list+superset
(before 0/0, 5/5, 13/13). Cardio speed "10.5" (cardio-speed.mjs): 35-45 px for a 32.5 px value at
every width and view (before 0-33 px). Header vs cell centres (header-drift.mjs): 0 px in all 12
configurations (before w -18..-23, r -6..-14).
2026-09-20 12:50:14 +02:00
Duarte Santos cca8ecd848 Merge fix/custom-muscles: QA round 2026-09-19 (dev team) 2026-09-20 07:01:54 +02:00
Duarte Santos d7bb67a1c0 Phone-width layout: the double-progression row wraps into pairs, the Progression title keeps its width, page headers give way before their button, the body-weight buttons drop a line (QA C6, C8/C23, C25)
Four fixes to layouts that only fall apart on narrow phones, all pre-existing:

Exercise config sheet (C6). Double progression on a weighted exercise puts four
steppers in one .cfgrow (Step, Reps from, Reps up to, Deload 1RM). Each spends 64 px
on its buttons, so four abreast left the input 1 px at 320 and 13 px at 368 — "1.25"
read "1.2", "90" read "9(". The row now carries `cfgrow-4` when it holds the four,
and below 480 px it wraps into two pairs (basis half the row minus half the gap).
From 480 up four abreast still leaves 41 px, enough for "1.25".

Routine editor, "Progression" row (C8, same as C23). .lrow-m had a basis of 0 and got
only what the capped value left over: a 37 px box for a 96 px title at 320, so
"Progression" was painted over by "Linear progression". The title column now keeps
104 px, the width of one long word; the value shrinks and ellipsises as before. This
is the same floor the segmented-control rows already use (150 px), which the more
specific rule keeps. All 60 title+value rows in the 15 packs fit at 320 px.

Page header (.hdr) (C25 plus the two reported header cases). The title block could
not shrink below its longest word, so "Упражнения" at 34 px, "Izom szerint" next to
it, or a profile name like "Hi Bartholomew_Jones" pushed the Settings gear or the
"By muscle" button off the right edge, and before that the button's own label wrapped
into two lines. The title block gets min-width:0, a word that does not fit is
hyphenated (hyphens:auto — <html lang> follows the app language) and broken anywhere
only as a last resort, and the header button is flex:none so it keeps its width.

Body-weight card header, Home and Stats. In German the title plus "Ziel" and
"+ Eintragen" outgrow a 320 px card by ~55 px and the last button poked past the
card; the header (`bw-head`) may now wrap the button pair onto a second line, still
flush right.

Measured on the QA rig (scripts/opengym-qa/run/fix-layout-misc/measure.mjs, en/de/ru;
after in DejaVu and with Roboto injected, before in DejaVu):
  C6  input clientWidth for "1.25" (needs 37): before 1 / 13 / 24 at 320 / 368 / 412
      → 74 / 98 / 120, two lines; 480: 41, 600: 71, one line (c6-wide.mjs)
  C8  title box / paint-over onto the value, 320 en: before 37 px / 47 px over
      → 104 / −20 (Roboto −27); 368 de before 65 / 19 → 104 / −20; 412 ru before 80 / 10
      → 104 / −14; no title clipped in any of the 9 cases
  C25 Library button right edge, viewport 320 / 368: ru before 388 / 388 → 304 / 352;
      Roboto 304 / 352 / 396 (412), title hyphenated "Упраж-нения" at 320 and 368
  hdr Home gear right edge with "Hi Bartholomew_Jones": before 423 at every width
      → 304 / 352 / 396
  bw  last button past the card's padding, 320 de: before 53 px → 0 (second line);
      368 de before 5 → 0
Regression sweep (sweep.mjs: /home /settings /plan /plan/r /stats /library /muscles
/history at 320 and 368 in en/de/ru/hu): no page overflow, nothing off-screen, no row
wider than its card. Vitest: 115 files, 1520 tests green; locales in sync; the
source-string baseline stays at 33.
2026-09-20 02:36:03 +02:00
Duarte Santos 185afe6a96 Merge fixes-0917 into fix/custom-muscles: the cardio label translates through one key (QA C9 follow-up)
Both sides cured the same English "Cardiovascular system" for the built-in cardio exercises:
this branch (6796e55) added a capitalised "Cardiovascular system" key to the 13 translated packs,
fix/copy (10ff64b, merged into fixes-0917) made MUSCLE_NAME['cardiovascular system'] lowercase so
the packs' existing dataset key translates it and the places that show it capitalise with CSS.
One mechanism is enough: the lowercase key stays, the 13 capitalised duplicates go, and the pt-BR
guard is back at fixes-0917's numbers (645 overrides, 647 inherited, fingerprint 185cca3d…,
regenerated with scripts/pt-br-inheritance-fingerprint.mjs). The locale packs are now identical
to fixes-0917; the branch's own changes (C10 target = first-tapped primary, C9 MUSCLE_NAME at the
picker row, config sheet, Muscles rows and workout tag) merge cleanly on top.
2026-09-20 02:19:30 +02:00
Duarte Santos fcb2fc576a Merge fix/copy: QA round 2026-09-19 (dev team) 2026-09-20 02:05:07 +02:00
Duarte Santos cb4fc99dcc Merge fix/list-scroll: QA round 2026-09-19 (dev team) 2026-09-20 02:05:07 +02:00
Duarte Santos 6a86f54e4c Merge fix/api-admin: QA round 2026-09-19 (dev team) 2026-09-20 02:05:06 +02:00
Duarte Santos 1d6e49fb2b Merge fix/import: QA round 2026-09-19 (dev team) 2026-09-20 02:05:06 +02:00
Duarte Santos 05d20b33e5 Merge fix/search-noise: QA round 2026-09-19 (dev team) 2026-09-20 02:05:06 +02:00
Duarte Santos d7274bd202 Merge fix/plan-share-custom: QA round 2026-09-19 (dev team) 2026-09-20 02:05:06 +02:00
Duarte Santos ffc0ecf52e Merge fix/units: QA round 2026-09-19 (dev team) 2026-09-20 02:05:05 +02:00
Duarte Santos 6358bef1ae Merge fix/stats-strength: QA round 2026-09-19 (dev team) 2026-09-20 02:05:05 +02:00
Duarte Santos 6796e559d3 The cardio target keeps its translation now that it goes through MUSCLE_NAME — "Cardiovascular system" in all 14 packs (QA C9 follow-up)
Routing the target through MUSCLE_NAME (2bf86a5) mapped "cardiovascular system" to the display
name "Cardiovascular system", which no pack carried — only the lowercase dataset key had a
translation. Every built-in cardio exercise (29 in the dataset, plus custom cardio) therefore fell
back to English in the picker row, the routine config sheet and the workout tag, where the parent
build already said "Herz-Kreislauf". The display name now carries the same translation each pack
had for the dataset key (pt-BR inherits it from pt-PT like the other muscle names; fingerprint
regenerated: 648 inherited). That also cures the Library row and the detail sheet, which mapped
through MUSCLE_NAME before this branch and leaked English there all along.

Regression tests: picker row + config sheet (sheets.muscle-names.test.jsx) and the workout tag
(Workout.test.jsx) for burpee 1160 in German, both failing before this change. Rig check on the
branch build (slot 71, de): configTags Cardio/Herz-Kreislauf/Körpergewicht, picker row
"burpee — Herz-Kreislauf · Körpergewicht", workout tags identical to the config tags, Library row
"Herz-Kreislauf · Körpergewicht", detail sheet Cardio/Herz-Kreislauf/Körpergewicht/…
2026-09-19 21:34:30 +02:00
Duarte Santos a54e4b6e8a List view clears the sticky header at its real height — a wrapped workout name hid the current exercise's header row (QA C27)
The scroll margin that keeps the current unit out from under the pinned header was a
fixed 96 px, the height of a one-line header. The header renders the session name
without truncation, so a descriptive routine name or a two-routine "A + B" session
makes it two to five lines tall and the unit's label, Current badge and menu ended up
underneath it.

Workout.jsx measures the header right before it scrolls and hands the height to the
list as --whdr-h; .wl-unit's scroll-margin-top uses it (safe area included, since the
header's padding carries it) and keeps the one-line height as the fallback.

Measured on the QA rig (scripts/opengym-qa/run/fix-list-scroll/measure.mjs, gap from
header bottom to the current unit's top, tab-bar return with "Set current" on the 4th
exercise; before: negative = covered):
  320 px  8ch 12  |  42ch (143 px header) 12, before −51  |  62ch (165) 12, before −73
  368 px  8ch 11  |  42ch (121) 12, before −29            |  62ch (143) 12, before −51
  412 px  8ch 11  |  42ch (99) 12, before −7              |  62ch (121) 12, before −29
  backfilled session, 42ch name, via ⋯ → Layout → List at 368 px: 16
2026-09-19 21:24:12 +02:00
Duarte Santos 6e39fbd4b4 List view lands on the current exercise through the ⋯ menu too — two scroll restores were undoing it (QA C1)
Choosing List (or Compact) from ⋯ → Layout closes a sheet, and two things put the
page back where it was before that sheet opened, after the list had already scrolled
to the current unit (#224):

- Modals.jsx re-applied the pre-sheet scrollY a second time 350 ms after closing. That
  repeat exists for one case only — iOS scrolling the page again while the keyboard
  dismisses — so it is now armed only when the keyboard is up at close time. With no
  keyboard there is nothing to undo, and the late restore overwrote a scroll the view
  made on purpose.
- App.jsx treated the popstate from the sheet's history entry (Modals pushes one per
  sheet, #63) as a back-navigation: the pathname is the same, only the navigation type
  flips to POP after the PUSH that started the workout, and the effect restored the
  position it had recorded — read before the scroll event for the new position had
  been dispatched, so it was the old one. A POP that stays on the current route is
  not a navigation and is skipped now. That is also why the first sheet close after
  Start failed and later ones (POP → POP) did not.

The list's own scroll now runs in the next frame instead of in the effect: App.jsx
asks for its restore frame during the same commit (reload, back-navigation), so a
frame asked for afterwards runs after it. It also re-runs on List ↔ Compact, where
the rows change height and the old offset lands on a different exercise.

Measured at 368 px on the QA rig (scripts/opengym-qa/run/fix-list-scroll/measure.mjs,
current unit's top vs. sticky header bottom, 77 px):
  before  cards→list via menu: scrollY 2601 at 223 ms, back to 399 at 304 ms, unit
          2217 px below the fold (2/2); list→compact ok
  after   cards→list 93 px (gap 15) 2/2, list→compact 93 px 2/2, compact→list 93 px
          2/2, reload 89 px 6/6, reload with a current superset 89 px 4/4, back from
          Stats 89 px 2/2; verifier's own scripts 8/8 MENU OK at 368 and 412
2026-09-19 21:23:26 +02:00
Duarte Santos 5bbbffe138 Admin activity log: pairing events read as sentences, not as auth.pair.create / code-invalid (QA C18)
LABELS and REASONS never got the three pair.* events and their two reason codes when the
pairing feature landed. The guard test now reads the event and reason lists off
api/server.js itself instead of a hand-kept copy, so the next new event fails the test
rather than printing a dotted identifier at the operator.
2026-09-19 21:20:00 +02:00
Duarte Santos 8094a5131b Admin: a profile with a null or shapeless workout entry opens instead of blanking the whole app (QA C16)
UserDetail rendered w.name and setsDone(w) on every stored entry, and the sheet host sits
outside the route's ErrorBoundary, so one null took the React tree down — #root empty until
a full reload, and exactly that account could not be disabled from the dashboard. Entries
without a usable session are skipped now; the API no longer accepts new ones, but a file
written before still answers with them.
2026-09-19 21:20:00 +02:00
Duarte Santos f94f8ca320 API: a request the client got wrong is a 400 (or 413), never a 500 with a stack trace — bad or non-object JSON, an array as the state document, null workout entries, a rest timer without seconds (QA C17, C19, C20, C16)
readBody rejects with a typed HttpError for unparseable text and for a JSON null, string,
number or array; the catch-all answers it with its status and does not log it — three of
these routes are reachable without a session, and a stack trace per malformed body let
anyone fill the container log. String() on a caller-supplied field went through the same
door ({"code":{"toString":1}} is valid JSON) and is replaced by a text() helper.

PUT /api/data refuses an array state (typeof 'object', but _rev on it is dropped by
JSON.stringify, so the file read back as rev 0 while the response claimed rev N+1) and
drops null and non-object entries from workouts/routines instead of refusing them: such an
entry carries nothing worth keeping, while a 400 would strand a client whose own copy is
already malformed in a re-send loop. Every server-side reader of the document (reminder
tick, admin drill-down) dereferences the entries.

POST /api/push/rest-timer validates seconds before clamping — the clamp ran first, turned
any missing or unusable value into a 1-second push and made the documented 400 unreachable.

A body over 5 MiB is a 413 the client actually gets to read: the remainder of the upload is
drained instead of the socket destroyed under it (which sent a reset that a node client hit
before parsing the answer — the QA proxy reported 502 on 3 of 4 attempts, 5 of 5 read the
413 afterwards); past twice the cap the upload is cut off. openapi.yaml documents the
400/413 bodies and the rest-timer 400.
2026-09-19 21:20:00 +02:00
Duarte Santos 2bf86a5318 Muscle names in the picker row, config sheet, Muscles rows and the workout tag go through MUSCLE_NAME — "gluteal", "forearm" and "hip-flexors" leaked as raw ids, and "forearm" stayed English in German (QA C9)
Custom exercises and the batch-1/Olympic metadata (#207) name muscles by the map's ids, for which
only the display names in MUSCLE_NAME have translations. The detail sheet and the Library row
already mapped through it; the picker row subtitle, the routine config sheet tags, the Muscles
explorer rows and the tag under the exercise name in a workout translated the id directly.

Rig check on the branch build (slot 71, en + de): picker row "Glutes · barbell" / "Gesäß · Langhantel",
custom config tags Glutes/barbell/Forearms/Hip flexors, power clean config tags in German
Beinbeuger/Langhantel/Waden/Unterarme/Schultern, Muscles > Glutes "Primary target · Glutes · barbell",
workout tag "Glutes" / "Gesäß".
2026-09-19 21:17:20 +02:00
Duarte Santos cc116bdbcc Custom exercises: the target muscle is the primary tapped first, not the topmost one on the map (QA C10)
Since the muscles are stored in the map's order, the one-word target `tg` was taken from the
head of that sorted list, so a hip thrust or deadlift with Traps as an extra primary showed up as
"Traps · barbell" in the library, the picker and the Muscles view — and because tap order was
discarded, the user had no way to correct it. The list stays in map order; the target is the
primary the user picked first, and editing an exercise keeps its target as long as that muscle
is still a primary.

Rig check on the branch build (slot 71, 368 px, Hamstrings → Glutes → Traps): stored primaries
['trapezius','gluteal','hamstring'], tg 'hamstring'; library row, picker row and Muscles > Glutes /
Hamstrings all read "Hamstrings · barbell".
2026-09-19 21:17:20 +02:00
Duarte Santos 10ff64b0e1 Library: cardio exercises show a translated "cardiovascular system" instead of English in every language (QA copy)
MUSCLE_NAME values are the i18n keys, but the cardio pseudo-muscle was written as
"Cardiovascular system" while the packs only know the dataset's lowercase spelling, so the
Library row subtitle and the exercise sheet's target tag stayed English in all 13 translated
languages. Both places capitalise with CSS anyway, so the key now matches the packs and the
English rendering is unchanged. A test checks every MUSCLE_NAME value against every pack so
the next name added here cannot silently render English.
2026-09-19 21:15:33 +02:00
Duarte Santos d0c7d40a68 Plan: a day with one routine says "1 routine", and so does the toast after importing a one-routine plan file (QA copy)
The weekday header on the Plan screen and the toast after "Add to my plan" both formatted
their count with the plural key only, so a single routine read "1 routines". The singular
"{0} routine" has been in every pack all along — a routineCount helper next to exCount in
lib/format.js now picks the form, and the import sheet's own summary line uses it too instead
of spelling the choice out again. The toast needed a real singular string, "Added {0} routine
to your plan", added to all 14 packs; pt-BR overrides it like the plural, so the inherited
pt-PT set and its fingerprint are unchanged and only the override count moves to 645.
2026-09-19 21:15:33 +02:00
Duarte Santos 5c3a9323b7 Import: a second export reuses the custom exercises the first one created (QA C12)
parseWorkoutCSV invents a fresh 'im…' id for every name it cannot match, and
mergeImport appended those to S.customEx without looking at what was already
there — so importing Hevy, then a later Hevy export, left two 'Grip Trainer'
entries with one workout of history each (Hevy + Strong + FitNotes grew 25 → 76
customs, 24 of them duplicated names). mergeImport now matches parsed customs
against S.customEx by lower-cased, whitespace-collapsed name (an earlier import
or one made by hand), rewrites the fresh days' entry ids through that map and
only pushes the names with no match — the same shape mergeHevyRoutines and
mergePlan already use. Covers the Hevy API path too, which merges through here.
2026-09-19 17:10:07 +02:00
Duarte Santos e20201a870 Import: the stored volume leaves warm-up sets out, like a workout finished in the app (QA C14)
Both importers summed every set into w.vol, while a workout finished in the app
writes workoutVolume(w), which skips warm-ups — the config sheet promises they
stay out of volume, records and progression. The inflated number is stored with
the workout and read straight back by History, the heatmap and the month totals.
Filter with isWarmupRow, as the topW line right above it already does.
2026-09-19 17:08:51 +02:00
Duarte Santos f9715d76d3 Import: hyphenated names get the same body part as their spaced spelling (QA C28)
bpFromName matched its rules against the lower-cased name only, while the rules
are written with spaces: 'Stiff-Legged Deadlift' fell through to the deadlift
rule (back) and 'Chest-Supported Row' hit 'chest' before 'row'. The matcher's
wordsOf already treats both spellings as one exercise, so the fallback now
reads '-', '_' and '/' as spaces before the rules run and agrees with it.
2026-09-19 17:08:33 +02:00
Duarte Santos 6e2dad2dc9 Search: typo tolerance only against name words, and only for words with no exact hit (QA C26)
Since #206 the search compared every query word of five or more letters against every
word of the exercise's corpus, body part, target and equipment included. A correctly
spelled word one edit away from one of those shared words matched a whole slice of the
catalogue: "wrist" ~ "waist" listed all 169 abs exercises (200 results instead of 31, the
first real wrist curl on row 23), "power" ~ "lower arms" 174 instead of 2, "slide" ~ "side"
34 instead of 1, and in the German UI "drücken" ~ "rücken" returned every back exercise.
Even words with exact hits picked up strays: "squat" led with "all fours squad stretch",
"clean" gained "lean planche".

The typo tolerance now compares against the exercise's own name words only (English and
localized), never body part, target, equipment or description. Lists (library, exercise
picker, muscle explorer) go through the new searchExercises: a word that appears literally
in at least one exercise of the list is taken at its word, and only a word with no exact
hit anywhere ("bnech", "dumbell", "wirst") falls back to the typo tolerance, so real
matches are never buried under fuzzy ones. matchExercise keeps working per exercise for
the progress picker. The existing typo tests keep passing unchanged.

Rig (412 px, /#/library, fresh guest, rows rendered / first genuine row) before -> after:
wrist 40+/23 -> 31/1, power 40+/none -> 2/1, slide 34/33 -> 1/1, thigh 17/none -> 1/1,
squat "squad" first -> "band one arm single leg split squat" first, clean 12 -> 11,
de "drücken" 40+ -> 0; typo queries "wirst curl" 26, "dumbell" 40+, "bnech press" 33 still
find their exercises. Cost per full pass 6 ms -> 0.8-2.5 ms.
2026-09-19 17:07:26 +02:00
Duarte Santos df76c21036 Plan sharing: a custom exercise travels with its equipment and muscles, and arrives editable (QA C7)
The plan file carried only {id, n, bp} for a custom exercise and mergePlan stored exactly
that, so the recipient's copy showed an empty equipment tag and no muscle credit, and —
stored without `custom: true` — had no Edit or Delete anywhere. A wrong import could only
be fixed by hand-editing localStorage.

buildPlanBundle now writes eq, tg, primaries, secondaries, muscleGroups and desc through
one cleanCustom helper, and mergePlan runs the same gate on the way in (a plan file is
someone else's data: only muscles the map can draw, a secondary never repeating a primary)
before storing the exercise in the shape CustomExForm writes, with `custom: true` and `sm`.
Empty fields stay absent, so an old name-plus-body-part file imports as before, now
editable at the other end. The #210 unit conversion is untouched.

Browser check (QA rig, slot 75, before → after): recipient's stored customEx
{id,n,bp} → {id,n,bp,eq,tg,primaries,secondaries,muscleGroups,sm,custom:true};
detail sheet tags ["back",""] → ["back","Upper back","barbell","Biceps"], buttons
["Add to my plan"] → [..., "Edit", "Delete"]; config sheet gains "Edit or delete this
exercise"; library row "back · " → "Upper back · barbell".
2026-09-19 17:06:32 +02:00
Duarte Santos 929e9155b4 Unit switch: cached workout volume and session body weight convert too, body weight at 0.1 instead of plate steps (QA C11, C15)
"Convert the numbers" walked the sets but left workout.vol, workout.bw and active.bw
alone, so History rows, the detail header, the month calendar and the heatmap
tooltips showed the kg numbers under an lb label (Pull Day "7,535 lb" above sets that
add up to 16,627 lb; the month "57,412.5 lb"). The cached volume is now re-added from
the converted sets, so it agrees with the set list to the number, and the session
body weight converts with the weigh-ins.

Body weight and the goal weight are weighed and edited at 0.1, not loaded on a bar;
rounding them to 0.5 lb / 0.25 kg moved 22 of 24 seed weigh-ins on a kg -> lb -> kg
round trip (78.6 -> 173.5 -> 78.75, Home card 78.8 kg). They now convert to a tenth,
which brings every 0.1-kg value home.

Rig (seed-loaded, kg -> lb -> kg via Settings): 40 workouts, lb vol == lb set sum for
all, vol and bw unchanged after the round trip, 24 weigh-ins 0 changed, targetW 77 ->
169.8 -> 77; History "Pull Day · 16,627 lb", header "48 min · 16,627 lb · 173.3 lb",
calendar "126,644.5 lb", heatmap "48 min · 16,627 lb".
2026-09-19 17:06:24 +02:00
Duarte Santos 55b9a29e66 Stats → Strength: tapping an exercise row opens its history instead of throwing — the row called an onExercise handler that never existed (QA C13)
The "Exercises · <muscle>" rows in the Strength view have been styled and announced as
buttons since 64ea41a, but their handler referenced `onExercise`, which is neither a prop
nor anything in scope. Every tap and every Enter on a focused row ended in an uncaught
ReferenceError and nothing opened, on this branch and on v1.3.7 alike.

Each row quotes the exercise's estimated 1RM, so a tap now opens the exercise history sheet
that already exists for exactly this: the top-set / Est. 1RM curve plus the last sessions
set by set. No new strings.

The source-contract test in Stats.test.js had pinned the broken handler literally; it now
pins the working one and rejects a reappearance of `onExercise`. A component test taps a
Strength row with a real click and with Enter, asserts no error reaches the window and that
the history sheet is asked for the tapped exercise.

Verified on the QA rig (slot 78) with the verifier's own repro: seed-loaded @412 and
seed-standard @368 — after tap {"hash":"#/stats","sheets":1}, 0 new errors after
2 clicks + Enter (before: ReferenceError on each).
2026-09-19 17:05:49 +02:00
Duarte Santos 83b2a140d6 Custom exercises: muscles are stored in the map's order, not the order the chips were tapped in 2026-09-17 11:37:56 +02:00
Duarte Santos 0f7e3e1291 Import: body part from an exercise name — the specific word before the broad one (a grip is a modifier, a wrist curl is a forearm exercise, a leg curl and a Romanian deadlift are legs, chest-supported is a row) 2026-09-17 11:37:56 +02:00
Duarte Santos b95561e957 Android: trust user-installed CAs next to the system ones — a self-hosted server behind a private CA could not be reached from the app (#213) 2026-09-17 11:37:56 +02:00
Duarte Santos 113e7ef755 Set rows with an effort column on narrow phones: the same squeeze on a plain row — the list view clipped a two-digit reps number at 368 px (#235) 2026-09-17 11:35:43 +02:00
Duarte Santos 10b9598af4 One-sided rows with an effort column: the reps number is visible again on narrow phones — the stepper buttons had taken the whole cell at 368 px (#235) 2026-09-17 11:34:44 +02:00
Duarte Santos 69fd4a8344 List view opens at the current exercise instead of the top of the session (#224) 2026-09-17 11:32:31 +02:00
Duarte Santos a41b0ca60f Rest-over alert: follow the Push switch — it fired with notifications off, asked for the permission by itself and repeated its title in the body (#239) 2026-09-17 11:31:07 +02:00
Duarte Santos 5007b05504 Merge #207: fix: classify audited Olympic lift families across primary muscles (Space-Hermes) 2026-09-17 11:29:46 +02:00
Duarte Santos a98fb4d791 Merge #210: fix: preserve weight units when sharing and importing plans (Space-Hermes) 2026-09-17 11:29:44 +02:00
Duarte Santos 1849fc8c5f Merge #220: Heatmap: follow the profile's week-start setting (aaron-rai) 2026-09-17 11:29:42 +02:00
Duarte Santos 394f6d545a Merge #206: fix: tolerate minor typos in longer exercise search words (Space-Hermes) 2026-09-17 11:29:40 +02:00
Duarte Santos dc9f5d6a1a Merge #185: web: an unknown path redirects to the root instead of serving a shell that cannot load (kurktchiev) 2026-09-17 11:29:37 +02:00
Duarte Santos 5eeec2a52a Merge #184: fix: fetch the manifest with cookies, and tell self-hosters behind an auth proxy what to exempt (iOS Home Screen icon) (kurktchiev) 2026-09-17 11:29:35 +02:00
Duarte Santos 236492b78c Merge #208: test: use local calendar dates in the Coach daily-cap fixture (Space-Hermes) 2026-09-17 11:29:33 +02:00
Duarte Santos a68a88d2da Roadmap: a release every two weeks — fifteen dated milestones from v1.3.8 (promised items, 2026-09-27) through v1.4.7 (2027-04-18), v1.4.0 is the database 2026-09-13 13:31:45 +02:00
Duarte Santos b30526e0e5 Roadmap: v1.3.8 promised items and history editing, v1.3.9 programmes, v1.4.0 the foundation (database + search), v1.4.1 accounts, v1.4.2 the iOS app, v1.4.3 what they unlock; milestones live on GitHub now 2026-09-13 13:23:45 +02:00
Duarte Santos d8d7257d35 Website: underline the demo-note link, 480 px WebP variant for phones, ?v=19
Lighthouse desktop flagged the one in-text link that relied on colour alone;
the hero and rail images gain a 480w candidate so a 2× phone no longer
downloads the 600w file.
2026-09-13 13:14:40 +02:00
Duarte Santos 975c9f440b Website: v1.3.7 screenshots, WebP delivery, social card, skip link, idle API lookups
- Screenshots retaken from the v1.3.7 demo build (the old set still showed the
  pre-1.3.3 workout screen with its button rows). The five phone images are now
  served through <picture> as WebP at 600/1170 px with the PNG as fallback; the
  hero image is preloaded. website/build-images.sh produces img/ from assets/.
- og:image on every page is a 1200×630 card (assets/social.jpg) with width,
  height and alt; robots meta with max-image-preview:large; preconnect to the
  analytics host; SoftwareApplication JSON-LD carries version, dates,
  screenshots and a feature list.
- Every page starts with a Skip-to-content link and the content sits in
  <main id="main">; scroll reveals are also disabled for print.
- The GitHub and Discord counters wait for requestIdleCallback instead of
  racing the hero image. Cache-bust ?v=18. llms.txt names GitHub as the home.
- robots.txt, sitemap.xml and llms.txt now live in website/ so the site is
  fully regenerable from the repo.
2026-09-13 13:13:02 +02:00
Duarte Santos d7f0f0dbdb v1.3.7: the Android build builds again (a double dash inside an XML comment in styles.xml broke v1.3.6's APK), plus the iPhone timer-sound fix (#183) 2026-09-12 23:31:21 +02:00
Duarte Santos 5a8873b919 Changelog: the iOS timer-sound fix (#183) as the first entry for v1.3.7 2026-09-12 23:29:04 +02:00
Duarte Santos 33f4758a1c Merge #183: iOS timer sounds — the context resumes before every tone, unlocks from the tap, and a setting plays sounds on silent; #152 (kurktchiev)
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
#	frontend/src/locales/de.js
#	frontend/src/locales/es.js
#	frontend/src/locales/fr.js
#	frontend/src/locales/hi.js
#	frontend/src/locales/hu.js
#	frontend/src/locales/it.js
#	frontend/src/locales/ko.js
#	frontend/src/locales/pl.js
#	frontend/src/locales/pt-BR.js
#	frontend/src/locales/pt.js
#	frontend/src/locales/ru.js
#	frontend/src/locales/th.js
#	frontend/src/locales/tr.js
#	frontend/src/locales/zh.js
2026-09-12 23:29:04 +02:00
Duarte Santos 6a8d2288ae Website docs: sync between devices, offline mode, where push works and the reminder catch-up (v1.3.6) 2026-09-12 23:14:00 +02:00
Duarte Santos 32111dcad3 v1.3.6: sync you can trust (server revisions, sign-in adopts the profile, polling, offline mode), self-healing push, the phone fixes, the Astra findings, eleven community merges 2026-09-12 23:11:27 +02:00
Duarte Santos 631d01b1b2 After the merges: four combine-routines / custom-exercise strings in all 14 packs, the de-CH number test accepts either Swiss apostrophe (ICU versions differ), changelog for the merged PRs and MRs 2026-09-12 22:58:25 +02:00
Duarte Santos 020b7f4477 Merge !135: Coach job directory permissions without CAP_DAC_OVERRIDE (T13o)
# Conflicts:
#	api/coach/jobs.js
2026-09-12 22:55:26 +02:00
Duarte Santos 86f28acb17 Merge !133: per-side data preserved across progression and session flows (ErrorUsernameAlreadyTaken)
# Conflicts:
#	frontend/src/lib/history.js
2026-09-12 22:55:11 +02:00
Duarte Santos f472f37c3d Merge !120: the equipment filter survives a body-part change in the exercise picker, #150 (ErrorUsernameAlreadyTaken) 2026-09-12 22:54:14 +02:00
Duarte Santos f7e69ac6df Merge !118: plan sharing prints as PDF on the mobile app, #149 (HenryByte)
# Conflicts:
#	frontend/ios/App/App.xcodeproj/project.pbxproj
2026-09-12 22:54:14 +02: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 7b9c54bc7f Merge #162: custom exercise improvements — equipment, muscle names, cardio target (LuckaPow)
# Conflicts:
#	frontend/src/index.css
2026-09-12 22:53:22 +02:00
Duarte Santos 2240499793 Merge #174: a switch to skip the weigh-in when a workout starts, #137 (kurktchiev)
# Conflicts:
#	frontend/src/lib/pt-br-locale.test.js
2026-09-12 22:52:39 +02:00
Duarte Santos 6c8bc51d18 Merge #164: a per-exercise rest for warm-up ramp sets, warmupRestSec (kurktchiev) 2026-09-12 22:52:15 +02:00
Duarte Santos e36a1222a1 Merge !125: iOS deployment target 15.5 (thedandano) 2026-09-12 22:52:15 +02:00
Duarte Santos 1977a6427b Merge #117: iOS adopts the UIScene lifecycle for Xcode 26+ / iOS 26+ (shailantani) 2026-09-12 22:52:15 +02:00
Duarte Santos c385025385 Merge #171: de-CH as a derived locale (mkoester) 2026-09-12 22:52:15 +02:00
Duarte Santos 4f77c2b4bc Merge #182: README image reference back to GitHub (andi242) 2026-09-12 22:52:15 +02:00
Duarte Santos b1d79d54c7 Service worker: the shell and the built assets are precached at install and the copy for the cache is cloned before the page reads the response (it was cloned too late and never stored, so an offline reload of the home-screen app failed); the cache is named after the build; starting the app offline raises the offline line at once 2026-09-12 22:20:48 +02:00
Duarte Santos 14c454f5c1 The "back online" toast fires on the real reconnect path: the pull that runs first cleared the offline flag before the owed push looked at it 2026-09-12 21:56:15 +02:00
Duarte Santos 826432a3a2 Signed in, the server's profile is the truth: sign-in and pairing adopt it and ask once about workouts logged while signed out (Add them / Keep profile as is); the app polls the revision every 30 s and on every resume (GET /api/data/rev) and fetches only what moved; offline and unsynced states show a banner, retry on reconnect and confirm with a toast; pagehide flushes a pending change 2026-09-12 21:51:36 +02:00
Duarte Santos 28a068b8f0 Changelog: the #175/#172 bullets were listed twice 2026-09-12 21:32:02 +02:00
Duarte Santos b5e0388364 Progression adds its step the way a stepper tap does — 397 lb + 10 lb is 407, not the grid's 410 (#175); the service worker closes the previous notification with the same tag so rest-timer alerts do not pile up on iOS (#172) 2026-09-12 21:31:05 +02:00
Duarte Santos bff87930d8 Progression adds the step the way a stepper tap does — a weight off the increment grid keeps its offset (397 + 10 = 407, not 410; #175); the service worker closes the previous notification of the same kind before showing the next (#172) 2026-09-12 21:21:13 +02:00
Duarte Santos 06f1c007a7 Chip rows: the chips' enlarged tap area gave the 32px strip a 36px scroll height, so a diagonal swipe or a wheel tick shifted the whole row up 4px and left it there — the slop is clipped to the strip vertically 2026-09-12 21:08:40 +02:00
Duarte Santos 35c810a663 Settings and Library QA: a segmented control that does not fit next to its row title wraps under it instead of painting over it (translated packs at 390px), the today title takes two lines, the Language row shows the whole pack name, swipe-to-delete rows share the card radius (no red corners), Best value does not wrap before its unit, FitNotes' stock bench-press name matches on import 2026-09-12 13:41:13 +02:00
Duarte Santos 33be28b8e6 Workout QA: the per-side set number is a real button again, a unilateral set's volume is each side's weight × reps, timed and cardio sets from older data read as time again, finish summary tiles stay 2×2 in the dialog on desktop, exercise names in menu titles and toasts are capitalised (Kg no longer is) 2026-09-12 13:37:59 +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
Duarte Santos e7a63a593f Changelog: the 2026-09-12 bug round (sync revisions, push catch-up and self-healing subscriptions, chip rows, safe-area sheets, tab bar, Astra findings, locales) 2026-09-12 13:26:59 +02:00
Duarte Santos c2adb17511 Locales: the seven UI strings that landed with combine routines, the layout switch and the 1RM deload were in no pack (they showed in English in every language); pt-BR guard 635/639 2026-09-12 13:26:59 +02:00
Duarte Santos 477fc07f8b Push: reminders owed within 15 minutes still arrive, the subscription heals itself on every boot, rest-timer alerts belong to the device that started the rest
- reminder tick: a due reminder is sent for up to 15 minutes after its time (once per local
  date) instead of only on the exact minute — a restart across that minute used to lose the day;
  state files are stat'ed and re-read only when they changed
- sendPush prunes 403 (stale VAPID key) like 404/410; optional device targeting
- POST /api/push/subscribe is an upsert that keeps created and stores a deviceId;
  GET /api/push/status says whether the server holds an endpoint
- rest timers keyed per user+device; cancel without a device id keeps the old account-wide
  behaviour
- sw.js: payload parsed inside waitUntil (never a silent push), pushsubscriptionchange
  re-subscribes and registers the new endpoint
- lib/push.js: syncPushSubscription() (called once per signed-in boot from App.jsx and when
  Settings opens) re-registers a lost row, replaces a subscription made against another key,
  pushSupported() is false off https; deviceId() per browser
- Settings: the notifications switch shows what the server holds
- tests: server-reminder (window, dedupe, trained day), server-push-status (upsert, status,
  per-device timers), lib/push.test.js
2026-09-12 13:18:29 +02:00
Duarte Santos c92cfc372a sync: pushes are conditional on the revision this device last saw and a refused push merges both copies (lib/sync-merge.js — no workout, routine or weigh-in is dropped, the newer copy decides settings); the store pulls when the tab, window, app or network comes back, one push and one pull at a time, and nothing pushes before boot has pulled 2026-09-12 13:15:48 +02:00