Skip to content

Edit custom exercise names - #93

Merged
rd-code-23 merged 1 commit into
mainfrom
feat/custom-exercise-frontend
Sep 13, 2026
Merged

rd-code-23 merged 1 commit into
mainfrom
feat/custom-exercise-frontend

Conversation

@rd-code-23

Copy link
Copy Markdown
Owner

Summary

  • allow users to rename custom exercises from the Configure Exercise page
  • keep the user on Configure Exercise after saving the new name
  • add an authenticated, ownership-protected PATCH endpoint
  • update the TanStack Query cache after a successful rename
  • remove duplicated exercise names from the RHF routine draft
  • derive names reactively from the existing exercise cache without fetching from the routine editor

State ownership

TanStack Query owns server-derived exercise names. React Hook Form stores only the exercise reference and routine-specific configuration. The routine editor observes existing cached exercise data with an explicitly disabled query, so cache updates remain reactive without initiating exercise API requests.

Security

The update operation matches both the exercise ID and authenticated owner ID. Built-in exercises and exercises owned by another user cannot be renamed.

Verification

  • contract tests pass
  • API tests pass
  • web tests pass
  • API and web typechecks pass
  • API and web lint pass

@rd-code-23
rd-code-23 merged commit 3039b5b into main Sep 13, 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