Allow optimistic assignee chat reports#22778
Conversation
|
Been testing some changes and realized some additional BE changes are required https://github.com/Expensify/Web-Expensify/pull/38300 |
|
I haven't been able to reproduce the console error after merging main on iOS or mWeb but I'm not sure since my android emulator isn't working. Also, it's fine to not worry about a failed task right now |
|
This occurs on the main too, so its not blocking this. |
Santhosh-Sellavel
left a comment
There was a problem hiding this comment.
LGTM, thanks!
|
@cristipaval 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] |
|
Wooo!! Cc @jasperhuangg we're ready to go here |
jasperhuangg
left a comment
There was a problem hiding this comment.
nicely done! tests well and don't have any qualms with the code
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@thienlnam @jasperhuangg Unable to select "Assignee" after creating task due to console warning on IOS |
|
Hmm yeah, apparently when first created the passed report is empty so it doesn't work |
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.54-0 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.54-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.54-13 🚀
|
|
👋 is the bug report #25956 a regression from this PR? Curious if we should fix it separately (on the GH linked above) or re-open the parent GH/PR here that this PR touched? |
|
I guess follow-up would be the case, cc: @thienlnam can help here! |
|
Since the reported bug was over a week from when this PR was deployed, let's go ahead and handle it separately in that issue |
| value: { | ||
| reportName, | ||
| managerID: assigneeAccountID || report.managerID, | ||
| managerEmail: assigneeEmail || report.managerEmail, |
There was a problem hiding this comment.
pendingFields wasn't added which caused the below bug in offline usecases - #25956
| } | ||
| const reportID = chat ? chat.reportID : newChat.reportID; | ||
|
|
||
| setAssigneeChatReport(chatReport); |
There was a problem hiding this comment.
This line introduces a bug here where the user chose a brand new assignee (whom they've never chatted with before), and then chose another old assignee, leading to the incorrect merging of isOptimisticReport into the old assignee's account.
… assignee
cc @jasperhuangg
Details
Fixed Issues
$ #24546
$ https://github.com/Expensify/Expensify/issues/294203
PROPOSAL:
Tests
Offline tests
Same as online tests
QA Steps
Create a task
Assign someone you have not talked to before (but is still a valid account)
Verify it creates successfully
Verify the chat report between you and the assignee is also created successfully and has the correct message in the LHN
Create a task
Choose to share in that same chat report, but choose a different assignee that you haven't chatted with before
Verify that all the reports are created successfully
The task report
The chat report between you and the assignee
And the share somewhere report is updated correctly
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2023-07-26.at.5.22.14.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-07-26.at.5.23.11.PM.mov
Mobile Web - Safari
Screen.Recording.2023-07-26.at.5.34.17.PM.mov
Desktop
Screen.Recording.2023-07-26.at.5.36.44.PM.mov
iOS
Android