27 Commits

Author SHA1 Message Date
98244b3d65 Merge pull request 'fix: completed tasks reappearing as overdue (#2)' (#4) from fix/issue-2-task-completion-persistence into master
Reviewed-on: #4
2026-04-12 10:14:26 -05:00
42084b6601 Merge pull request 'fix: Save to Collection button not responding (#1)' (#3) from fix/issue-1-save-to-collection into master
Reviewed-on: #3
2026-04-12 10:14:14 -05:00
Trey t
c1c824f288 fix: completed care tasks reappearing as overdue after reopening
When a user marked a care task as complete, the task would disappear
from the upcoming tasks section. However, upon navigating away and
returning to the plant detail, the task would reappear as incomplete
and overdue.

The root cause was that PlantDetailView only used .task to load
schedule data, which runs once on first appearance. When the view was
recreated (e.g., after navigating back from the collection list), the
Core Data fetch could return stale data due to context isolation in
NSPersistentCloudKitContainer.

Added .onAppear to reload the care schedule from Core Data every time
the view appears, matching the pattern already used in TodayView.
Also exposed a refreshSchedule() method on the ViewModel for this
purpose.

Fixes #2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 10:13:08 -05:00
Trey t
987ebf9690 fix: Save to Collection button not responding without user interaction
The Save to Collection button on the identification screen would remain
disabled after plant identification completed, requiring the user to tap
a prediction row before it would enable. This was caused by an @Observable
+ @State tracking issue where computed properties in SwiftUI view modifiers
don't always trigger re-renders when the underlying observable changes.

Replaced the empty .onChange workaround with a local @State property
(saveEnabled) that is explicitly updated when selectedPrediction or
saveState changes, ensuring the button state always reflects the current
ViewModel state.

Fixes #1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 10:08:30 -05:00
akatreyt
4615acf946 Merge pull request #16 from akatreyt/fix/issue-11
fix: resolve #11 - Care Requirements
2026-04-12 09:42:05 -05:00
akatreyt
9427497497 Merge pull request #18 from akatreyt/fix/issue-17
fix: issue #17 - upcoming tasks
2026-03-10 09:41:31 -05:00
treyt
60189a5406 fix: issue #17 - upcoming tasks
Automated fix by Tony CI v3.
Refs #17

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-09 22:23:56 -05:00
Trey t
63f0c2a70e Merge branch 'master' of github.com:akatreyt/Planttime 2026-02-18 18:26:27 -06:00
Trey t
1ae9c884c8 Rebuild UI test foundation with page objects, wait helpers, and screen objects
Replace brittle localized-string selectors and broken wait helpers with a
robust, identifier-first UI test infrastructure. All 41 UI tests pass on
iOS 26.2 simulator (iPhone 17).

Foundation:
- BaseUITestCase with deterministic launch helpers (launchClean, launchOffline)
- WaitHelpers (waitUntilHittable, waitUntilGone, tapWhenReady) replacing sleep()
- UITestID enum mirroring AccessibilityIdentifiers from the app target
- Screen objects: TabBarScreen, CameraScreen, CollectionScreen, TodayScreen,
  SettingsScreen, PlantDetailScreen

Key fixes:
- Tab navigation uses waitForExistence+tap instead of isHittable (unreliable
  in iOS 26 simulator)
- Tests handle real app state (empty collection, no camera permission)
- Increased timeouts for parallel clone execution
- Added NetworkMonitorProtocol and protocol-typed DI for testability
- Fixed actor-isolation issues in unit test mocks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:36:54 -06:00
treyt
4e3ced4d64 fix: resolve issue #11 - Care Requirements
Automated fix by Tony CI.
Closes #11

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-16 22:42:56 -06:00
akatreyt
a46373876b Merge pull request #15 from akatreyt/fix/issue-13
fix: resolve #13 - Today tab
2026-02-16 22:34:24 -06:00
treyt
064d73ba03 fix: resolve issue #13 - Today tab
Automated fix by Tony CI.
Closes #13

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-16 22:33:31 -06:00
Trey t
681476a499 WIP: Various UI and feature improvements
- Add AllTasksView and PlantEditView components
- Update CoreDataStack CloudKit container ID
- Improve CameraView and IdentificationViewModel
- Update MainTabView, RoomsListView, UpcomingTasksSection
- Minor fixes to PlantGuideApp and SettingsViewModel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:50:04 -06:00
Trey t
fef9552b22 wip 2026-01-29 10:40:23 -06:00
Trey t
2c2e1e2c71 Add README
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:43:05 -06:00
Trey t
bd4db08587 Fix Core Data CloudKit compatibility and update CLAUDE.md
- Make all Core Data attributes CloudKit-compatible (optional or with defaults)
- Fix CoreDataStack to wait for persistent store loading before operations
- Add AccentColor to asset catalog (green theme color)
- Remove Browse tab from navigation (keep underlying code)
- Update CLAUDE.md with current features, architecture, and tab structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:40:35 -06:00
Trey t
4fcec31c02 Add Progress Photos feature for plant growth tracking (Phase 8)
Implement progress photo capture with HEIC compression and thumbnail
generation, gallery view with grid display and full-size viewing,
time-lapse playback with adjustable speed, and photo reminder
notifications at weekly/biweekly/monthly intervals.

New files:
- ProgressPhoto domain entity with imageData and thumbnailData
- ProgressPhotoRepositoryProtocol and CoreDataProgressPhotoRepository
- CaptureProgressPhotoUseCase with image compression/resizing
- SchedulePhotoReminderUseCase with notification scheduling
- ProgressPhotosViewModel, ProgressPhotoGalleryView
- ProgressPhotoCaptureView, TimeLapsePlayerView

Modified:
- PlantMO with progressPhotos relationship
- Core Data model with ProgressPhotoMO entity
- NotificationService with photo reminder support
- PlantDetailView with Progress Photos section
- DIContainer with photo service registrations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:40:50 -06:00
Trey t
f41c77876a Add batch actions for multi-task completion (Phase 7)
Implement batch task completion feature allowing users to select and
complete multiple care tasks at once. Adds edit mode to Today View with
selection checkmarks, floating BatchActionBar, and confirmation dialog
for completing more than 3 tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:19:21 -06:00
Trey t
efd935568a Add Today View dashboard replacing Care tab (Phase 6)
Replace the Care tab with a new Today View dashboard that shows
overdue and today's care tasks grouped by room. Features include:

- TodayView: Main dashboard with greeting, progress stats, and task sections
- TodayViewModel: Room-based task grouping with completion tracking
- QuickStatsBar: Progress indicator showing completed vs total tasks
- TaskSection: Collapsible sections for overdue/today tasks
- RoomTaskGroup: Tasks grouped by room with "Water all" bulk action
- InMemoryRoomRepository: In-memory room storage for testing/mocks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:05:55 -06:00
Trey t
08ced7dbbb Fix test infrastructure for Rooms feature and improve testability
- Update Plant test fixtures to use roomID instead of deprecated location
- Add URLDataFetcher protocol to ImageCache for dependency injection
- Update ImageCacheTests to use protocol-based mock instead of URLSession subclass
- Add missing cancelReminders(for:plantID:) method to MockNotificationService
- Add Equatable conformance to ImageCacheError for test assertions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:55:50 -06:00
Trey t
7786a40ae0 Add Plant Rooms/Zones feature for organizing plants by location
Implements Phase 3 of the feature roadmap:
- Room entity with 7 default rooms (Kitchen, Living Room, Bedroom, etc.)
- RoomRepositoryProtocol and CoreDataRoomRepository for persistence
- CreateDefaultRoomsUseCase and ManageRoomsUseCase for CRUD operations
- RoomsListView with swipe-to-delete and drag-to-reorder
- RoomEditorView with SF Symbol icon picker
- RoomPickerView for assigning plants to rooms
- Updated Plant entity (location → roomID) and PlantDetailView
- Added "Manage Rooms" section in SettingsView

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:44:14 -06:00
Trey t
d125216a95 Add CloudKit sync for cross-device data persistence
- Switch CoreDataStack from NSPersistentContainer to NSPersistentCloudKitContainer
- Configure CloudKit container: iCloud.com.t-t.PlantGuide
- Remove uniqueness constraints from all Core Data entities (CloudKit incompatible)
- Add CloudKit container identifier to entitlements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:21:52 -06:00
Trey t
be0d298d9f Add dark mode support and design system foundation
- Create DesignSystem with ColorTokens, AppearanceManager, spacing, and typography
- Add appearance picker in Settings (System/Light/Dark modes)
- Replace hardcoded colors with design tokens in MainTabView and Enums+UI
- Inject AppearanceManager via environment in PlantGuideApp
- Add FEATURE_ROADMAP.md documenting 8 planned features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:17:56 -06:00
Trey t
136b327093 Add project documentation and CLAUDE.md
Adds competitive analysis document comparing PlantGuide against major
plant identification apps (PlantIn, PictureThis, Planta, etc.) and
CLAUDE.md to help future Claude Code instances navigate the codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:55:56 -06:00
Trey t
eb1d61a746 Fix plant care caching and add PlantNet API debug logging
- Fix Core Data transformer conflict causing cache decode failures
  - Changed PlantCareInfoMO attributes from Transformable to Binary type
  - Removed valueTransformerName references that conflicted with manual JSON encoding

- Fix cache key mismatch causing cache misses
  - Normalize scientificName to lookup name when saving to cache

- Remove cache expiration (cache now persistent until plant deleted)
  - Removed cacheExpiration property and isCacheStale check
  - Added forceRefresh parameter to FetchPlantCareUseCase for manual refresh

- Add cache cleanup when deleting plants
  - Added PlantCareInfoRepositoryProtocol dependency to DeletePlantUseCase
  - Clean up cached care info when plant is deleted

- Add extensive debug logging to PlantNetAPIService
  - Log request/response details, status codes, and decoding errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:13:48 -06:00
Trey t
136dfbae33 Add PlantGuide iOS app with plant identification and care management
- Implement camera capture and plant identification workflow
- Add Core Data persistence for plants, care schedules, and cached API data
- Create collection view with grid/list layouts and filtering
- Build plant detail views with care information display
- Integrate Trefle botanical API for plant care data
- Add local image storage for captured plant photos
- Implement dependency injection container for testability
- Include accessibility support throughout the app

Bug fixes in this commit:
- Fix Trefle API decoding by removing duplicate CodingKeys
- Fix LocalCachedImage to load from correct PlantImages directory
- Set dateAdded when saving plants for proper collection sorting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:18:01 -06:00
Trey t
d3ab29eb84 add git ignore 2026-01-23 11:12:00 -06:00