Skip to content

feat: add entry-aware catalogue swap suggestions - #82

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-81-entry-aware-suggestions
Nov 15, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-81-entry-aware-suggestions

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds WorkoutSwapSuggestion and EquipmentSwapManager.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.

Proof

Unit test capture succeeded. This transcript from .tmp/proof/issue-81-test.log shows 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.

==> summary: 23 passed, 0 failed
Executed 169 tests, with 0 failures (0 unexpected) in 2.150 (2.167) seconds
Test suggestionStillTargetsSameEntryAfterReordering() passed after 0.010 seconds.
Test appliesSecondRepeatedEntrySuggestionAndPreservesWorkoutData() passed after 0.010 seconds.
Test identifiesRepeatedEntriesWithoutChangingWorkout() passed after 0.009 seconds.
Test tupleSuggestionsRemainCompatibleWithEntrySuggestions() passed after 0.009 seconds.
Test reflectsUpdatedEquipmentAvailability() passed after 0.008 seconds.
Test returnsNoEntrySuggestionsForEmptyInputs() passed after 0.009 seconds.
Test omitsIneligibleEntriesAndPreservesWorkoutAndCatalogueOrder() passed after 0.008 seconds.
Test run with 86 tests in 12 suites passed after 0.028 seconds.

The mobile e2e report retains the failed initial attempts and successful retries on the unchanged commit.

start workout, log a set, rest timer appears
Test timeout of 120000ms exceeded.
Error: app did not come to foreground
start workout, log a set, rest timer appears (retry #1) passed
skip rest dismisses the timer
Error: WebSocket connection closed (code=1006, reason=no reason)
skip rest dismisses the timer (retry #1) passed
2 flaky
2 passed (12.3m)

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.

Initial attempt
ProfileJourneyUITests.testAchievementsSectionVisible
Failed to terminate dev.echohello.BetterFit
Executed 27 tests, with 1 failure

First isolated rerun
AdjustSetsUITests.testExerciseDetailShowsSetControls
XCTAssertTrue failed - Detail sheet should list the sets section
Executed 27 tests, with 1 failure

The final UI result bundle shows the full existing app suite passing on the same commit after those two failed attempts.

Executed 27 tests, with 0 failures (0 unexpected) in 388.662 (388.681) seconds
** TEST SUCCEEDED **

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.

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy merged commit 5baceb3 into main Nov 15, 2026
16 of 18 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-81-entry-aware-suggestions branch November 15, 2026 04:19
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.

Add entry-aware catalogue equipment swap suggestions

1 participant