[BWA-99] feat: add next TOTP code preview to item list when countdown is near expiry#2565
Draft
[BWA-99] feat: add next TOTP code preview to item list when countdown is near expiry#2565
Conversation
… is near expiry Adds a "Show next code" toggle to Authenticator Settings (Vault section). When enabled and the countdown timer drops below 10 seconds, each item row displays the upcoming TOTP code below the current one. Next-code generation uses a date-parameterized TOTPService overload; failures are silently suppressed so the current code always shows.
… is near expiry Adds a "Show next code" toggle to Authenticator Settings (Vault section). When enabled and the countdown timer drops below 10 seconds, each item row displays the upcoming TOTP code below the current one. Next-code generation uses a date-parameterized TOTPService overload; failures are silently suppressed so the current code always shows. Seeds isNearExpiration on view appear to avoid a first-render delay when a row opens with < 10s already elapsed.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2565 +/- ##
==========================================
- Coverage 87.17% 86.10% -1.08%
==========================================
Files 1885 2117 +232
Lines 166564 181606 +15042
==========================================
+ Hits 145199 156364 +11165
- Misses 21365 25242 +3877 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
🎟️ Tracking
BWA-99
📔 Objective
Adds a "Show next code" toggle to the Vault section of Authenticator Settings. When enabled and the TOTP countdown drops below 10 seconds, each item row displays the upcoming next-period code (smaller, below the current code), giving users a heads-up before the active code expires.
Implementation highlights:
showNextCode: Boolpersisted inAppSettingsStore(UserDefaults)TOTPService.getTotpCode(for:date:)overload generates the next-period code via the existing SDKgenerateTOTPCode(for:date:)path — no new SDK surfacerefreshTotpCodesinAuthenticatorItemRepositoryfetches both current and next code; next-code failures are silently suppressed (try?) so the current code always rendersTOTPCountdownTimerexposes@Published secondsRemaining;TOTPCountdownTimerViewpropagates anisNearExpirationbinding (seeded on.onAppearto avoid first-render delay) toItemListItemRowView.totpand.sharedTotpitem types📸 Screenshots