Skip to content

Consolidate the routine creation flow - #88

Merged
rd-code-23 merged 9 commits into
mainfrom
feature/routine-creation
Sep 4, 2026
Merged

rd-code-23 merged 9 commits into
mainfrom
feature/routine-creation

Conversation

@rd-code-23

Copy link
Copy Markdown
Owner

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

  • organizes routine code into API, landing, editor, picker, and configuration folders
  • keeps the routine draft form mounted across application navigation
  • adds an explicit Clear action instead of clearing the draft during navigation
  • adds the schedule dialog, weekday selection, per-day times, and shared-time reducer
  • saves optional schedules into the shared RHF routine draft
  • retains the configured exercise list introduced in PR Show configured exercises in routine drafts #87
  • keeps exercise names as UI-only draft data so the routine editor can display them without fetching the exercise catalog again

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

  • web typecheck passes
  • all 47 web tests pass
  • web lint passes
  • production build passes

@rd-code-23
rd-code-23 merged commit 399aa03 into main Sep 4, 2026
1 check passed
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.

1 participant