Debug: live alert trace — surface every gate decision from the alert chain
ProximityMonitor now records each stage the live chain reaches (Settings → Debug → Alert trace, in-memory, newest-first, capped at 8): - didEnterRegion arrival (regionEventCount + entry line) — distinguishes 'geofence never fires' from 'gate blocked the alert' - gate misses: station not in loaded list, hourly dedup (with minutes ago), no fuel sellers within radius after fresh fetch, entered-not-cheapest (with the cheaper station + price) - the previously-silent fresh-fetch catch now logs the error - 'alert scheduled' once UNUserNotificationCenter.add is called — if that line appears but no banner shows, the failure is delivery/permission, not alert logic SettingsView shows the trace (symbol per kind) + region-event count; the existing Test-alert button already probes notification permission and reports denial inline. 83 tests, Release build green.
This commit is contained in:
@@ -403,7 +403,9 @@ struct ContentView: View {
|
||||
debugStatus: monitor.debugStatus,
|
||||
appCheapest: appCheapestStatus,
|
||||
regionError: monitor.lastRegionError,
|
||||
monitoredCount: monitor.monitoredStationIDs.count
|
||||
monitoredCount: monitor.monitoredStationIDs.count,
|
||||
alertLog: monitor.alertLog,
|
||||
regionEventCount: monitor.regionEventCount
|
||||
)
|
||||
.tabItem { Label("Settings", systemImage: "gearshape.fill") }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user