827 Commits
Author SHA1 Message Date
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
Boris 'B' KurktchievandClaude Opus 5 df50287eac home: a door to the Start screen when a plan already owns today
On a day with a routine there is no way to start a freestyle session, or to pick
one of your other routines. The Start button in the tab bar and Home's today row
both go into today's planned session the moment there is one, and only fall
through to the Start screen when nothing at all is planned. So the screen that
holds "Freestyle workout (pick as you go)" and "Other routines" is reachable on
rest days only.

There was one other way in — "Choose a different workout" on the weigh-in sheet
— and it does not exist when the weigh-in is switched off (Settings → During a
workout). With a routine on every weekday and that switch off, the Start screen
cannot be reached at all.

So Home carries that door: under the today row, hidden while a session is
running (that screen resumes one, it does not choose), and it starts nothing by
itself. It reuses the weigh-in sheet's own string, so no locale pack moves.

The one-tap start is untouched: the row above it and the tab bar's button both
still go straight into today's session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 16:57:47 -04:00
Strazdonis 23cbb8d429 accessibility: typable weight input 2026-09-16 21:46:00 +02:00
ncbachh 3a372b5744 workout: allow renaming workout title from header menu
Add Rename workout option to the header 3-dot menu during an active workout session. Opens a bottom sheet modal with an auto-focused text field, disabled Save button when empty, and Enter key submission. Preserves custom titles when another routine is added to the session.
2026-09-16 22:23:09 +07:00
Aaron Rai 298231a41c Heatmap: follow the profile's week-start setting
The GitHub-style activity heatmap hardcoded Monday-first weeks — both the
column anchoring and the Mon/Wed/Fri row labels — while every other "this
week" surface (Plan, streaks, muscle balance, effort chart) already reads
S.weekStart. Anchor the grid with weekDayOffset() and derive the row labels
from it too, so a Sunday-first profile gets a Sunday-first grid.
2026-09-15 15:44:42 -07:00
Space-Hermes 1a763b3e81 fix: preserve weight units when sharing and importing plans 2026-09-15 06:55:49 +02:00
Space-Hermes 736d743043 test: use the local calendar date for Coach daily cap 2026-09-15 00:19:24 +02:00
Space-Hermes a1b2d31e04 fix: classify audited Olympic lift families across primary muscles 2026-09-15 00:17:11 +02:00
Space-Hermes 8b75ae9b30 fix: tolerate minor typos in longer exercise search words 2026-09-15 00:14:32 +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
Mirko Köster 530c1bbe55 i18n(de): use standard ß, not Swiss ss
The German locale spelled the same word both ways: 'Glutes' was Gesäß while
'glutes' was Gesäss, ausschließen sat beside abschliessen, and großen beside
Gross. Eight values are normalised to standard German ß — the schließen forms,
Gesäß, Füße, Vergrößern, Groß — which is also what DATE_LOCALES already
declares by mapping de to de-DE.

The 59 legitimate ss words (Schlüssel, Arbeitssätze, Latissimus, Multipresse…)
are unchanged, and no code outside locales/ references any of these strings.
2026-09-13 11:27:16 +02:00
Boris KurktchievandClaude Fable 5.1 7abada3bfc docs: behind an auth proxy, let the icons and the manifest through without a login
iOS fetches the Home Screen icon outside the page, without the session cookie
(observed on iOS 26.6 behind Teleport: the page and the manifest reach nginx,
the icon request never does, iOS draws a letter tile). The manifest attribute
in the previous commit covers the manifest fetch; the icon fetch is the proxy's
to exempt. Names the knob for Authelia, Authentik, Cloudflare Access and
oauth2-proxy, and says what a proxy without path exemptions has to do instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-12 20:02:43 -04:00
Boris Kurktchiev e77be0ac3f web: an unknown path redirects to the root instead of serving a shell that cannot load
The app routes behind the hash (/#/plan, /#/history …), so a path is never a
screen, and the shell's asset URLs are relative (vite base './' — the Pages demo
lives under /demo/). nginx's SPA fallback served index.html AT the requested
path: for /plan/r/x (a typo, a stale link, anything not a file) the page's
scripts resolved to /plan/r/assets/… and 404'd — a blank page with a 200.

try_files now ends in a named location that answers 302 / (query string kept;
the hash never reaches the server). absolute_redirect off keeps the Location
relative, so the redirect stays on whatever scheme and host the reverse proxy
in front presented instead of nginx's own http://host:80. Files, directories,
/api/ and the regex locations are untouched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit e49f1326e2c2c63c6688dfe85fc3e4bdd444231f)
2026-09-12 19:39:13 -04:00
Boris Kurktchiev 46988c3bfc fix: fetch the manifest with cookies (crossorigin=use-credentials) so the Home Screen icon survives an auth proxy
Browsers request the web app manifest without credentials, even from the same
origin — the spec's default; Safari follows it, Chromium sends cookies anyway.
Behind a login proxy (Authelia, Cloudflare Access, Teleport…) that request gets
the proxy's redirect instead of manifest.json. iOS 26 picks the Home Screen icon
from the manifest ("If you define your icons in the manifest, they're used"), so
Add to Home Screen ends with the generic icon.

crossorigin="use-credentials" is the attribute the spec provides for this; MDN
documents it for exactly this case, Home Assistant and GitLab ship it. No effect
on a deployment without a proxy: same origin, same file.

Verified: `npm run build` keeps the attribute in dist/index.html; frontend suite
109 files / 1613 tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 8b82a5d2571c79c92c08f03f17d16cd0c445d70b)
2026-09-12 19:13:39 -04: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) v1.3.7 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 v1.3.6 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