Repository navigation
fix(plates): a load-kind pick made from exercise detail is stored - #354
Merged
DuarteSantos8 merged 1 commit intoOct 7, 2026
Merged
Conversation
Exercise detail opens the plate-loading editor without a routine config, so the editor's default comes from the equipment alone. For a body-weight exercise that is "Single stack". A routine that logs the total instead (bodyweight: false) derives "Off" for its set rows, which then show no plate line. Tapping the lit "Single stack" to fix that stored nothing: the pick matched the config-less default, so the key went back to the equipment's, and the segment and the rows kept disagreeing. For body-weight equipment without a config, the editor now checks both readings of the flag and stores the pick unless it is the default under both. Everything else keeps the old rule. A dumbbell's config-less "Off" is what a dumbbell row derives, so storing it would pin "Off" onto the exercise everywhere and override the "Single stack" an added-weight entry derives. A barbell is "Per side" either way and still stores nothing for it. With a config nothing changes. Two new tests in sheets.plates.test.jsx (now 10). The body-weight one fails against the old sheets.jsx. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
|
Merged and released in v1.3.10, thanks @kurktchiev! https://github.com/DuarteSantos8/openGym/releases/tag/v1.3.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exercise detail opens the plate-loading editor with no routine config, so the editor's default
comes from the equipment alone. For a body-weight exercise that is "Single stack". A routine that
logs the total instead (
bodyweight: false) derives "Off" for its set rows, and they show no plateline. Tapping the lit "Single stack" to fix that stored nothing:
setKindcompared the pick withloadKindFor(null, ctx), got a match, and wrote the stamped null that means "back on theequipment's". The segment and the rows kept disagreeing, and no tap could settle it.
For body-weight equipment with no config,
BarWeightEditornow asksloadKindForfor bothreadings of the flag and stores the pick unless it is the default under both. Everything else
keeps the old rule:
the exercise everywhere and override the "Single stack" an added-weight entry derives.
Two new tests in sheets.plates.test.jsx, which now has 10, all passing. The body-weight one fails
against the old sheets.jsx; the dumbbell one pins that nothing changes there. No strings change;
check-locales.mjs and check-source-strings.mjs pass.
Overlap: #312 rewrites
BarWeightEditor. Its diff drops the load-kind segment andsetKindaltogether, so if it merges first this change has nothing to apply to.
🤖 Generated with Claude Code