-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2023-12-29] [$500] Chat–Name of message owner disappears from DM for a second when delete first message in Offline #32101
Comments
Job added to Upwork: https://www.upwork.com/jobs/~012bb87b742d38cd4b |
Triggered auto assignment to @kevinksullivan ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
@izarutskaya Can you please check the screenshots/videos section, it seemed to have not uploaded correctly. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When we send a message, it will show who sent it, and if we send another message within 5 minutes, it will be grouped and the 2nd (or later) message won't show who sent it anymore. If we delete the first message that has that info while offline, coming back offline makes it disappears along with the first message. What is the root cause of that problem?The logic to decide whether to show the user info is coming from
App/src/libs/ReportActionsUtils.ts Lines 258 to 261 in 48e0c1e
When we go online, the first message that we optimistically delete disappears thanks to So, when we compare the 2nd message with the 1st message sent time, it's obvious that the user info won't show. After the API completes, the 1st message is deleted from the Onyx and the 2nd message is now the 1st message and because the previous action is CREATED action, the user info is shown. But this is not the real root cause. If we see the logic on how we retrieve the previous action, we already skip any action that has a pending delete while ONLINE. App/src/libs/ReportActionsUtils.ts Lines 226 to 237 in 48e0c1e
The problem is, that we memorized
which only rerenders when the props change, but the network status ( App/src/libs/ReportActionsUtils.ts Lines 49 to 53 in 48e0c1e
so even when the network status changes, the component won't rerender. What changes do you think we should make in order to solve the problem?Subscribe the network status in
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat–Name of message owner disappears from DM for a second when delete first message in Offline What is the root cause of that problem?we decide to display the chat-name based on
in App/src/libs/ReportActionsUtils.ts Line 234 in 48e0c1e
we already have the logic to check -> displayAsGroup is not updated immediately. When API What changes do you think we should make in order to solve the problem?We don't need to pass whole Instead of that we should pass
in
and remove this line
then use
For now, we can make sure displayAsGroup will be updated after uses go online because we already listen for network change in ResultScreen.Recording.2023-11-28.at.23.39.15.mov |
Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@Santhosh-Sellavel hi, I think the best practice here is to pass the network status (or any onyx data) to the function. It will ensure every function usage is always reactive to the network changes instead of trying to guess what Onyx we need to subscribe to on the component. Correct example:
It just happens that the @tienifr probably has a performance improvement, but that's not what this issue is about. We should stick to the initial scope of the issue. We previously had a lot of reactive issues in the past because of relying on Onyx.connect inside of util file which I raised here cc: @Julesssss |
Currently, we're relying on |
Thanks both. @bernhardoj I see your comment was mostly ignored, so I'm going to discuss it internally. I will use this private link to bookmark the conversation |
@Julesssss Any update? |
It was discussed here, and it looks like we're aligned on the proposal to not use Onyx.connect. Lets pass required data to components with |
@AmjedNazzal Re-uploaded the video. |
Whatever the solution is, I think we still need to remove |
@tienifr good spot, that sounds reasonable. |
PR ready for review #33207. |
PR merged, awaiting payment |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.15-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-12-29. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@Julesssss, @kevinksullivan, @shubham1206agra, @tienifr Huh... This is 4 days overdue. Who can take care of this? |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@Julesssss, @kevinksullivan, @shubham1206agra, @tienifr Still overdue 6 days?! Let's take care of this! |
@kevinksullivan Bump for the payment here |
@Julesssss, @kevinksullivan, @shubham1206agra, @tienifr 10 days overdue. Is anyone even seeing these? Hello? |
Not overdue, just awaiting payment |
@Julesssss, @kevinksullivan, @shubham1206agra, @tienifr 12 days overdue. Walking. Toward. The. Light... |
Waiting for payment |
Thanks for your patience, everyone! Paid out. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v1.4.4-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @
Action Performed:
Expected Result:
The message has been deleted
Actual Result:
The name of the message owner disappears from conversation for a second when delete first message in Offline and go back to Online.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6292645_1701145916396.The_name_of_the_message_owner_disappears.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @kevinksullivanThe text was updated successfully, but these errors were encountered: