Repository navigation
feat: apply equipment swaps to a specific workout entry - #79
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
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.
Adds
EquipmentSwapManager.applySwap(workout:workoutExerciseId:newExercise:)so callers can replace one occurrence of a repeated exercise using its workout entry ID. The replacement preserves entry identity, sets, notes and all other workout data; the existing exercise-ID API keeps its first-match behaviour.Completes the entry-specific swap application slice. Part of #5. Closes #78.
Verified locally with the repository gates.
mise run lintpassed with 491 existing warnings and zero serious violations.mise run buildpassed.mise run testpassed all 23 pipeline checks, 169 XCTest tests and 79 Swift Testing tests. The seven new test functions are listed in the transcript below; the missing-entry test covers empty and populated workouts.git diff --checkpassed.mise run buildandmise run testpassed on Linux in the SwiftPM job.mise run lintandmise run ios:build:cipassed in the iOS build job.mise run ios:coveragepassed all 27 XCUITests in the UI coverage job.mise run ios:e2epassed with one flaky test and three passed in the mobile e2e job. The first active-workout test failed its initial foreground check and passed on its internal retry. This existing issue remains tracked in Stabilise first app launch in mobile e2e on CI #62.Unit test capture succeeded. This excerpt from
.tmp/proof/issue-78-test.logshows selecting the second occurrence of a repeated exercise without changing workout data, targeting by identity after reordering, applying another replacement to the same entry, rejecting missing or incorrect IDs without mutation, and retaining compatibility with the existing API. Terminal glyphs were removed.The CI UI coverage job and retained result bundle show the host app still runs its existing flows.
The mobile e2e log and retained report retain the initial foreground readiness failure and successful retry. No app or e2e files changed in this slice.
No app UI or user-facing app behaviour changed. Simulator screenshots and local UI tests were not required; no capture method was blocked. The first lint attempt stopped at mise's trust check for the new worktree; after
mise trust, the lint command passed. Scratch captures are not committed.App wiring, entry-aware suggestion result types, movement equivalence and load adjustment remain follow-up slices. Both application APIs accept the caller's selected replacement without validating equipment availability or muscle matching. Sets and loads remain unchanged. Parent #5 remains open.