[Internal QA] Add missed cleanup after login as another user#86673
[Internal QA] Add missed cleanup after login as another user#86673aldo-expensify merged 2 commits intoExpensify:mainfrom
Conversation
|
@sobitneupane Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@tgolen Do you want to test this? |
|
Sure, I will test it in a few minutes. |
|
I couldn't reproduce the original bug anymore, so you've either fixed it, or it's difficult to reproduce. |
|
It's kinda difficult to reproduce, I noticed that I can only reproduce if I first supportal into a heavy account then supportal into another lighter account. The If you are still unable to reproduce, I think we should still merge the PR assuming the RCA and solution makes sense. |
|
Yep, I think we should go ahead and merge this, even if we can't reproduce it. Thanks! |
|
@tgolen Let's merge this |
|
I think this still needs a review from @jjcoffee |
|
Since this is Internal QA, does this need a full review or just blind approval? |
|
@jjcoffee You can review the code. As for testing you can try this alternative test to verify things didn't break
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-app-2026-04-07_10.34.11.mp4Android: mWeb Chromeandroid-chrome-2026-04-07_10.37.43.mp4iOS: HybridAppios-app-2026-04-07_10.20.54.mp4iOS: mWeb Safariios-safari-2026-04-07_10.22.49.mp4MacOS: Chrome / Safaridesktop-chrome-2026-04-07_10.16.15.mp4 |
|
@s77rt Can you merge main to see if it fixes the perf test? |
jjcoffee
left a comment
There was a problem hiding this comment.
LGTM! Tests well and code change makes sense.
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #83698 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 @aldo-expensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.3.55-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is an internal bug fix that adds a session cleanup callback during supportal transitions. It doesn't affect any user-facing features, UI, settings, or workflows documented in the help site. |
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.3.57-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site documentation changes are required for this PR. This change is purely internal — it adds a |
Explanation of Change
Usually when a user login we set a cleanup function
App/src/libs/Navigation/AppNavigator/AuthScreensInitHandler.tsx
Lines 145 to 147 in 71ea695
However, when we have a session already and we login as another user (this happens on supportal - and maybe on delegate access too) then that cleanup logic is not set and we return early
App/src/libs/Navigation/AppNavigator/AuthScreensInitHandler.tsx
Line 99 in 71ea695
Now, if you login as another user (supportal into another account) then there may be a race condition where the requests of the previous user are still ongoing and their onyx data will merge afterwards. At this point although you are logged in as the second user, the UI may show some data from the previous user.
This PR adds the necessary cleanup logic so that when you supportal into another account, the requests of the previous account are cleared.
Fixed Issues
$ #83698
PROPOSAL:
Tests
Offline tests
QA Steps
Internal
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari