Skip to content

Latest commit

 

History

History
146 lines (105 loc) · 3.78 KB

File metadata and controls

146 lines (105 loc) · 3.78 KB

Implementation Progress

Last updated: 2026-06-08

Use this file to track phase completion. Update checkboxes and notes as work lands.

Detailed steps: IMPLEMENTATION.md


Status Summary

Phase Name Status Notes
1 Foundation Complete
2 Home Screen Complete
3 Rings Complete
4 Food Logging Complete Auto-calculated calories
5 Daily Summary Complete Uses derivedCalories
6 History Complete Swipe-to-delete included
7 Settings Complete
8 Polish Not started
9 Home Screen Widget Complete MacroWidget + App Group

Overall: 8 / 9 phases complete (Phase 8 polish remaining)


Phase 1 — Foundation

  • Xcode project created (iOS 18+, SwiftUI, SwiftData)
  • FoodEntry model
  • DailyGoals model with defaults
  • ModelContainer configured
  • First-launch goals seed
  • Persistence verified across relaunch

Phase 2 — Home Screen

  • HomeView scaffold (dark mode first)
  • CalendarStripView — today default, past selectable, future disabled
  • Month awareness while scrolling
  • Floating action button
  • HomeViewModel with selectedDate
  • Settings navigation

Phase 3 — Rings

  • CaloriesRingView
  • MacroRingView (protein, carbs, fat, fiber)
  • Progress + remaining calculations in ViewModel
  • Clockwise animated ring fill
  • Over-goal clamped at 100%

Phase 4 — Food Logging

  • AddFoodSheet with macro fields (no manual calories)
  • CalorieCalculator — live calorie preview
  • Form validation
  • Save to SwiftData for selected day
  • Immediate UI refresh after save

Phase 5 — Daily Summary

  • Totals computed from entries for selected day
  • Rings wired to real totals + goals
  • FoodEntryCard in entry list
  • Empty state for no entries
  • Totals use derivedCalories

Phase 6 — History

  • Date change reloads correct entries
  • No cross-day data leakage
  • Historical rings/totals correct
  • Swipe-to-delete on entries

Phase 7 — Settings

  • SettingsView goal editor
  • SettingsViewModel persistence
  • Goals survive restart
  • Home rings use saved goals

Phase 8 — Polish

  • Haptics (save, calendar select)
  • Animation tuning
  • Accessibility labels on rings
  • Dark mode / contrast pass
  • Edge cases (long names, large numbers)
  • Full main user flow verified

Notes: Basic accessibility labels added on rings and cards during phases 3–7.


Phase 9 — Home Screen Widget

  • App Group group.com.macros.rings entitlements (app + widget)
  • Shared/WidgetDailySnapshot, WidgetDataStore, MacroProgressCalculator
  • WidgetSyncService — SwiftData → snapshot → reloadTimelines
  • Sync on launch, food save, delete, goals change
  • MacroWidget extension target
  • WidgetMacroRingView with SF Symbols
  • systemSmall 2×2 grid layout
  • systemMedium labeled side-by-side layout
  • .containerBackground(.background, for: .widget)
  • Timeline policy .after(nextMidnight)
  • WidgetDataStoreTests

Unit Tests

Suite Coverage
CalorieCalculatorTests Formula, zeros, decimals, empty strings
HomeViewModelTests Derived calorie totals, progress, legacy stored values
WidgetDataStoreTests Save/load round-trip, fallback, progress clamp

Changelog

Date Change
2026-06-08 Initial progress tracker created
2026-06-08 Phases 1–7 implemented
2026-06-08 Auto-calculated calories from macros
2026-06-08 Unit test target added
2026-06-08 Phase 9 MacroWidget + App Group sync