Push notifications: delivery analytics, token retry, richer bodies, WS/push dedup (#232-#235) - #328
Open
icentedward76-sketch wants to merge 1 commit into
Conversation
…S/push dedup (ethos-protocol#232-ethos-protocol#235) ethos-protocol#235: Add a bounded, on-device NotificationDeliveryLog (scheduled/delivered/ suppressed events, vault ID + event type + timestamp only, never balance or beneficiary) on both platforms, plus a debug-only screen to view it (iOS: NotificationDebugView under #if DEBUG, linked from SettingsView; Android: NotificationDebugScreen under BuildConfig.DEBUG, linked from VaultListScreen's top bar). ethos-protocol#234: Push token registration now retries with backoff instead of fire-and-forget. iOS: NotificationService.registerPushToken wraps the call in withRetry and persists a pending token in Keychain on exhausted retries, retried on RootView's next foreground. Android: new PushTokenRegistrar does the same via EncryptedTokenProvider.pendingPushToken, retried from MainActivity.onResume. ethos-protocol#233: Local/scheduled notification bodies (iOS check-in reminder, TTL warning; Android's FCM fallback body) now include a truncated vault ID and, where the data is available client-side, TTL remaining — never balance or beneficiary. Documented in PARITY.md where the FCM payload doesn't carry ttl_remaining today. ethos-protocol#232: A vault_expired/vault_released event applied via the WebSocket is recorded in the delivery log; the push-arrival path on each platform checks it and suppresses a same-event banner delivered shortly after, logging it as suppressed instead. Along the way, fixed Android's VaultEventSocket to use ignoreUnknownKeys (matching ApiClient's config) and to recognize vault_expired/vault_released at all — previously the strict default Json decoder silently dropped those frames entirely, and VaultEvent had no vault_id field for the case where there's no embedded vault to key off.
|
@icentedward76-sketch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#235: Add a bounded, on-device NotificationDeliveryLog (scheduled/delivered/ suppressed events, vault ID + event type + timestamp only, never balance or beneficiary) on both platforms, plus a debug-only screen to view it (iOS: NotificationDebugView under #if DEBUG, linked from SettingsView; Android: NotificationDebugScreen under BuildConfig.DEBUG, linked from VaultListScreen's top bar).
#234: Push token registration now retries with backoff instead of fire-and-forget. iOS: NotificationService.registerPushToken wraps the call in withRetry and persists a pending token in Keychain on exhausted retries, retried on RootView's next foreground. Android: new PushTokenRegistrar does the same via EncryptedTokenProvider.pendingPushToken, retried from MainActivity.onResume.
#233: Local/scheduled notification bodies (iOS check-in reminder, TTL warning; Android's FCM fallback body) now include a truncated vault ID and, where the data is available client-side, TTL remaining — never balance or beneficiary. Documented in PARITY.md where the FCM payload doesn't carry ttl_remaining today.
#232: A vault_expired/vault_released event applied via the WebSocket is recorded in the delivery log; the push-arrival path on each platform checks it and suppresses a same-event banner delivered shortly after, logging it as suppressed instead. Along the way, fixed Android's VaultEventSocket to use ignoreUnknownKeys (matching ApiClient's config) and to recognize vault_expired/vault_released at all — previously the strict default Json decoder silently dropped those frames entirely, and VaultEvent had no vault_id field for the case where there's no embedded vault to key off.
Summary
Closes #235
Closes #234
Closes #233
Closes #232
Changes
Testing
Parity checklist
This PR does not add, change, or remove any user-facing feature on either
platform — no PARITY.md update needed.
— OR —
This PR adds/changes/removes a user-facing feature. I have updated PARITY.md:
Related issues