Skip to content

Phase D4: History, workout and exercise detail, Exercises list, picker - #28

Open
prithvimk wants to merge 4 commits into
mainfrom
ccr-9c916c4d-krazr0
Open

prithvimk wants to merge 4 commits into
mainfrom
ccr-9c916c4d-krazr0

Conversation

@prithvimk

Copy link
Copy Markdown
Owner

Lands Phase D4 (F10–F14, F16) from the design pass. All six D4 items are ticked in docs/IMPLEMENTATION_PLAN.md.

History (F10, F11)

  • Cards: date line with a gold PR chip, the routine name in large type, a row with the timer icon, duration, sets and volume, then the first three exercises and "+N".
  • List / Calendar switch: now an icon beside the title.
  • Calendar: trained days are tinted in three steps by the day's volume (thirds of the month's busiest day). The picked day is filled with primary and today always keeps its ring. A "Less … More volume" key sits under the grid.

Workout detail (F12)

  • Duration, volume and set tiles; Delete moves into the ⋮ menu.
  • An exercise with nothing done is a one-line "Skipped" card. Others end with "N planned sets skipped".
  • Exercise names open their history on a new history/exercise/{id} route, so History stays selected.

Exercises (F13)

  • Material 3 search bar ("Search 69 exercises"), and an Equipment chip with a menu, placed first in the row so it's on screen.
  • Each trained exercise shows "Last 82.5 kg × 8 · today", from the last finished workout with a non-warm-up set.

Exercise detail (F14)

  • Hero card with the latest session's best e1RM, a Canvas sparkline of every session's, and "+4.2 kg in 30 days". The change is against the last session at least 30 days old, and hidden until there is one.
  • Records as a grid of tiles: Heaviest, Most reps, Best e1RM, Session volume, each with its date.

Exercise picker (F16)

  • Recent chip first, then All and the muscle groups. Recent is the exercises of the last 5 finished workouts, on by default when there are any. A search under Recent looks through the whole library.
  • Picks are numbered in tick order, with a tray of removable picks above Add.
  • The logger and the routine editor share it.

Data

No schema change. New queries:

  • WorkoutDao.observeHistoryExerciseNames()
  • WorkoutDao.observeLastSessionSets()
  • WorkoutDao.observeRecentExerciseIds()

Branch note

The branch merges its old, already squash-merged D3 commits instead of force-pushing over them, so the diff against main is D4 only.

Checks

./gradlew testDebugUnitTest ktlintCheck lintDebug assembleDebug passes with 238 tests. New tests cover:

  • calendar volume steps, the Equipment filter, the e1RM trend and its 30-day change, and picker options
  • the three new queries

Generated by Claude Code

The Workout tab suggests the routine done least recently in an Up next card
with a Start button. Other routines are compact rows with exercise count,
last done and typical duration, a play button and a menu with Edit and
Delete. "Start an empty workout" is now a text button.

Finishing shows a full-screen summary in place of the dialog: duration,
volume and set tiles, the gold records card, and how the session compares
with the routine's last one (volume change and each exercise's top set).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014thT5Dp3wpv8eK7uit7vPL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014thT5Dp3wpv8eK7uit7vPL
…ercises list, picker

- History cards lead with the date and a gold PR chip, then the routine, a
  stat row and the first exercises; a top-bar icon switches to the calendar.
- The calendar tints trained days in three steps by volume, fills the
  picked day and always rings today.
- Workout detail: stat tiles, Delete in the menu, skipped exercises on one
  line, and exercise names that open their history under History.
- Exercises: a Material 3 search bar, an Equipment chip, and each trained
  exercise's last top set and when.
- Exercise detail: an e1RM hero with its 30-day change and a sparkline, and
  records as a grid of tiles with dates.
- Exercise picker: Recent and muscle chips, picks numbered in tick order,
  and a tray of picks above the Add button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014thT5Dp3wpv8eK7uit7vPL
…916c4d-krazr0

# Conflicts:
#	app/src/main/java/io/github/prithvimk/gymtracker/data/repository/WorkoutRepository.kt
#	app/src/main/java/io/github/prithvimk/gymtracker/domain/SessionComparison.kt
#	app/src/main/java/io/github/prithvimk/gymtracker/ui/workout/FinishSummary.kt
#	app/src/test/java/io/github/prithvimk/gymtracker/data/repository/WorkoutRepositoryTest.kt
#	docs/IMPLEMENTATION_PLAN.md
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