Skip to content

Conversation

@daneden
Copy link
Owner

@daneden daneden commented Feb 3, 2026

Closes #122

daneden and others added 13 commits February 3, 2026 15:43
…s to be shown in watchOS complication configurations
Widgets were failing when snapshot() and timeline() were called in quick
succession because CLGeocoder rate limits reverse geocoding requests.

- Add LocationAppGroupCache to share location and placemark data between
  the main app and widget extensions via App Group UserDefaults
- Main app now caches placemark (title, subtitle, timezone) alongside location
- Widget reads cached placemark from App Group, avoiding redundant geocoding
- Widget only geocodes as fallback when no cached data or location moved >500m
- Geocoder instance moved inside actor to prevent concurrent calls

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reduces duplication by replacing four nearly-identical structs with a
single shared LocationData struct that conforms to Codable and AnyLocation.

Replaced:
- LocationAppGroupCache.CachedPlacemark
- SavedLocationEntityData (in LocationAppEntity)
- TemporaryLocationData (in LocationAppEntity)
- SavedLocation.CodableRepresentation (now a typealias)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removes the hasPlacemarkData guard that prevented reading cached location
when placemark fields were nil. The widget will trigger geocoding if
timeZoneIdentifier is missing, maintaining the separation between
time-based location cache and distance-based placemark cache.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@daneden daneden merged commit 9652432 into main Feb 11, 2026
4 checks passed
@daneden daneden deleted the feat/sundial-small-widget branch February 11, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feedback] Hi, love your app, big thank you! One suggestion, do you thi...

1 participant