Skip to content

Phase 4: workout detail (edit/delete past workouts) and History month calendar - #20

Merged
prithvimk merged 2 commits into
mainfrom
claude/quirky-lamport-466uk5
Oct 31, 2026
Merged

prithvimk merged 2 commits into
mainfrom
claude/quirky-lamport-466uk5

Conversation

@prithvimk

Copy link
Copy Markdown
Owner

Finishes Phase 4 with its last two checklist items, one commit each.

Workout detail screen; edit or delete a past workout

  • Tapping a History card opens history/{workoutId}: date, duration · sets · volume, the records the workout set, its notes, and each exercise's done sets with PR badges (plus "N sets not done" where some were left unticked).
  • Edit switches to the logger's own editor (keypad, set types, add/remove/reorder exercises, notes). "Last" comes from the session before this one (new getSetsBefore query), and rest times are hidden. Edits save as they're made and recompute that exercise's records from its whole history, as the logger already does.
  • Delete asks first, then the screen closes; records the workout held pass back to the sets they beat.
  • A set ticked in a finished workout gets completedAt = the workout's end instead of now, so any record it sets is dated to that session.
  • The logger's editing logic (keypad, exercise picker, remove confirmation, set/exercise/note edits) moves from WorkoutViewModel into SessionEditor, shared by both screens; ActiveContent is split into a reusable SessionEditorContent with header/footer slots. No behaviour change intended in the logger.

Month calendar with trained days highlighted

  • History gets a List / Calendar switch. The calendar follows the locale's first day of the week; trained days are filled, today is ringed, and the arrows move between months up to the current one.
  • Below it, the month's workouts and totals; tapping a trained day narrows the list to that day (tap again to clear). Cards open the workout detail.

Not included

  • Editing a past workout's start/end time.
  • Opening an exercise's own screen from the workout detail (it would switch the bottom bar to Exercises over History's back stack).

Testing

  • ./gradlew testDebugUnitTest ktlintCheck lintDebug assembleDebug passes locally (193 unit tests; lint has no new warnings).
  • New tests: ticking a set in a finished workout, editing a past set recomputing later records, setsBefore, observeWorkout after delete, doneExercises, and the calendar grid / by-day grouping / month bounds.
  • Screens checked with local Roborazzi renders (not committed): workout detail view and edit, the active logger after the refactor, History list, calendar and a picked day.

Generated by Claude Code

Tapping a workout in History opens its detail: date, duration, sets and
volume, the records it set, its notes, and each exercise's done sets with
PR badges. Edit switches to the logger's own editor (keypad, set types,
add/remove/reorder exercises, notes) with "Last" taken from the session
before this one; Delete asks first. Every edit recomputes the exercise's
records from its whole history, as in the logger.

The logger's editing logic moves into SessionEditor, shared by both
screens. A set ticked in a finished workout is stamped with the workout's
end rather than now, so records it sets are dated to that session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014thT5GHaDc9HDRJE9PD2G3
History gets a List / Calendar switch. The calendar shows a month in the
locale's week order, with days that have a finished workout filled in and
today ringed; arrows move between months up to the current one. Below it,
the month's workouts are listed with their totals, and tapping a trained
day narrows the list to that day. The cards open the workout detail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014thT5GHaDc9HDRJE9PD2G3
@prithvimk
prithvimk merged commit eff7759 into main Oct 31, 2026
2 checks passed
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.

2 participants