Problem
When browsing the Diary screen after finishing a workout, there is no visual indicator to distinguish completed workout sessions from sessions that were just logged. Users have no way to tell at a glance whether they've already done their workout for the day.
Proposed Solution
Add a small "Done" badge to completed workout session rows in the Diary screen.
Implementation approach (mobile only, no server changes required):
-
src/stores/activeWorkoutStore.ts — Add a completedSessionIds: Record<string, true> field to the persisted state. When clearWorkout() is called and the workout was fully complete (activeSetId === null), record the session ID before resetting all other state. This field survives the clear action and is persisted to AsyncStorage.
-
src/components/SwipeableExerciseRow.tsx — Read completedSessionIds from the store. If the current session's ID is present, render a small green "Done" badge next to the source label. The badge persists across cold starts.
Why this approach:
- No server changes —
ExerciseSessionResponse has no completion flag; tracking is client-side only
- Uses the existing
activeWorkoutStore AsyncStorage persist layer
- The indicator appears after the user taps the ✓ checkmark to dismiss the finished workout
Affected Files
SparkyFitnessMobile/src/stores/activeWorkoutStore.ts
SparkyFitnessMobile/src/components/SwipeableExerciseRow.tsx
Acceptance Criteria
Problem
When browsing the Diary screen after finishing a workout, there is no visual indicator to distinguish completed workout sessions from sessions that were just logged. Users have no way to tell at a glance whether they've already done their workout for the day.
Proposed Solution
Add a small "Done" badge to completed workout session rows in the Diary screen.
Implementation approach (mobile only, no server changes required):
src/stores/activeWorkoutStore.ts— Add acompletedSessionIds: Record<string, true>field to the persisted state. WhenclearWorkout()is called and the workout was fully complete (activeSetId === null), record the session ID before resetting all other state. This field survives the clear action and is persisted to AsyncStorage.src/components/SwipeableExerciseRow.tsx— ReadcompletedSessionIdsfrom the store. If the current session's ID is present, render a small green "Done" badge next to the source label. The badge persists across cold starts.Why this approach:
ExerciseSessionResponsehas no completion flag; tracking is client-side onlyactiveWorkoutStoreAsyncStorage persist layerAffected Files
SparkyFitnessMobile/src/stores/activeWorkoutStore.tsSparkyFitnessMobile/src/components/SwipeableExerciseRow.tsxAcceptance Criteria