Commit Graph

12 Commits

Author SHA1 Message Date
kutesir
bcb66ef691 Workout "mark all complete" + recurring-task done confirmation notification
- Workout window: the header ⋯ menu gains "Mark All Complete" and "Clear All
  Sets" (Manage Workouts preserved). New WorkoutViewModel.setAllSetsDone(_:)
  ticks every set across all sections/exercises and runs the normal completion/
  logging path.
- Recurring tasks: completing an occurrence now posts a quiet "✓ Done. Repeats
  <tomorrow / in 1 week / …>" confirmation via NotificationManager
  .notifyRecurringCompleted, phrased from the next active occurrence. Hooked
  into TaskViewModel.toggleOccurrence; un-completing does nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 23:20:13 +03:00
kutesir
443fe8504f Workout check-in: missed state + rest-day compensation (KC-16)
- Notification actions on workout reminders/check-ins: "Yes, I completed
  it", "No, I didn't" (marks the day missed, then asks to compensate on a
  rest day), "Remind me in 1 hour" (snooze).
- VM: missedDates + compensations (persisted/synced), per-date
  markWorkoutDone/Missed, workoutStatus, upcomingRestDays,
  scheduleCompensation, promptCompensation, checkPendingMissed.
  program(for:) returns a compensation program on its rest day.
- CompensationSheet: pick a rest day or keep as missed; compensation days
  get a one-off "Missed workout recovery" reminder.
- Long-press menus: workout row (Done / Not Done / Compensate) in Today +
  Calendar; exercise cards (Mark as Done / Not Done). All actions are
  per-date — one occurrence never affects another.
- Workout row shows Pending / Done / Missed + "Compensation" label.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 23:06:58 +03:00
kutesir
9768af0017 Add Workout Stats screen (daily/weekly/monthly) — KC-14
Aggregate the per-day workout logs into performance stats:
- WorkoutDayLog.volume + StatPeriod/WorkoutStat/StatBucket.
- WorkoutViewModel.stat/statInterval/statBuckets (current vs previous).
- WorkoutStatsView: Day/Week/Month selector, Workouts/Sets/Volume cards
  with %-delta vs previous period, metric chooser, and a Swift Charts bar
  trend. Reached via a chart button in the Workout header.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 10:21:12 +03:00
kutesir
966c1b35e9 Workout: per-day history + log KC-8/KC-9
- Add per-day workout history: WorkoutDayLog/LoggedExercise/LoggedSet
  models stored at kisani.workout.history.<uid> (iCloud-synced).
- snapshotDay(_:) captures the active program's completed sets on full
  completion and before the daily reset; only days with >=1 done set.
- New WorkoutHistoryView (clock button in the Workout header) lists past
  days newest-first with per-exercise breakdown.
- Log KC-8 (auto-switch / Rest Day) and KC-9 (history) in ISSUES.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 23:12:46 +03:00
kutesir
f9081cfcf7 Workout: auto-switch to today's program + Rest Day state
The Workout tab kept showing the last-used program (with its old
completion) regardless of the weekly schedule, so a rest day still
displayed a stale, fully-checked workout.

- On a new day, the active program now follows the weekly schedule
  (applyScheduledProgramForToday in resetSetsForNewDayIfNeeded).
- Add isRestDayToday + a Rest Day card shown when today has no scheduled
  program, with a "Work out anyway" override. Header reads "Rest Day".
- Daily set reset (KC-1) unchanged — no day starts pre-checked.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:47:49 +03:00
Robin Kutesa
8b094691f5 feat: home/lock widgets, Health-aware streaks, workout editor, and entitlement fixes
Widgets (new KisaniCalWidgets extension)
- Event Countdown widget: configurable via AppIntent, pick from your events
  or set a custom name/date; dot-grid progress toward the event.
- Day Progress and Tasks-Done-Today widgets; lock screen widgets.
- Shared dot grid sizes circles to fill the widget evenly at any count.
- Tasks/calendar prefs now persist to the App Group so widgets read live data.

Health & streaks
- Persist HealthKit authorization and re-establish on launch (fixes the
  Today dashboard and streak sync disappearing after relaunch).
- Add a Health permission toggle to onboarding; unify Settings/Profile on the
  manager's state.
- Day streak counts from a logged Health workout OR marking all exercises
  complete; nudge to mark exercises complete even when Health logged the workout.

Workout editor
- Drag to reorder exercises and move them across sections (drag-and-drop);
  swipe to delete.
- Add-exercise sheet: global search and keep-adding-multiple with a running count.

Fixes
- Restore app entitlements link (Sign in with Apple, HealthKit, App Group, iCloud).
- Add HealthKit usage strings; widget Info.plist NSExtension + nested bundle id.
- Calendar "Connect" routes to Settings when access was denied.
- Bake DEVELOPMENT_TEAM and shared versions into project.yml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:27:45 +03:00
Robin Kutesa
070dd77b4e feat: page tutorials for Today & Workout, FAB fix, quadrant color consistency
- Add first-visit tutorial cards for TodayView (3 steps) and WorkoutView (3 steps) using new InViewTutorialCard component; each has independent AppStorage completion flag
- Fix FAB hidden behind custom tab bar in MatrixView by moving NavigationStack inside outer ZStack so FAB sits at the correct safe area level
- Fix task colors throughout app to use quadrant.color/softColor instead of taskColor — tasks now consistently show orange/yellow/blue/green matching their matrix quadrant in Today timeline, calendar dots, and day view
- Fix WorkoutView background (move ignoresSafeArea out of ZStack children into .background modifier)

Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
2026-06-01 19:40:00 +03:00
Robin Kutesa
228607fde6 Add rest timer with toggle — auto-starts after each set when enabled
Floating banner shows circular progress + MM:SS countdown with skip button.
Haptic + system sound fires when timer reaches zero. Duration and on/off
toggle live in Settings → Rest Timer sheet.

Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
2026-06-01 03:30:00 +03:00
kutesir
27890825d4 Unify workout progress: dot grid in WorkoutView + session sheet
Replace ProgressRingCard in WorkoutView with DotProgressCard using the
same dot grid as the workout session sheet. Remove private from DotRow
so it's accessible across view files.
2026-05-29 11:26:02 +03:00
kutesir
dc99a3f1f0 fix: widget iOS 17 deployment target + register FloatingTabState
- Widget extension: 16.0 → 17.0 (containerBackground/widget API require 17)
- xcodegen re-run picks up FloatingTabState.swift (was on disk but
  not registered in project.pbxproj after previous xcodegen run)
2026-05-28 20:35:44 +03:00
kutesir
36191f616f refactor(design): remove gamification — replace emoji icons with progress ring
WorkoutTodayBanner: progress ring replaces emoji cell as the lead
visual. Card background is now surface/border, not blue-tinted.

StreakBannerView: strip gradient, dot trail, and "Don't break the
chain". Replace with clean number + 7-tick week bar.

ProgressRingCard: "Keep going 🔥" / "Workout complete! 🎉" removed;
replaced with "N sets remaining" / "All sets done".

Sample programs: 🔥 Shoulders & Arms -> 🔄, 💥 Full Body -> 🏋️.
Emoji picker: 🔥 replaced with 🫀 (heart/cardio) as last option.
2026-05-27 23:41:15 +03:00
kutesir
f67429de0b Initial commit: KisaniCal iOS app
Task management, Eisenhower matrix, workout logging with persistence,
and calendar with 6 view modes (Month, List, Year, Week, 3 Day, Day).
Custom floating tab bar, dynamic calendar icon, and workout data seeded.
2026-05-27 02:09:44 +03:00