Merge develop -> main: full session (KC-51 through KC-71) #28

Merged
kutesir merged 64 commits from develop into main 2026-07-12 22:57:14 +00:00
2 changed files with 44 additions and 7 deletions
Showing only changes of commit 9e06b56a43 - Show all commits

View File

@@ -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 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 loosened slightly (2→3 left, 3→4 right) for breathing room between the two
lines. 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.

View File

@@ -639,15 +639,18 @@ struct DotProgressCard: View {
statusBadge 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 { if isDoneToday || isMissedToday {
undoRow undoRow
} else { } 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 actionRow
} }
} }
@@ -737,7 +740,7 @@ struct DotProgressCard: View {
private var actionRow: some View { private var actionRow: some View {
VStack(spacing: 8) { VStack(spacing: 8) {
Button { Button {
if done == total && total > 0 { onFinish() } else { pendingAction = .finish } pendingAction = .finish
} label: { } label: {
Label(done == total && total > 0 ? "Finish Workout" : "Finish Anyway", Label(done == total && total > 0 ? "Finish Workout" : "Finish Anyway",
systemImage: "checkmark.circle.fill") systemImage: "checkmark.circle.fill")