-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$500] Thread – Draft message disappears after page view finishes loading. #31705
Comments
Job added to Upwork: https://www.upwork.com/jobs/~019569b231b07825eb |
Triggered auto assignment to @trjExpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When the App/src/pages/home/ReportScreen.js Line 452 in fc14a3f
so when isReportReadyForDisplay is true, we get the draft value from What changes do you think we should make in order to solve the problem?in ReportScreen, when isReportReadyForDisplay is false, we still have the optimistic reportId in route, we can get it and pass to
Then use it in |
ProposalPlease re-state the problemThread – Draft of message disappears after Thread page upload. What is root cause?There are two issue here:
Unlike normal comments, Screen.Recording.2023-11-22.at.8.56.34.PM.movWhat changes should be made to fix this?Options for first issueOption 1 Option 2 Solution for second issueWe can pass the App/src/pages/home/ReportScreen.js Line 452 in fc14a3f
<ReportFooter isReportReadyForDisplay={false} report={{reportID: getReportID(route)}} /> This prevents the need for adding any additional prop as well. |
Interesting! I can reproduce this reliably! |
Awaiting your input @thesahindia! |
Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@thesahindia Which option in the proposal should we go with for the first issue? |
@puneetlath, @trjExpensify, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Bump @thesahindia on the question! |
I think option 1. cc: @puneetlath for thoughts. |
@puneetlath @trjExpensify @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Yup! I think it's #vip-vsb this one as threads related, so popping it there while we look into it again. Can anyone reproduce? I tried on prod and I was able to get a slow enough load of an expense thread to repro it, but on staging I haven't been able to run into a slow enough load to be able to. CC: @esh-g |
@trjExpensify The problem still is present. It just happens if you have really slow internet or you are offline and then go online. Screen.Recording.2024-03-05.at.5.55.36.PM.mov |
ProposalWhat is the root cause of the problem?The root cause is that when creating a money request offline, we generate an optimistic transaction report but when the money request is actually created after going online, the optimistic report is no longer relevant as the report that backend returns has an entirely new id and basically the optimistic report never gets created on the backend, thus we see the composer disappear when we go online as it generates an Screen.Recording.2024-03-05.at.6.04.32.PM.movI think this was done as a compromise to have an optimistic report to show until it was created on the backend. But this leads to issues like messages sent on the optimistic report being deleted as well. What changes should be made to fix this?We should disable the composer for the optimistic transaction report because if the optimistic report never exists on the backend, it should never be able to be written to by the user. Therefore, we can hide the composer if there is a pending create action on the money report the same way we do if there is a pending delete action here: Lines 4518 to 4521 in 9411a08
This would disable the composer for the optimistic report just like it does when we go online so that the user isn't sending messages to a report that will never have any existence on the backend. |
The problem I think has changed a little from it's root cause... So I think a new solution as proposed above is needed. |
Oh wow, so the composer disappears completely as well?
I don't really like the sound of that. To the user, they should be able to comment on reports when offline with no difference. |
The childReportID issue should get fixed by this PR #37232. Once that's fixed, will we still be saving drafts on reportID 0? |
Ah, at that point the draft message nor the composer would disappear? 🤔 Should we wait for that PR to be done and retest this then? |
Hit prod 5 hours ago. @esh-g we're ready for a re-test. |
Bump, @esh-g. If you think this issue is still present, do let us know! In the meantime, I'm going to add the retest weekly label for Applause. |
Awaiting the Applause retest. |
Issue not reproducible during KI retests. (First week) |
Sounds like this is no longer happening so I'm going to close. Feel free to let me know if I'm mistaken! |
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: 1.4.2.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:
Draft message should remain in the compose box.
Actual Result:
Draft message disappears after the request page view loads.
Workaround:
Wait until it loads before typing.
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6287214_1700660919011.Draft_of_message_disappears.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: