Feature/android parity 196 199 - #323
Open
CHEF-SAVY wants to merge 4 commits into
Open
Conversation
… into the accept API call
|
@CHEF-SAVY 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.
Android feature parity: acceptance token, reminder timing, notification action, widget refresh
Four Android parity gaps from
PARITY.md, one commit each.PARITY.mdrows are updatedalongside each change.
1. Beneficiary acceptance token (#196)
Acceptance-link parsing lived inline in
MainActivityand only the vault ID was treated asa first-class value. Moved it into
VaultDeepLinkParser.parseBeneficiaryAccept(), which nowreturns a
BeneficiaryAcceptLink(vaultId, token)— the token is validated against the sameallowlist as vault IDs and forwarded through
AcceptanceViewModelinto thePOST /vaults/{id}/acceptrequest body.MainActivity.extractBeneficiaryAcceptdelegates tothe parser, so
BeneficiaryAcceptanceTestkeeps covering the same behaviour.Added
BeneficiaryAcceptTokenForwardingTest, a regression test that walks the token from theincoming
Uriall the way to the API call and to the serialized request body.2. Check-in reminder lead-time scaling (#197)
Ported the formula from iOS
NotificationService.scheduleCheckInReminder:min(checkInInterval / 10, 24h)before expiry, floored at 60swhen it would actually land after the primary one
NotificationHelper.scheduleCheckInReminder()enqueues both as uniqueWorkManagerwork keyedby vault ID with
REPLACE, so any TTL change (a check-in, a socket update) simply re-times thepending reminders; a non-active vault cancels them. Delivery is a small
CheckInReminderWorker.VaultViewModelre-schedules on vault load and on every in-place vault update.NotificationHelperTestcovers short, medium and long TTL windows, the 24h lead-time cap, the60s floor, and when the secondary reminder is/isn't scheduled.
3. Actionable "Check In" notification (#198)
Reminder notifications on the
ttl_reminderschannel now carry an inline Check In action.The action reuses the existing
ethosprotocol://vault/{id}/check-indeep link, so it opensVaultDeepLinkScreen's check-in branch — the same biometric-gated path as the in-app button —rather than firing the API from a receiver, which would let anyone holding the device extend a
vault from the lock screen. This matches iOS's
.authenticationRequiredonCHECK_IN_ACTION.The action's
PendingIntentuses a request code offset clear of both the content intent andevery vault notification ID, so the two intents can't be collapsed by
FLAG_UPDATE_CURRENT.CheckInNotificationActionTestcovers the action wiring, its deep-link target, the request-codeseparation, and that a vault-less notification carries no action.
4. TTL-aware widget refresh policy (#199)
Ported the urgency tiers from iOS
TTLWidget.computeNextUpdateIntervalintoVaultWidgetUpdateWorker.determineUpdateInterval: 15m at ≥6h, 10m at 1–6h, 5m at 30m–1h, 2munder 30m. The existing 60m tier is kept for vaults more than a day from expiry (Android-only —
that vault moves too slowly to be worth frequent wake-ups).
Because WorkManager floors periodic work at 15 minutes, the worker now schedules itself as
unique one-time work with an initial delay, re-queuing after every run — the direct analogue of
iOS's
.after(nextUpdate)timeline policy. Rescheduling happens on every path, including APIerrors and empty vault lists, so a single failure can't stop the widget updating for good.
VaultWidgetUpdateWorkerScheduleTestcovers each tier boundary plus near-expiry and long-TTLvaults.
Notes
Tests are added but not run — there's no reliable way to execute the Android test suite in this
environment right now.
Closes #196
Closes #197
Closes #198
Closes #199