Repository navigation
Full parity between built-in and custom exercises - #259
Open
giulioleuci wants to merge 1 commit into
Open
giulioleuci wants to merge 1 commit into
giulioleuci wants to merge 1 commit into
Conversation
Contributor
Author
|
Implement #199 |
1 task done
giulioleuci
force-pushed
the
feat/parity-exercises-issue-199
branch
from
September 28, 2026 13:02
16bd9c3 to
d5d1a58
Compare
Owner
|
Thanks @giulioleuci. v1.3.9 took one part of this area: custom exercises can carry a photo, GIF or short video and a link, kept on the server and the device, outside the synced data. The override/hide model for built-in exercises ( When you get back to it, please rebase onto v1.3.9, reuse the new media store for custom media, and leave out the |
…8#199) Built-in exercises become user-overridable and hideable without copying the 1,324-entry catalogue into user state; custom exercises gain the structured fields built-ins already had (steps, media). Both kinds now share one editor and one safe hide/delete flow. How: - lib/exercises.js: a central resolver (effectiveCatalogue/isHidden/ allows/registerExerciseState) overlays two new state fields, exOverrides and deletedEx, onto the pristine CATALOGUE/EXDB, which are never mutated. Every listing surface (library, pickers, search) resolves through this one place, so a hide or edit shows up everywhere at once. Search now indexes exercise steps; imgSrc/gifSrc pass through absolute URLs for custom media. - sheets.jsx: the existing CustomExForm now edits either a custom exercise or a built-in override — same fields for both (name, body part, equipment, primary/secondary muscles, description, steps, media), with a per-field "reset to default" control shown only where a built-in's value has actually been overridden. Saving a built-in diffs against its catalogue row and persists only the touched fields, dropping the override entirely once it matches the catalogue again. deleteCustomEx now branches into Delete (customs, permanent) or Hide (built-ins, reversible via deletedEx), sharing the active-workout guard and routine/history cleanup. - views/Settings.jsx: a "Manage hidden exercises" screen lists every hidden built-in with per-item Restore and Restore all. - Fixed along the way: exOr and EXIDX now keep a hidden built-in resolvable by id (by name, with any override applied) so historical workouts, recovery, muscle balance and stats keep rendering it correctly instead of falling back to a raw id or placeholder; i18n instruction/name packs no longer silently shadow a user's override for non-English languages; the catalogue's own duplicate names no longer block editing a built-in whose name is untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8rGFygKVhbat2PyfGR53v
giulioleuci
force-pushed
the
feat/parity-exercises-issue-199
branch
from
October 4, 2026 10:55
d5d1a58 to
e7b0199
Compare
This branch has not been deployed
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.
Summary
Closes #199.
Built-in exercises become user-overridable and hideable without copying the 1,324-entry catalogue into user state; custom exercises gain the structured fields built-ins already had (steps, media). Both kinds now share one editor and one safe hide/delete flow.
lib/exercises.js): two new state fields,exOverridesanddeletedEx, overlay onto the pristineCATALOGUE/EXDB, which are never mutated. Every listing surface (library, pickers, search) resolves through this one place, so an edit or hide shows up everywhere at once. Search now indexes exercise steps;imgSrc/gifSrcpass through absolute URLs for custom media.sheets.jsx): the existing custom-exercise form now edits either a custom exercise or a built-in override — identical fields for both (name, body part, equipment, primary/secondary muscles, description, steps, media), plus a per-field "reset to default" control shown only where a built-in's value has actually been overridden. Saving a built-in diffs against its catalogue row and persists only the touched fields, dropping the override entirely once it matches the catalogue again. Delete/Hide share the active-workout guard and routine/history cleanup — customs delete permanently, built-ins hide reversibly viadeletedEx.Test plan
cd frontend && npm test— 107 files / 1486 tests passingcd frontend && npm run build— clean production build🤖 Generated with Claude Code