Commit Graph
769 Commits
Author SHA1 Message Date
mflova 090f615e8b fix: reschedule native workout reminders by date 2026-08-29 14:32:22 +00:00
Suthep ce0e5d4aef Fill in th.js missing keys and fix a mismatched key
- check-locales.mjs was failing: th.js had 628/741 keys. One key
  ('...rest after both') didn't match the source string used in code
  ('...rest when done'), and 112 keys were missing outright — most of
  them the whole tail block (equipment profiles, mobile-app pairing,
  session notes) that never made it into th.js.
- Renamed the mismatched key and added Thai translations for the 112
  missing keys, preserving {n} placeholders and section comments to
  match the other locale files.
- Workout.remove.test.jsx hardcoded 12 locale packs; bumped to 13 now
  that th.js is a complete pack.

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

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

No new strings — reuses the existing 'Cancel' key already translated
in all locales.
2026-08-27 09:03:02 -06:00
Space_Hermes 85ecf3563e feat(workout): swipe between active units 2026-08-27 16:50:59 +02:00
Space_Hermes 5770f3bc04 feat(routines): add long-press reorder 2026-08-27 16:46:25 +02:00
Space_Hermes d5e40db774 feat(workout): add active unit move controls 2026-08-27 12:32:52 +02:00
Space_Hermes cf1e99ac95 feat(workout): safely swap active exercise 2026-08-27 12:07:21 +02:00
Space_Hermes b7631dc9a0 fix(workout): skip rest before warmups 2026-08-27 11:52:02 +02:00
TheophileDiot 19a8be2c38 MCP: warm-ups do not become personal records 2026-08-27 10:07:26 +02:00
Space_Hermes 82f0b84766 fix(workout): continue after added exercise 2026-08-27 09:15:40 +02:00
TheophileDiot 5c93a7d8a1 MCP: the read tools resolve customs, prog policies and rep ranges 2026-08-26 16:57:21 +02:00
Alexby 0b4a224c95 workout: optional per-exercise rest for normal sets
An exercise can now carry its own restSec: the workout timer prefers it
over the global default, a superset rests the longest resolved rest in
the group after each round, and the field travels with shared plans —
normalised on import like every other prescribed number. An explicit
restSec still times its rest when the global timer is turned off; only
the default is silenced. Closes #10.
2026-08-26 16:03:27 +02:00
Moksh 8165e41d8d Fix lrow value overflow 2026-08-26 19:21:16 +05:30
tkyouw 26579e4261 feat: isolate planned deloads from progression 2026-08-26 09:54:24 +02:00
mzspicoli 1aef1d882b feat(timer): add opt-in visual completion flash 2026-08-26 07:28:01 +02:00
doby-llm 4422e4c387 fix(ui): keep picker results above mobile keyboard 2026-08-26 06:39:23 +02:00
doby-llm 40df469fd6 fix(stats): harden historical exercise search fallback 2026-08-26 06:39:23 +02:00
doby-llm 283d897762 feat: add Stats exercise progress picker search 2026-08-26 06:39:23 +02:00
Duarte Santos 5314b342ff website: the feature cards just hold their text now
The dialog is gone. It showed the same paragraph that was already on the card,
only unclamped — so a click bought you nothing, which is a bad trade for making
fourteen cards look like something you have to interact with. The cards are
plain <article>s now and the text is simply on them, no line clamp.

What is left of the click: four cards point into the docs — importing,
self-hosting, the MCP server, backups — where there genuinely is more to read.
Those are ordinary links at the foot of their card rather than a click target
covering the whole box.

Cards are a little wider (250-310px) to carry the full text without turning into
columns of two words, and the rail still snaps and scrolls the same way.

Verified in the browser at 1440 and 390: fourteen cards, no dialog left in the
DOM, no buttons inside the rail, all four docs links present, nothing clipped
(every .fcard-b has scrollHeight == clientHeight), every card the same height,
still flush with the text above, no horizontal overflow, no JS errors.
2026-08-25 22:56:39 +02:00
Duarte Santos 1290db11b5 website: fix the dialog, align the rail, and add a first-visit intro
Tested in a real browser this time, at 1440, 1024, 390 and 360, with touch
emulation and with reduced motion — which is how the first three of these were
found, and none of them were visible from reading the markup.

**The dialog never opened where you could see it.** `* { margin: 0 }` at the top
of this file removes the margin:auto a browser uses to centre a modal <dialog>,
and without a position of its own it resolved to `position: absolute`, so
`inset: 0` centred it inside the document rather than the viewport — near the top
of the page. Opening a card scrolled the whole page up to meet it, showed a
clipped corner on desktop and nothing at all on a phone. It is pinned to the
viewport now, centred on both axes, capped at the screen height and scrollable
inside if the text is long. Measured: centred and fully in frame at all four
sizes, with no scroll jump.

**The rail sat 34px left of everything above it.** Its gutter was half the
leftover width, which lands on the wrap's outer edge, not on the text inside it —
the wrap's own padding was missing from the sum. Cards now line up exactly with
the paragraph above them (measured: 0px). Using 100% instead of 100vw also keeps
the scrollbar out of the arithmetic. The screenshot rail below inherits the same
fix.

**The intro.** The hero settles in on the first load of a visit: a short rise and
fade, staggered eyebrow to headline to lead to buttons to phone. Deliberately the
same movement as the scroll reveals further down, so it reads as one behaviour
rather than an effect. Armed in the inline head script, because site.js is
deferred and would have let the hero paint and then hide it again. Once per tab,
so a reload is not a splash screen. Off entirely for prefers-reduced-motion, and
the animation ends on opacity 1 regardless of whether the cleanup ever runs — the
hero cannot get stuck invisible.

No horizontal overflow at any of the four widths. Arrows confirmed present for a
mouse and absent for touch.
2026-08-25 22:50:28 +02:00
Duarte Santos 57ab683bf6 website: turn the long feature list into a rail, and un-squish the text pages
**"And the rest of it"** was fourteen items as a two-column definition list — the
part of the page nobody finishes reading. It is now a horizontal rail of cards,
one icon each, tapping one opens the full paragraph in a dialog. Four of them
carry a link into the docs, where there is genuinely more to say: importing,
self-hosting, the MCP server and backups. Twelve new icons in the existing
sprite style (24x24, stroke 1.7) to go with it.

The dialog only ever shows text that is already in the card, so nothing is
hidden from a reader without JS: the cards are unclamped and fully readable, the
arrows stay hidden, and there is nothing to open. Arrows are for pointers that
cannot swipe and are dropped on touch.

**The docs and about pages were squished on a phone**, and it was one character:
`.prose` set `padding: <top> 0 0`, and the trailing zeros overwrote the left and
right padding `.wrap` had already set. On a desktop nothing showed, because 720px
of text has room to spare either way; on a phone the text ran into both edges of
the screen. Both pages share that class, which is why both looked wrong.

Two traps in the CSS I added and then found: `.frail-nav` and `.fdlg-go` both set
`display`, which beats the UA's `[hidden] { display: none }`. The arrows would
have shown without JS, and a card with no link would have shown a "read more"
pointing at whatever the previous card linked to. Both now honour the attribute.

Cache busters go to v=6 — the markup needs the new CSS and JS, and a returning
visitor holding v=5 would have got the new page with the old stylesheet.
2026-08-25 22:39:04 +02:00
Duarte Santos 3c985babea website: APK size line matches the 1.2.11 build (4.4 MB, was 4.3) 2026-08-25 22:17:55 +02:00
Duarte Santos bc3ac09c77 release: v1.2.11
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.
v1.2.11
2026-08-25 22:08:15 +02:00
Duarte Santos af4de8b8ff website: the relaunched landing page
This has been serving on opengym.duarte-santos.ch for a while without ever being
committed, so the repository and the live site had drifted apart — a deploy from
a clean checkout would have rolled the site back to the old page. This commits
what is actually running.

The page is rebuilt around a bento layout with real device frames, a mobile nav
that opens a proper menu instead of hiding the links, and a scroll reveal that
checks prefers-reduced-motion before animating anything. New "Elsewhere" section
collecting where the project actually lives: GitLab for code, issues and
releases, Discord, and Buy Me a Coffee.

The download line still reads v1.2.9 and the APK next to it is still the 1.2.9
build; both are corrected in the release commit, where the new APK exists.
2026-08-25 22:07:04 +02:00
Duarte Santos 9bec4bb785 settings: show the version, and let the rest timer be turned off
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.
2026-08-25 22:05:07 +02:00
Duarte Santos fa879a8b40 stats: keep the e1RM chart's points stable, and note where stackedValue stops
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.
2026-08-25 22:02:32 +02:00
Duarte Santos 651b03cbd1 Merge merge request !25 (clear stale chart hover state) 2026-08-25 22:00:46 +02:00
Duarte Santos b0b9e9350f Merge merge request !24 (stack the Stats exercise selector value) 2026-08-25 21:59:51 +02:00
Duarte Santos ac66d90a3e plan sharing: send the intensifier too, and clamp what arrives
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.
2026-08-25 21:57:20 +02:00
Duarte Santos 3d30edddad notes: make the session note real, and stop losing it
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.
2026-08-25 21:55:22 +02:00
Duarte Santos 287550df6c warm-ups: keep them out of volume, and make the ramp follow the weight
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.
2026-08-25 21:50:50 +02:00
doby-llm 0a69ee8450 Merge upstream main into fix/clear-line-chart-hover 2026-08-25 21:29:54 +02:00