Show No access Modal when Copilot tries to add new contact method on behalf of owner.#50643
Conversation
|
@c3024 ESLint is failing for already implemented code using withOnyx. And this PR is not any how related with the fail here. |
I think this should be dealt in a different PR. |
Reviewer Checklist
Screenshots/VideosAndroid: NativecopilotAndroid.mp4Android: mWeb ChromecopilotAndroidmWeb.mp4iOS: NativecopilotiOS.mp4iOS: mWeb SafaricopilotiOSmWeb.mp4MacOS: Chrome / SafaricopilotChrome.mp4MacOS: DesktopcopilotDesktop.mp4 |
|
Hey @ChavdaSachin, unfortunately a check was modified since you raised this PR that causes a failure: https://github.com/Expensify/App/actions/runs/11293174238/job/31410713217?pr=50643#step:4:24 |
hi @Julesssss, for the fail here, We need to migrate the page to useOnyx. And as @c3024 suggested here we should handle it as a separate PR. IMO you could raise a new issue and assign me along with @c3024 and we will raise a quick PR. And put current issue on hold for the migration. |
|
@Julesssss looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Ignoring failed check as mentioned here. |
|
✋ 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/Julesssss in version: 9.0.49-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.49-2 🚀
|
Hey @Julesssss I kinda he useOnyx migration ready, just waiting for you to create a GH. |
Hi @ChavdaSachin, could you explain again? thanks 🙂 |
|
We had a discussion to handle onyx migration as a separate PR. |
|
Oh yes I agree with that. We can use this Github |
|
Works for me |
| onSubmit={handleValidateMagicCode} | ||
| submitButtonText={translate('common.add')} | ||
| style={[styles.flexGrow1, styles.mh5]} | ||
| <AccessOrNotFoundWrapper shouldBeBlocked={isActingAsDelegate}> |
There was a problem hiding this comment.
This change has introduced a bug in #51189 , we should have just early returned instead of using AccessOrNotFoundWrapper.
|
Just like we display no access modal while adding a new contact method, we also needed to display no access modal during deletion of a contact method. We addressed this in #59093 |
Show No access Modal when Copilot tries to add new contact method on behalf of owner.
Details
As per App's philosophy we do not allow certain actions to be performed by a copilot on behalf of owner add new contact method is one of them.
When copilot completes add new contact method flow on behalf of owner - BE return an error, this PR implements FE handling for the same by not allowing copilot to start the flow and provide explanation in form of a Modal.
Fixed Issues
$ #50063
PROPOSAL: #50063 (comment)
Tests
Same QA test
Offline tests
Same ad QA test.
QA Steps
Prerequisites: Enable Copilot Beta, and perform following steps as a copilot. To add account as copilot see link.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Screen.Recording.2024-10-11.at.5.46.46.PM.mov
Android: mWeb Chrome
Screen.Recording.2024-10-11.at.5.48.19.PM.mov
iOS: Native
Screen.Recording.2024-10-11.at.6.33.07.PM.mov
iOS: mWeb Safari
Screen.Recording.2024-10-11.at.6.41.00.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-10-11.at.5.45.14.PM.mov
MacOS: Desktop
Screen.Recording.2024-10-11.at.6.09.30.PM.mov