#2 - Add device management feature#89704
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@dukenv0307 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] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
#89648 fixed:
User is not signed out immediately after revoking current session and The logged-in device is not displayed after verifying a new account look related: When we log in as a new user, there will be 2 fields in the
and only the second one with partnerID 83 will be shown, this is the "Unknown device". Is the partnerID 1 the current session device? After we verify the account, the second one with partnerID 83 is removed from the For Device is removed after dismissing the error and clearing cache, it's not a bug; it's how "Simulate failing network requests" works. The request was still sent successfully, but failed intentionally on the client. |
We should fix this so that it displays the device name correctly when you first sign up. Let's pass Does this melvinbot proposal fix this issue? This is an issue on the backend. The
Agreed |
|
@arosiclair added deviceInfo param to both SignUpUser and ValidateSecondaryLogin.
If we use the MelvinBot proposal, it will call a SignOut API which eventually logs out the user. I think we can just call App/src/libs/Reauthentication.ts Lines 195 to 200 in 39d1d17 WDYT? |
|
Sounds good to me 👍 |
|
Done |
Thanks, I still need to deploy a backend change to get these to work but we don't need to block on that for this PR. @dukenv0307 ready for your review |
| if (login.partnerUserID !== autoGeneratedLogin) { | ||
| return; | ||
| } | ||
| redirectToSignIn(); |
There was a problem hiding this comment.
I think it can be Log.info('Redirecting to Sign In because the current device was revoked');
There was a problem hiding this comment.
Sounds good to me. Let's just add this in a quick follow up
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-05-13.at.10.03.04.movAndroid: mWeb ChromeScreen.Recording.2026-05-13.at.09.48.04.moviOS: HybridAppScreen.Recording.2026-05-13.at.09.51.15.moviOS: mWeb SafariScreen.Recording.2026-05-13.at.09.46.32.movMacOS: Chrome / SafariScreen.Recording.2026-05-13.at.09.35.10.movScreen.Recording.2026-05-13.at.09.44.58.mov |
| if (login.partnerUserID !== autoGeneratedLogin) { | ||
| return; | ||
| } | ||
| redirectToSignIn(); |
There was a problem hiding this comment.
Sounds good to me. Let's just add this in a quick follow up
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @arosiclair 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.3.74-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.74-7 🚀
|


Explanation of Change
Fixed Issues
$ #86580
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Note
Known issues:
Prerequisite: logged in to multiple devices with the same account
Success case:
Failure case:
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
web.mp4