Skip to content

iOS 26 modernization — @Observable state, async networking, Liquid Glass UI, notifications#2

Open
bsakhuja wants to merge 1 commit intomainfrom
claude/kind-turing-6bd036
Open

iOS 26 modernization — @Observable state, async networking, Liquid Glass UI, notifications#2
bsakhuja wants to merge 1 commit intomainfrom
claude/kind-turing-6bd036

Conversation

@bsakhuja
Copy link
Copy Markdown
Owner

@bsakhuja bsakhuja commented May 8, 2026

Summary

  • Fix filter live-update bug — all SettingsState filter properties were @ObservationIgnored @AppStorage, making @Observable blind to changes; replaced with plain stored properties + didSet UserDefaults persistence so filters, chip labels, and the list update instantly without restarting
  • Fix map/list toggle reliability — moved isListView from @ObservationIgnored @AppStorage in SettingsState to direct @AppStorage on HomeView so SwiftUI tracks it natively
  • @observable migration — all three state classes migrated from ObservableObject/@StateObject/@EnvironmentObject to @Observable/@State/@Environment
  • Async network layer — replaced Combine AnyPublisher with async/await; added 2-retry exponential backoff, removed bogus Authorization: Bearer TOKEN header, configured URLCache; errors surface via alert with retry button
  • Liquid Glass UIglassEffect() on cards, .toolbarBackground(.glass), 5-tier magnitude color system (Color+Magnitude.swift)
  • Earthquake notifications — new NotificationManager with BGAppRefreshTask for background M5.0+ alerts with deduplication; registered in RumbleApp
  • Inline filter chips — date, magnitude, and sort controls moved into a horizontal scroll row at the top of the list; settings screen simplified to notifications only
  • Segmented nav control — map/list toggle replaced with Picker(.segmented) in .principal toolbar slot; .navigationBarTitleDisplayMode(.inline) prevents the "Earthquakes" title from floating over the map
  • Map location button — moved from mapControls to a custom .regularMaterial circle button overlaid .bottomTrailing, with MapCameraPosition binding so tapping it re-centers on the user

Test plan

  • Changing a filter chip (date range, magnitude, sort) updates the list immediately without restarting
  • Map/list segmented control switches views with crossfade; selection persists across restarts
  • Pulling to refresh re-fetches and shows an error alert (with Retry) if the network is offline
  • Tapping the location button on the map re-centers on user location
  • Notifications section in Settings toggles correctly; minimum magnitude picker appears when enabled
  • All magnitude colors render correctly (green → yellow → orange → red → dark red)
  • App builds cleanly in Release with no errors

🤖 Generated with Claude Code

…ss UI, notifications, filter persistence

- Migrate all state classes from ObservableObject/Combine to @observable
- Fix filter live-update bug: remove @ObservationIgnored from SettingsState properties, replace with didSet UserDefaults persistence so @observable tracks changes and views re-render immediately
- Fix map/list toggle reliability: move isListView from @ObservationIgnored @AppStorage in SettingsState to direct @AppStorage on HomeView
- Replace async/Combine network layer with async/await + 2-retry exponential backoff; remove bogus auth header; configure URLCache
- Add NotificationManager with BGAppRefreshTask registration and local notifications for M5.0+ earthquakes with deduplication
- Apply Liquid Glass UI: glassEffect() on cards, .toolbarBackground(.glass), 5-tier magnitude color system
- Add filter persistence: all filter/sort settings survive app restarts via UserDefaults
- Inline filter chips (date, magnitude, sort) in list view above content; remove settings screen filter sections
- Replace map/list toggle button with segmented control in navigation principal slot; suppress large title overlay on map
- Move map user location button to bottom-right corner as custom overlay
- Pull-to-refresh on earthquake list; surface network errors via alert with retry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant