fix: E2EI flow can be interrupted - WPB-23171 🍒#4397
Merged
Conversation
|
netbe
approved these changes
Mar 5, 2026
Contributor
Author
Test Results6 295 tests 6 268 ✅ 8m 15s ⏱️ Results for commit 8608599. Summary: workflow run #22712075129 |
zenkins
approved these changes
Mar 6, 2026
Collaborator
zenkins
left a comment
There was a problem hiding this comment.
✅ Auto-approved cherry-pick PR 🍒.
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.



This PR was automatically cherry-picked based on the following PR:
Original PR description:
Issue
When logging in to an account that requires End-To-End-Identity, if the user interrupts the E2EI enrollment flow (either put app in BG then FG, or restart app) then the user can bypass the flow and end up in a state where they should have E2EI but don't and can't get it.
The logic to determine what is the top level app state (e.g authenticated -> go to conversation list, or e2ei required -> go to e2ei flow) is spread out in various places and is a fragile network of competing code paths. This broke at some point due to the various refactoring made to session loading and authentication flows.
The solution was to go step by step correcting various regressions, which I won't explain here but instead via comments on the changes.
Testing
There are three main flows to test:
Checklist
[WPB-XXX].UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: