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
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.
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.
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äß".
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".
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.
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.
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.
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.
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.
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.
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".
"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".
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).
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>
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.
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.
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.
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)