diff --git a/KisaniCal/ISSUES.md b/KisaniCal/ISSUES.md index 9f33791..32f4951 100644 --- a/KisaniCal/ISSUES.md +++ b/KisaniCal/ISSUES.md @@ -2187,3 +2187,37 @@ the dimmer date/countdown line; both mono metadata lines (date and countdown) got `.tracking(0.2)` for legibility at 9.5pt; column spacing loosened slightly (2→3 left, 3→4 right) for breathing room between the two lines. + +## KC-63 — Workout card: keep the progress dots visible after finishing; confirm every Finish tap + +Status: Implemented (not build-verified — no iOS runtime here) +Reported by: User, from device screenshots +Area: Workout (`DotProgressCard`) + +### Description +Two regressions from KC-52's completion-flow redesign, per the user directly: +1. Tapping "Finish Workout" replaced the progress-dots view (33/33 sets, + 100%) with a green "Workout logged / Undo" takeover — and there was no + way back to the dots short of Undo. User: "it gets stuck here and i cant + go back to 100% progress view... please only maintain this view of + progress." +2. "Finish Workout" skipped the confirmation dialog whenever all sets were + already checked (KC-52 follow-up 2's stated behavior: "nothing to + override"). User now wants every Finish tap confirmed, to avoid + accidental toggles — same bar as Clear All / Didn't Train already have. + +### Change +- `DotProgressCard.body`: the `PROGRESS` label + `DotGridProgress` now + render unconditionally, outside the `isDoneToday`/`isMissedToday` branch. + Only the row below it switches between `actionRow` (pending) and + `undoRow` (done/missed) — the dots themselves never disappear. +- Finish button now always sets `pendingAction = .finish` instead of + short-circuiting straight to `onFinish()` at 100% sets — every Finish tap + goes through the existing `confirmationDialog`. Clear All Sets already + confirmed (KC-52 follow-up 2); no change needed there. + +Files: `KisaniCal/Views/WorkoutView.swift`. + +### Note +Not build-verified (no iOS runtime here). Self-reviewed: balanced braces/ +parens confirmed for the file. diff --git a/KisaniCal/Views/WorkoutView.swift b/KisaniCal/Views/WorkoutView.swift index 9909ec9..d7cd761 100644 --- a/KisaniCal/Views/WorkoutView.swift +++ b/KisaniCal/Views/WorkoutView.swift @@ -639,15 +639,18 @@ struct DotProgressCard: View { statusBadge } + // Progress dots stay visible regardless of state — finishing the + // day shouldn't replace the one view that shows how it went. + VStack(alignment: .leading, spacing: 6) { + Text("PROGRESS") + .font(AppFonts.mono(8, weight: .bold)) + .foregroundColor(AppColors.text3(cs)) + DotGridProgress(progress: total > 0 ? progress : 0, cs: cs) + } + if isDoneToday || isMissedToday { undoRow } else { - VStack(alignment: .leading, spacing: 6) { - Text("PROGRESS") - .font(AppFonts.mono(8, weight: .bold)) - .foregroundColor(AppColors.text3(cs)) - DotGridProgress(progress: total > 0 ? progress : 0, cs: cs) - } actionRow } } @@ -737,7 +740,7 @@ struct DotProgressCard: View { private var actionRow: some View { VStack(spacing: 8) { Button { - if done == total && total > 0 { onFinish() } else { pendingAction = .finish } + pendingAction = .finish } label: { Label(done == total && total > 0 ? "Finish Workout" : "Finish Anyway", systemImage: "checkmark.circle.fill")