Repository navigation
Consolidate the routine creation flow - #88
Merged
Merged
Conversation
Save schedules to the routine draft
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.
Why this PR exists
Earlier routine-creation work was split across stacked feature branches. Several PRs were merged into their parent feature branches instead of directly into main, so main did not contain the complete routine flow. This made local branch switching confusing and caused later work to appear to lose schedule and folder-organization changes.
This PR creates one long-lived routine-creation branch based on the latest main and brings the previously stacked work together. Future routine-creation changes will continue on this branch and in this PR.
Included changes
Exercise-name regression
The draft schema previously used a Zod transform to remove each exercise name. Because RHF runs its resolver while the user edits, that transform could remove the name before the routine page rendered it. The draft schema now preserves the name throughout editing. When the final Save Routine API request is implemented, its mapper will remove this UI-only field at the API boundary and validate the resulting payload with the shared create-routine contract.
The configuration test now follows the real workflow: it starts on the routine editor, enters a valid routine name, opens the picker, selects an exercise, completes configuration, and confirms that the exercise name appears in the routine list.
Verification