Allow creating new exercises while configuring mesocycle#85
Draft
Allow creating new exercises while configuring mesocycle#85
Conversation
5 tasks
- Add onCreateExercise prop to ExerciseSelector for inline exercise creation - Show "Create New Exercise" button at top of exercise list in selector - Render ExerciseForm via portal to avoid nested form issues - Add stopPropagation to ExerciseForm submit to prevent portal event bubbling - Update SplitDayEditor to wire createExercise from db/service - Handle newly created exercises that haven't propagated via useLiveQuery - Add CSS styling for the create exercise button Agent-Logs-Url: https://github.com/wulfland/Repstack/sessions/5e8d8917-f175-485e-afd4-d1a6431ea934 Co-authored-by: wulfland <5276337+wulfland@users.noreply.github.com>
Agent-Logs-Url: https://github.com/wulfland/Repstack/sessions/5e8d8917-f175-485e-afd4-d1a6431ea934 Co-authored-by: wulfland <5276337+wulfland@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add option to create new exercises during mesocycle configuration
Allow creating new exercises while configuring mesocycle
Apr 7, 2026
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.
Users had to leave the mesocycle configuration flow to create exercises not yet in their library. This adds inline exercise creation directly from the exercise selector.
Changes
onCreateExerciseprop. When provided, renders a "Create New Exercise" button at the top of the exercise list. ExerciseForm is rendered viacreatePortaltodocument.bodyto avoid nested<form>elements inside MesocycleForm.createExercisefrom db/service into ExerciseSelector. RelaxedhandleAddExerciseguard to handle exercises not yet propagated throughuseLiveQuery.e.stopPropagation()on submit — React portal events bubble through the React component tree (not DOM tree), which was triggering the parent MesocycleForm submission..exercise-form-portalclass (z-index 1200, above ExerciseSelector's 1100).Flow
The
onCreateExerciseprop is optional, so existing ExerciseSelector usage (e.g. workout logging) is unaffected.