Repository navigation
[HybridApp] Fix 2FA flow - #59154
[HybridApp] Fix 2FA flow#59154
Conversation
|
@trjExpensify I noticed a bug in first flow (dismissed key set to https://github.com/Expensify/Mobile-Expensify/pull/13487 |
|
@allroundexperts 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] |
Nice catch! |
Reviewer Checklist
Screenshots/VideosAndroid: Nativescreen-recording-2025-04-02-at-14154-am_HMxBgQ4p.movScreen.Recording.2025-04-02.at.2.17.07.AM.movAndroid: mWeb ChromeiOS: NativeScreen.Recording.2025-04-02.at.1.50.13.AM.moviOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
@allroundexperts, can you start reviewing this issue, please? |
|
On it @hoangzinh |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #58232 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊
|
| Name | Duration |
|---|---|
| App start time contentAppeared_To_screenTTI | 915.709 ms → 1045.081 ms (+129.372 ms, +14.1%) 🔴 |
| App start time TTI | 1609.342 ms → 1731.665 ms (+122.322 ms, +7.6%) 🔴 |
Show details
| Name | Duration |
|---|---|
| App start time contentAppeared_To_screenTTI | Baseline Mean: 915.709 ms Stdev: 257.828 ms (28.2%) Runs: 590.7555750003085 611.0702080000192 644.5601040003821 677.4670540001243 688.8214630000293 689.6264009997249 692.8274320000783 698.5332500003278 700.6633890001103 707.2521630004048 709.7932350002229 710.6122500002384 711.0670549999923 713.2803830001503 717.6427239999175 718.0356280002743 720.7493279995397 727.5562810003757 729.3267419999465 729.7521510003135 731.041127000004 732.6665169997141 733.1102390000597 734.0737709999084 747.0700319996104 749.3225250001997 750.7104829996824 751.3297969996929 752.6882640002295 752.78886600025 752.9168309997767 754.524841000326 755.3421109998599 766.2021000003442 784.3950279997662 788.0269160000607 791.9284169999883 793.2061520004645 1057.3565830001608 1137.6623980002478 1143.0548940002918 1171.623123000376 1221.6916209999472 1224.1366079999134 1225.3941959999502 1236.5597350001335 1246.090044000186 1251.6120699997991 1254.6064409995452 1255.7467379998416 1264.5746689997613 1267.5765079995617 1268.8085909998044 1277.4160019997507 1296.969468999654 1302.238575000316 1304.5788709996268 1309.943424999714 1326.4404119998217 1387.72511999961 Current Mean: 1045.081 ms Stdev: 268.419 ms (25.7%) Runs: 621.0759990001097 640.4572809999809 654.1528939995915 658.182862999849 658.3896840000525 695.2814020002261 702.5720290001482 705.6199390003458 710.0960039999336 712.8324180003256 713.5959999999031 718.3273790003732 719.5781159996986 720.6392010003328 722.9478449998423 738.273733000271 739.770765000023 745.7187540000305 755.6733339997008 760.2892819996923 775.1092940000817 779.4779239995405 787.488180000335 1050.4410889996216 1086.2558270003647 1109.8358950000256 1120.0655960002914 1151.8441709997132 1162.2286200001836 1176.289145000279 1190.576475000009 1197.7207779996097 1198.512656999752 1232.6696769995615 1237.228674000129 1242.0478569995612 1247.2168840002269 1253.7495240001008 1269.895414000377 1271.440484999679 1271.4548429995775 1277.507063000463 1277.7503650002182 1281.7653280002996 1282.0670060003176 1284.8574550002813 1291.4769860003144 1293.1621220000088 1293.55796799995 1297.030431999825 1301.3883659997955 1303.864794000052 1306.6060889996588 1311.4925769995898 1312.5969270002097 1322.194897999987 1327.3568670004606 1330.9100599996746 1332.4776579998434 1371.7839810000733 |
| App start time TTI | Baseline Mean: 1609.342 ms Stdev: 271.680 ms (16.9%) Runs: 1291.6264009997249 1291.8214630000293 1301.7555750003085 1304.6122500002384 1326.666516999714 1327.793235000223 1328.6427239999175 1336.5601040003821 1344.7493279995397 1359.0670549999923 1365.3267419999465 1369.0700319996104 1379.2803830001503 1382.5332500003278 1389.6633890001103 1392.5562810003757 1402.8274320000783 1403.7521510003135 1410.0737709999084 1426.0702080000192 1428.1102390000597 1428.3421109998599 1432.2521630004048 1433.3225250001997 1440.78886600025 1445.524841000326 1455.0356280002743 1458.7104829996824 1468.9168309997767 1481.4670540001243 1482.2061520004645 1483.0269160000607 1493.041127000004 1493.3950279997662 1497.2021000003442 1503.6882640002295 1509.329796999693 1530.9284169999883 1769.3565830001608 1788.0548940002918 1874.3941959999502 1886.6916209999472 1895.6120699997991 1900.5746689997613 1905.5765079995617 1916.6064409995452 1924.623123000376 1926.090044000186 1936.5597350001335 1945.6623980002478 1974.8085909998044 1989.4160019997507 1990.1366079999134 2007.969468999654 2010.238575000316 2024.5788709996268 2026.4404119998217 2060.943424999714 2097.72511999961 2108.7467379998416 Current Mean: 1731.665 ms Stdev: 284.239 ms (16.4%) Runs: 1262.182862999849 1274.4572809999809 1285.6199390003458 1306.8324180003256 1307.5959999999031 1308.0960039999336 1350.281402000226 1354.5781159996986 1363.770765000023 1367.273733000271 1375.5720290001482 1386.3273790003732 1397.3896840000525 1411.7187540000305 1416.9478449998423 1417.6392010003328 1427.1528939995915 1476.6733339997008 1481.4779239995405 1483.0759990001097 1486.2892819996923 1487.1092940000817 1527.488180000335 1734.0655960002914 1753.8441709997132 1763.2286200001836 1770.576475000009 1787.4410889996216 1801.2558270003647 1807.289145000279 1892.7207779996097 1896.2168840002269 1905.8358950000256 1909.6696769995615 1917.228674000129 1929.4548429995775 1955.440484999679 1960.512656999752 1961.7653280002996 1962.55796799995 1964.0670060003176 1966.0478569995612 1972.7503650002182 1973.030431999825 1973.7495240001008 1977.507063000463 1978.4769860003144 1980.1621220000088 1995.8574550002813 1999.864794000052 2000.895414000377 2007.4925769995898 2017.5969270002097 2030.9100599996746 2031.3568670004606 2031.6060889996588 2046.3883659997955 2062.194897999987 2090.7839810000733 2134.4776579998434 |
Meaningless Changes To Duration
Show entries
| Name | Duration |
|---|---|
| App start time nativeLaunchEnd_To_appCreationStart | 80.867 ms → 79.933 ms (-0.933 ms, -1.2%) |
| App start time nativeLaunch | 26.203 ms → 26.552 ms (+0.348 ms, +1.3%) |
| App start time appCreationEnd_To_contentAppeared | 514.475 ms → 504.345 ms (-10.130 ms, -2.0%) |
| App start time appCreation | 67.897 ms → 69.983 ms (+2.087 ms, +3.1%) |
| App start time runJsBundle | 318.200 ms → 311.850 ms (-6.350 ms, -2.0%) |
| App start time regularAppStart | 0.021 ms → 0.020 ms (-0.001 ms, -3.0%) |
| App start time (CPU) | 157.472 % → 155.192 % (-2.280 %, -1.4%) |
| App start time (FPS) | 59.970 FPS → 60.000 FPS (+0.030 FPS, ±0.0%) |
| App start time (RAM) | 381.342 MB → 384.419 MB (+3.077 MB, +0.8%) |
| App start time (CPU/JS) | 0.000 % → 0.000 % |
| App start time (CPU/UI) | 28.726 % → 27.995 % (-0.732 %, -2.5%) |
| Open search router TTI Open Search Router TTI | 1392.694 ms → 1345.656 ms (-47.038 ms, -3.4%) |
| Open search router TTI Load Search Options | 171.641 ms → 171.765 ms (+0.124 ms, ±0.0%) |
| Open search router TTI (CPU) | 149.349 % → 147.114 % (-2.236 %, -1.5%) |
| Open search router TTI (FPS) | 60.000 FPS → 60.000 FPS |
| Open search router TTI (RAM) | 410.042 MB → 408.789 MB (-1.252 MB, ±0.0%) |
| Open search router TTI (CPU/JS) | 0.000 % → 0.000 % |
| Open search router TTI (CPU/UI) | 25.257 % → 24.388 % (-0.869 %, -3.4%) |
| Report typing Composer typing rerender count | 1.000 renders → 1.000 renders |
| Report typing Message sent | 496.352 ms → 494.358 ms (-1.994 ms, ±0.0%) |
| Report typing (CPU) | 101.371 % → 101.351 % (-0.020 %, ±0.0%) |
| Report typing (FPS) | 60.000 FPS → 60.000 FPS |
| Report typing (RAM) | 470.974 MB → 471.043 MB (+0.069 MB, ±0.0%) |
| Report typing (CPU/JS) | 0.000 % → 0.000 % |
| Report typing (CPU/UI) | 21.990 % → 22.002 % (+0.012 %, ±0.0%) |
| Chat opening Chat TTI | 975.953 ms → 982.958 ms (+7.005 ms, +0.7%) |
| Chat opening (CPU) | 159.434 % → 158.995 % (-0.439 %, ±0.0%) |
| Chat opening (FPS) | 60.000 FPS → 60.000 FPS |
| Chat opening (RAM) | 409.512 MB → 408.418 MB (-1.094 MB, ±0.0%) |
| Chat opening (CPU/JS) | 0.000 % → 0.000 % |
| Chat opening (CPU/UI) | 31.620 % → 31.276 % (-0.344 %, -1.1%) |
undefined
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.1.23-1 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.23-7 🚀
|
Explanation of Change
This change fixes 2FA flow on HybridApp. We had two issues that were breaking it:
a) OldDot's 2FA covers NewDot's modal
b) OlDot's 2FA is opened before NewDot's modal so NewDot dismisses it. OldDot treats such situation as 2FA flow failure and performs mandatory sign out.
Fixed Issues
$ #58232 (comment)
PROPOSAL:
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13495
Tests
Pre-configuration:
Flow where new account has dismissed key set to
false(Should see NewDot app when opens HybridApp)Flow where the account has dismissed key set to
true(Should see OldDot app when opens HybridApp)Pre-configuration to have dismissed key set to
true:Pre-configuration:
Switch to Expensify Classic. Now HybridApp will show OldDot every time.Offline tests
QA Steps
Same as tests
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))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
Videos are created only on HybridApp as this change impacts only HybridApp
Android: Native
HybridApp:
Part 1:
uptomagiccode.mov
Part 2:
uptosecondmagiccode.mov
Part 3:
lastpart.mov
Android: mWeb Chrome
iOS: Native
HybridApp:
Part 1:
iosuptofirstmagiccode.mov
Part 2:
iosuptobundling.mov
Part 3:
iosfinal.mov
Flow where dismissed key === true
Part 1:
olddot2fa1.mov
Part 2:
olddot2fa.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop