Repository navigation
feat: add entry-aware catalogue swap suggestions - #82
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
This was referenced Nov 15, 2026
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
WorkoutSwapSuggestionandEquipmentSwapManager.suggestEntrySwaps(for:from:)so catalogue suggestions carry the workout entry ID. Callers can select the second occurrence of a repeated exercise and apply its suggested alternative to that same entry, including after reordering; the existing tuple API shares the selection path and keeps its behaviour.Completes the entry-aware catalogue suggestion slice. Part of #5. Closes #81.
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 86 Swift Testing tests. The seven new tests are listed below.git diff --checkpassed.mise run buildandmise run testpassed on Linux in the SwiftPM job, including all 169 XCTest tests and 86 Swift Testing tests.mise run lintandmise run ios:build:cipassed in the iOS build job.mise run ios:e2epassed with two flaky tests and two passed in the mobile e2e job. The first workout launch failed its foreground check, and skip rest lost its WebSocket connection. Both passed on internal retry Implement BetterFit iOS strength training coach core framework #1; the failures remain tracked in Stabilise first app launch in mobile e2e on CI #62.mise run ios:coveragefailed duringProfileJourneyUITests.testAchievementsSectionVisiblesetup because XCUITest could not terminate the previous app process. The other 26 tests passed. The initial job log and retained result bundle preserve this failure. The first isolated rerun passed that test but failedAdjustSetsUITests.testExerciseDetailShowsSetControlsbecause the detail sheet did not open after tapping the focus exercise. It again passed 26 of 27 tests. The rerun result bundle preserves the Plan hierarchy at failure. Both UI reliability failures are tracked in Stabilise XCUITest app lifecycle and first exercise sheet readiness on CI #83. The final isolated UI coverage run passed all 27 tests on the unchanged commit. All PR checks are now green.Proof
Unit test capture succeeded. This transcript from
.tmp/proof/issue-81-test.logshows distinct suggestions for repeated entries, workout and catalogue ordering, omitted ineligible entries, empty inputs, availability changes, unchanged legacy suggestions, and applying a suggestion to the same entry after reordering. The second-entry application test checks full workout equality after changing only the selected exercise, including preserved sets, notes and metadata. Terminal glyphs were removed.The mobile e2e report retains the failed initial attempts and successful retries on the unchanged commit.
Both failed UI attempts are retained above. The initial failure was in app launch setup; the first rerun remained on Plan after a tap instead of opening the exercise sheet. Each failed test passed in the other attempt.
The final UI result bundle shows the full existing app suite passing on the same commit after those two failed attempts.
No app UI or user-facing app behaviour changed. Simulator screenshots and local UI tests were not required, and no capture method was blocked. Scratch captures are not committed.
Suggestions are snapshots. Callers should regenerate them after editing a workout or changing available equipment. Swap application still accepts the caller's selected exercise without revalidating equipment or muscle matching. App wiring, movement equivalence and load adjustment remain follow-up slices. Parent #5 remains open. CI UI reliability remains a follow-up in #83, separate from the mobilewright failures in #62.