Two bugs fixed:
- Deleting a set left gaps in set numbering (1, 3, 3). Now renumbers
remaining sets sequentially after deletion.
- Logging set 1 caused the prefill to recalculate via the progression
engine, shifting suggested reps mid-session. Now prefills from the
last logged set's actual values; progression suggestion is only used
for the first set of a session.
- Fix exercise_id undefined error in log_form.html by using scalar
exercise_id instead of exercise.id object reference
- Clean up orphaned WorkoutSession records when all logs are deleted
- Filter empty sessions from dashboard stats (sessions, volume, streak)
- Replace broken HTTPException auth redirect with custom exception
handler that properly returns 302 to /login
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add workout logging so users can track sets, reps, weight, and a
"felt easy?" toggle inline from the workout day view via HTMX.
Sessions auto-create on first log. History page shows past sessions
with detailed per-exercise breakdowns.
New services: WorkoutSessionService, LogService
New routes: POST /log, /log/{id}/edit, /log/{id}/delete, GET /history, /history/{id}
New templates: log_form, log_entry, session_card, log_history, session_detail
Modified: exercise_card (inline logging), nav (History link), workouts route (session context)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>