Skip to content

Apply equipment swaps to a specific workout entry #78

Closed

Description

@johnnyhuy

Part of #5. Continues the catalogue swap work merged in #73 and #76.

Add an EquipmentSwapManager.applySwap(workout:workoutExerciseId:newExercise:) overload that selects a WorkoutExercise.id, so a caller can replace the second occurrence of a repeated exercise without touching the first.

  • Replace only the selected entry's exercise while preserving its ID, sets and notes and all workout metadata.
  • Return false without mutation when the workout entry is missing, including an empty workout.
  • Keep the existing exercise-ID overload and its first-match behaviour compatible.
  • Cover repeated entries, missing IDs, metadata preservation and both APIs with unit tests, and document the distinction in the API reference.

This slice changes core package behaviour only. App UI, suggestion result types, movement equivalence and load adjustment remain follow-up work. Leave parent #5 open.

Activity

  1. johnnyhuy commented on Nov 14, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-78-entry-equipment-swap @ 0287167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentclaimed by the BetterFit work loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions