From 9e06b56a435cb30dcf347741853dd339e8bad11a Mon Sep 17 00:00:00 2001 From: kutesir Date: Thu, 9 Jul 2026 22:35:58 +0300 Subject: [PATCH] workout: keep progress dots visible after finish, confirm every Finish tap (KC-63) The KC-52 redesign swapped the whole progress-dots view for a green "Workout logged" takeover on finish, with no way back short of Undo, and let Finish skip confirmation whenever all sets were already checked. Dots now stay visible in every state; Finish always confirms, matching Clear All / Didn't Train. Co-Authored-By: Claude Opus 4.8 --- KisaniCal/ISSUES.md | 34 +++++++++++++++++++++++++++++++ KisaniCal/Views/WorkoutView.swift | 17 +++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) 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")