diff --git a/docs/progress/01-CHANGELOG-WORK.md b/docs/progress/01-CHANGELOG-WORK.md index 2c73fcd..a605943 100644 --- a/docs/progress/01-CHANGELOG-WORK.md +++ b/docs/progress/01-CHANGELOG-WORK.md @@ -291,18 +291,38 @@ For release notes, see [CHANGELOG.md](../../CHANGELOG.md). - Refactored `getNotificationStatus()` to delegate to `NotificationStatusChecker.getNotificationStatus()` - Refactored `checkPermissionStatus()` to delegate to `PermissionManager.checkPermissionStatus()` - Deferred `getExactAlarmStatus()` refactoring (requires complex service initialization) - -**Added:** -- `docs/progress/P2.1-BATCH-A-STATE.md` - State directive for reconstituting work on another machine +- `ios/Plugin/DailyNotificationRollingWindow.swift`: + - Implemented `countPendingNotifications()` using `UNUserNotificationCenter.getPendingNotificationRequests()` + - Implemented `countNotificationsForDate()` with date filtering from pending requests + - Implemented `getNotificationsForDate()` with notification reconstruction from pending requests + - Added `fetchPendingRequestsSync()` helper for synchronous request fetching +- `android/src/main/java/com/timesafari/dailynotification/DailyNotificationRollingWindow.java`: + - Implemented `countPendingNotifications()` using `storage.getAllNotifications()` as source of truth + - Implemented `countNotificationsForDate()` with date bounds filtering + - Implemented `getNotificationsForDate()` with date bounds filtering + - Added `dateBoundsMillis()` helper for date range calculation (YYYY-MM-DD to [startMillis, endMillis]) +- `ios/Plugin/DailyNotificationScheduler.swift`: + - Enabled TTL validation in `scheduleNotification()` method + - Skips scheduling if TTL validation fails (logs and returns false) +- `ios/Plugin/DailyNotificationDatabase.swift`: + - Implemented `saveNotificationContent()` with JSON encoding and SQLite INSERT OR REPLACE + - Implemented `deleteNotificationContent()` with SQLite DELETE by slot_id + - Implemented `clearAllNotifications()` clearing both contents and deliveries tables **Notes:** - P2.1 Batch A refactoring in progress (3 of ~10 methods completed) - Reduced plugin class complexity by ~130 lines - Services already exist - this is delegation, not extraction - `getExactAlarmStatus()` deferred due to `DailyNotificationExactAlarmManager` requiring `AlarmManager` and `DailyNotificationScheduler` for initialization +- **Deep fixes completed**: Removed all TODO stubs affecting capacity/rate-limiting correctness + - iOS rolling window now uses actual pending notification counts + - Android rolling window now uses storage as source of truth + - iOS TTL validation now enforced before scheduling + - iOS SQLite persistence now functional (aligns runtime with tests) **Related Commits/PRs:** - P2.1 Batch A refactoring (in progress) +- Deep fixes: rolling window counting, TTL validation, DB persistence ---