Repository navigation
CCCT-2790 Add Journey-Aware Analytics To Backup Code And Email Flows #3957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Jignesh-dimagi
wants to merge
6
commits into
master
from
ccct-2790-analytics-backupcode-email-recovery
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c71a495
CCCT-2790 Add the account security analytics event [AI]
Jignesh-dimagi 0ac20fb
CCCT-2790 Add analytics to the change backup code flow [AI]
Jignesh-dimagi e8f1894
CCCT-2790 Add analytics to the backup code recovery flows [AI]
Jignesh-dimagi 1fef926
CCCT-2790 Add analytics to the periodic backup code reminders [AI]
Jignesh-dimagi 30354fd
CCCT-2790 Add analytics to the email change flow [AI]
Jignesh-dimagi 04fde8b
CCCT-2790 Fix test call sites for the new backup code nav argument [AI]
Jignesh-dimagi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
13 changes: 9 additions & 4 deletions
13
app/src/org/commcare/fragments/personalId/BackupCodeWorkflow.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,16 @@ | ||
| package org.commcare.fragments.personalId | ||
|
|
||
| /** | ||
| * Identifies which backup-code flow is being executed. | ||
| * Why the user is on a backup-code screen. Passed as a nav argument so the confirm and | ||
| * set-new-code screens can report which journey they belong to, which their other arguments | ||
| * cannot tell them. | ||
| * | ||
| * - [CONFIRM_BACKUP_CODE_CHANGE_CODE]: user is on the Manage Profile screen and wants to change | ||
| * their backup code; must confirm the current code first before setting a new one. | ||
| * - [CHANGE_BACKUP_CODE]: user chose to change their backup code from Manage Profile. | ||
| * - [EMAIL_CHANGE]: user is changing their email and must confirm the current code first. | ||
| * - [FORGOT_BACKUP_CODE]: user forgot their code and recovered via email OTP. | ||
| */ | ||
| enum class BackupCodeWorkflow { | ||
| CONFIRM_BACKUP_CODE_CHANGE_CODE, | ||
| CHANGE_BACKUP_CODE, | ||
| EMAIL_CHANGE, | ||
| FORGOT_BACKUP_CODE, | ||
| } |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: dimagi/commcare-android
Length of output: 10687
🏁 Script executed:
Repository: dimagi/commcare-android
Length of output: 6892
🏁 Script executed:
Repository: dimagi/commcare-android
Length of output: 42435
🏁 Script executed:
Repository: dimagi/commcare-android
Length of output: 10841
Carry
PENDING_BACKUP_CODEthrough verification and set-new-code.PENDING_BACKUP_CODEreaches the shared verification screen, but the screen discards it and reportsrecovery_existing_user. It also passesBackupCodeWorkflow.FORGOT_BACKUP_CODE, so the set-new-code screen reports the same incorrect workflow. Analytics cannot recover an argument that navigation never carries.Add the workflow argument to the verification destination and pass it from the send-OTP screen. Add the pending backup-code workflow and map it to
recovery_pending_code. Convert it to the matchingBackupCodeWorkflowbefore navigating to set-new-code.Suggested fix
🤖 Prompt for AI Agents