You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-06-05] [$250] Android - Composer - Draft text reappears after clearing the compose box and navigating back #41499
Version Number: 1.4.69-2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Open Expensify app
Open a chat
Send a message
Type something inside the compose box but don't send it
Hold on the sent message on step 3 and tap on reply in thread
Tap on the three dot menu and tap on leave
Clear the draft text inside the compose box
Tap on the device back button
Expected Result:
The compose box doesn't contain any draft text
Actual Result:
The compose box contains the previously cleared draft text
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@kadiealexander FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
So, now there are 2 same reports in the navigation stack. If we clear the composer message from the 2nd report screen and go back, the 1st report screen will still show the composer message. It's because the onyx draft message and the composer message state aren't synchronized.
This doesn't happen on other platforms because we have an effect to sync it.
changed the title [-]Android - Composer - Draft text reappears after clearing the compose box and navigating back[/-][+][$250] Android - Composer - Draft text reappears after clearing the compose box and navigating back[/+]on May 6, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.76-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
I couldn't trace the offending PR.
[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
The regression step should be enough.
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Open any chat
Send a message
Type a message but don't send it
Right-click/long-press the sent message and choose Reply in the thread
Press the three-dot in the thread and choose Leave
Verify you are navigated to the chat from step 1 Only for mWeb/iOS/Android
Activity
melvin-bot commentedon May 2, 2024
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon May 2, 2024
@kadiealexander FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
lanitochka17 commentedon May 2, 2024
We think that this bug might be related to #vip-vsp
bernhardoj commentedon May 3, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The draft text isn't cleared when we delete the message from another report screen.
What is the root cause of that problem?
When we leave a thread, it will navigate to the most recent report (except the current report).
App/src/libs/actions/Report.ts
Lines 2508 to 2515 in 7483d10
So, now there are 2 same reports in the navigation stack. If we clear the composer message from the 2nd report screen and go back, the 1st report screen will still show the composer message. It's because the onyx draft message and the composer message state aren't synchronized.
This doesn't happen on other platforms because we have an effect to sync it.
App/src/pages/home/report/ReportActionCompose/SilentCommentUpdater/index.tsx
Lines 25 to 37 in 7483d10
But we don't have it for Android (it was removed in #32799)
App/src/pages/home/report/ReportActionCompose/SilentCommentUpdater/index.android.tsx
Lines 16 to 23 in 7483d10
What changes do you think we should make in order to solve the problem?
We can update the navigate to the most recent report logic to just use goBack with the report screen as the fallback
App/src/libs/actions/Report.ts
Lines 2508 to 2515 in 7483d10
This will make sure we won't have 2 same report screens in the stack, so we don't need to sync the composer message state.
[-]Android - Composer - Draft text reappears after clearing the compose box and navigating back[/-][+][$250] Android - Composer - Draft text reappears after clearing the compose box and navigating back[/+]melvin-bot commentedon May 6, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01321f2f43059fc592
melvin-bot commentedon May 6, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)22 remaining items
melvin-bot commentedon May 29, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.76-7 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 2024-06-05. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 29, 2024
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:
kadiealexander commentedon Jun 6, 2024
Payouts due:
Upwork job is here.
kadiealexander commentedon Jun 6, 2024
@mollfpr please don't forget about the checklist!
kadiealexander commentedon Jun 10, 2024
@mollfpr bump!
mollfpr commentedon Jun 10, 2024
Sorry for the delay 🙏
I couldn't trace the offending PR.
The regression step should be enough.
Only for mWeb/iOS/Android
kadiealexander commentedon Jun 11, 2024
Payment summary here, please request payment via NewDot.
JmillsExpensify commentedon Jun 11, 2024
$250 approved for @mollfpr