[HybridApp] Necessary copilot changes#54296
Conversation
|
@chiragsalian 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] |
|
CC @dangrous because HybridApp permissions are required to test and review related PR |
dangrous
left a comment
There was a problem hiding this comment.
I think this makes sense but we need to fix those eslint errors. Will try to test with the Mobile-E changes shortly!
|
Will work on the mentioned BE change and then circle back to this one - unless we don't need that for this? |
|
Posted on that other PR too, but the BE update is on staging... will there be changes needed to this one? |
# Conflicts: # src/libs/actions/Session/index.ts
dangrous
left a comment
There was a problem hiding this comment.
tiny edit, otherwise this one looks good to me! Once that change is made, should we go ahead and merge? How does this work with https://github.com/Expensify/Mobile-Expensify/pull/13289?
Co-authored-by: Daniel Gale-Rosen <5487802+dangrous@users.noreply.github.com>
I think we should merge both changes to make the feature work correctly. Both PRs are ready so we can merge them at the same time |
dangrous
left a comment
There was a problem hiding this comment.
This looks good to me, @chiragsalian do you want to take a look when you can?
There was a problem hiding this comment.
Code LGTM. I haven't tested it out so the next step was for me to check if QA steps were filled out well and i saw,
// TODO: These must be filled out, or the issue title must include "[No QA]."
you'll need to fill that out @war-in so that QA tests your PR properly. Please fill - tests, offline tests, and QA steps.
|
@chiragsalian Test steps added! I put them in the OD PR but I agree it makes sense to put them here too, thank you 🙏 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
So interesting, i haven't seen someone else begin test steps with the number 0. All cool though, just found it interesting 🙂 |
|
Hi @war-in, sorry i had to revert your PR. It failed some of our workflows. Can you recreate your PR (you can just revert the revert PR i created), update it with main and ensure the workflows succeed. It looks like its failed due to a race condition where another PR was merged before yours with some new tests. |
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.0.87-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.87-3 🚀
|
| openApp(); | ||
|
|
||
| NativeModules.HybridAppModule.switchAccount(email); | ||
| openApp().then(() => NativeModules.HybridAppModule.switchAccount(email, restrictedToken, policyID, String(previousAccountID))); |
There was a problem hiding this comment.
-NativeModules.HybridAppModule.switchAccount(email, restrictedToken, policyID, String(previousAccountID)));
+NativeModules.HybridAppModule?.switchAccount(email, restrictedToken, policyID, String(previousAccountID)));I think we gotta check here if HybridAppModule exists before calling the function like we do everywhere else on the App.
This is crashing on web on dev and throws an error on production when a user switches to their main account from being a copilot.
Screen.Recording.2025-02-04.at.9.27.52.AM.mov
There was a problem hiding this comment.
ah okay thanks! is there an issue for that crash?
There was a problem hiding this comment.
oh hey it also crashes on connecting as delegate. Your fix works there too. @c3024 can you create a PR if you haven't already?
There was a problem hiding this comment.
No, there is no issue created for this. I found this when I was checking something else. I am creating a PR. Thanks!
Explanation of Change
Related OD PR: https://github.com/Expensify/Mobile-Expensify/pull/13289
Fixed Issues
$ #51264
PROPOSAL:
Tests
Try New ExperienceorSwitch to Expensify Classic)Offline tests
QA Steps
Try New ExperienceorSwitch to Expensify Classic)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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop