Skip to content

fix(plates): a load-kind pick made from exercise detail is stored - #354

Merged
DuarteSantos8 merged 1 commit into
DuarteSantos8:mainfrom
kurktchiev:gh/plate-pick-no-config
Oct 7, 2026
Merged

DuarteSantos8 merged 1 commit into
DuarteSantos8:mainfrom
kurktchiev:gh/plate-pick-no-config

Conversation

@kurktchiev

Copy link
Copy Markdown
Contributor

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 plate
line. Tapping the lit "Single stack" to fix that stored nothing: setKind compared the pick with
loadKindFor(null, ctx), got a match, and wrote the stamped null that means "back on the
equipment's". The segment and the rows kept disagreeing, and no tap could settle it.

For body-weight equipment with no config, BarWeightEditor now asks loadKindFor for 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. 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, as the existing test pins.
  • With a config (exercise config, the mid-workout sheet) nothing changes.

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 and setKind
altogether, so if it merges first this change has nothing to apply to.

🤖 Generated with Claude Code

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>
@DuarteSantos8
DuarteSantos8 merged commit c5dcaff into DuarteSantos8:main Oct 7, 2026
3 of 4 checks passed
@DuarteSantos8

Copy link
Copy Markdown
Owner

Merged and released in v1.3.10, thanks @kurktchiev!

https://github.com/DuarteSantos8/openGym/releases/tag/v1.3.10

@kurktchiev
kurktchiev deleted the gh/plate-pick-no-config branch October 9, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants