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>
- HealthKitManager: add fetchWorkoutDates(from:to:) to read past workouts from Apple Health
- WorkoutViewModel: syncFromHealthKit() merges HealthKit workout dates into streak (runs on every foreground); checkPendingHealthConfirm() picks up confirmed workouts from notification action
- NotificationManager: WORKOUT_CONFIRM category with 'Yes, log it' action; scheduleWorkoutConfirm() fires weekly on scheduled workout days at configurable time (default 8pm); LOG_WORKOUT action writes pendingConfirm to UserDefaults
- SettingsView (Workout Settings): new HEALTH SYNC section with 'Sync now' button and 'Workout confirmation reminder' toggle + time picker
- TodayView: TodayHealthStrip shows steps, active calories, resting HR, and workout streak in a 4-pill row below the date header (only shown when HealthKit is authorized); refreshes on appear and foreground
- FAB: Matrix FAB padding fixed to match Today/Calendar position (.bottom 10)
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- Add NSUbiquitousKeyValueStore entitlement to KisaniCal.entitlements
- New CloudSyncManager: mirrors UserDefaults to iCloud KV Store on every save; restores to UserDefaults on fresh install when local data is missing; observes external changes to pull updates in real-time; guards against 1 MB limit
- TaskViewModel: restore from iCloud on init, push to iCloud on every save
- WorkoutViewModel: restore programs/schedule/activePid/completedDates from iCloud on init, push all four keys on every save
- ContentView: restoreSettings() + backupSettings() on appear and foreground — syncs ~18 small settings keys (appearance, tabs, tutorial flags, calendar prefs, workout notifications)
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- 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>
foregroundStyle is overridden by Menu tint; baking color into UIImage
with .alwaysOriginal rendering mode is the only reliable approach.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Priority stored on TaskItem, shown as colored flag in add sheet toolbar
and as a small flag indicator on each task row.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Tap body → marks complete + navigates to tasks.
Swipe action 'Mark Complete' → marks complete without opening app.
TaskViewModel.reload() called on foreground to sync UserDefaults changes
made while app was backgrounded.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Single-size universal entry was not generating 20pt notification sizes.
Added all traditional sizes (20/29/40/60/76/83.5pt) so iOS notification
center finds the pre-baked icon directly.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Wrapping the entire TaskRowView in a Button caused any tap on the row
to mark the task complete. Circle is now the only interactive element.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Evening check-in no longer embeds the urgent task count in the body —
repeating notifications bake that value at schedule time so it always
shows a stale number. Replaced with a generic prompt.
didReceive now routes notification taps via ShortcutHandler:
'workout' deeplink → Workout tab, everything else → Today tab.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
updateBadge() counts all incomplete tasks with a due date earlier
than tomorrow (i.e. overdue or due today) and calls setBadgeCount().
Called inside reschedule() so the badge updates on foreground, task
changes, and workout set completions — same triggers as notifications.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- TutorialManager: tracks 4 steps (NLP, Calendar, Matrix, Workout)
persisted via AppStorage; shown once then never again
- TutorialView: fullscreen overlay with even-odd spotlight cutout,
animated accent border, ultraThinMaterial callout card, pill progress
dots, Next/Get started button, and Skip
- TutorialFrameKey: PreferenceKey collects CGRect for each anchor index;
.tutorialAnchor() modifier wired to FAB (step 0) and all 4 tab buttons
- Callout auto-positions above or below the spotlight based on screen half
- ContentView collects frames via onPreferenceChange and layers the overlay
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Needed because self is captured in @Sendable closures passed to
UNUserNotificationCenter callbacks. Safe: the only mutable state
(isAuthorized) is exclusively written on the main thread.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- Remove @MainActor from class (caused all Sendable/isolation cascade)
- Keep @MainActor only on reschedule() where VM access is needed
- Snapshot tasks in reschedule() so scheduleTasks() never captures
a non-Sendable TaskViewModel across async boundaries
- Capture center locally in scheduleTasks() to avoid @MainActor
property access inside the @Sendable getPendingNotificationRequests callback
- Mark UNUserNotificationCenterDelegate methods nonisolated to satisfy
protocol conformance without actor crossing
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Snapshot WorkoutViewModel's schedule/programs/progress before the
async getNotificationSettings callback so scheduleWorkout receives
plain value types instead of MainActor-isolated properties.
Also fix unused-mutation warning: email in handleApple changed to let.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Profile header and ProfileStatsSheet now read displayName and email
from AuthManager.shared instead of hardcoded "Robin Kutesa" / "RK".
Initials are computed dynamically from the user's display name.
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- Remove leftover Self. prefix on instance storage keys in save()
- Mark TaskViewModel and WorkoutViewModel @MainActor so init() can
safely access AuthManager.shared without isolation violations
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- Remove all personal sampleTasks from TaskViewModel (tasks start empty)
- Namespace UserDefaults keys by Apple ID for task and workout data isolation
- Add ProfileSetupView for name capture after first Sign in with Apple
- Add updateDisplayName() to AuthManager
- Route to ProfileSetupView when user has no display name yet
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
- Tab bar: TickTick-style floating pill (cornerRadius 28, shadow, systemGray5 active highlight)
- NLP: month+day parsing (8th June, June 8), recurrence (every year/week/etc), intent stripping (remind me of)
- Recurrence chip in add-task toolbar; isRecurring saved with task
- Date chip defaults to Today on new tasks; tapping opens full date picker
- Date picker: calendar grid, inline time wheel, Repeat menu (Date tab)
- Duration tab: Start/End column selector, live duration counter, All Day toggle
- TaskItem: added endDate and isAllDay fields
- Fixed hidden Unicode character corrupting + operator in TodayView
Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
Default view shows the next 5 upcoming tasks. If more exist, a
"N more ↓" button expands the full list; tapping again collapses
back to 5. The section header is tappable to fully hide the list
(only title + count badge remain visible). Collapsed state is
persisted via @AppStorage so it survives app restarts.
Adds four UIApplicationShortcutItems registered dynamically at launch:
• Add Task — opens the add-task sheet immediately, any tab
• Today — switches to the Today tab
• Calendar — switches to the Calendar tab
• Workout — switches to the Workout tab (only registered if the
workout tab is enabled in settings; re-registers when the setting changes)
Cold-launch and foreground-activation paths both handled via AppDelegate.
ShortcutHandler singleton bridges UIKit callbacks to SwiftUI via @Published.
Selected-day panel below the month grid now renders as a proper vertical
timeline: time labels in the left gutter, continuous track line with
circle markers, and white cards for each item. All-day tasks and events
get a stroke circle; timed entries get a solid colored dot; workout gets
a dumbbell icon; completed items show a checkmark circle with strikethrough.
Tasks can be toggled directly from the timeline card. Cal events show
end time as subtitle. Empty state shows a calendar icon.
DotGridProgress replaced GeometryReader + 200+ Circle view nodes with a
single Canvas draw call. Canvas receives its own size parameter so no
GeometryReader is needed; SwiftUI interpolates the progress value through
the .animation modifier for smooth fill transitions.
FloatingTabState ScrollYKey made private to TabBarScrollModifier to limit
its PreferenceKey scope and prevent unintended propagation across unrelated
subtrees.
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.
iOS auto-snaps to the next larger detent when keyboard appears over a
text field. Removing .large locks the sheet to .height(150) so it
stays compact and hugs the keyboard like the reference app.
Also removed the Description label and reduced input maxHeight to 72pt
so all content fits within the 150pt detent.
Use UIDevice.userInterfaceIdiom instead of hSizeClass so large iPhones
in landscape keep the iPhone layout. Move tabState environmentObject to
the top-level Group so both layouts always have it in scope.
Tasks now survive app restarts via UserDefaults JSON. Each task with a
due time fires a notification at that exact time; date-only tasks fire
at 9am on the due date. Completing or deleting a task cancels its
pending notification. ContentView now reschedules on any task change.
- 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)
- KisaniCalWidget: 3 sizes sharing the app's design language
Small: date badge + kisaniCAL. wordmark + task count
Medium: badge + task list (3 items) + workout row
Large: badge + full task list (6 items) + workout row
- WidgetDataStore (Shared/): lightweight Codable types for App Group
UserDefaults cross-process data exchange
- WidgetBridge: TaskViewModel/WorkoutViewModel extensions that sync
data into App Group and call WidgetCenter.reloadAllTimelines()
- ContentView: calls syncWidget() on appear and scene becoming active
- project.yml + entitlements updated; project regenerated via xcodegen
7 rows of dots fill left-to-right, top-to-bottom as sets complete.
Filled dots: AppColors.green solid. Empty: green at 12% opacity.
Also: strip emoji from completion banner, tighten copy.
Sheet was 500pt tall with ~145pt of content, leaving ~355pt blank.
Dropping to height(150) makes the sheet hug its content and sit flush
above the keyboard like the reference design.
Break SplashCalendarCard body into monthHeader/weekdayRow/dayGrid
computed vars and extract SplashWeekRow to help the type-checker.
Rename DayCell -> SplashDayCell to avoid collision with CalendarView.
Using self.programs on the RHS of activeSections assignment violated
Swift's two-phase init rule (self is partially initialized). Use local
`migrated` array instead, then assign programs and activeSections in
the correct order.
Replace the emoji tile on CalendarWorkoutBlock and WorkoutSessionSheet
header with WorkoutSectionBar — a stack of N horizontal segments, one
per workout section. No emojis, no custom per-program images.