-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Expense - LHN does not show expense preview when there is a thread with deleted root message #37775
Comments
Triggered auto assignment to @abekkala ( |
@abekkala 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 |
We think that this bug might be related to #wave5 |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
Job added to Upwork: https://www.upwork.com/jobs/~012901a33cf428c32c |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Expense - LHN does not show expense preview when there is a thread with deleted root message What is the root cause of that problem?If the previous message is a deleted parent chat that contains a thread, the LHN will check and display the deleted message instead of App/src/libs/OptionsListUtils.ts Lines 577 to 579 in 2979e3c
What changes do you think we should make in order to solve the problem?If we want the previously deleted message to behave the same as other messages after creating a new money request, we can avoid entering the App/src/libs/OptionsListUtils.ts Line 577 in 2979e3c
To:
Or enter the condition only if report?.lastVisibleActionCreated is the most recent or equal to lastReportAction?.created. Please note that whether the previous message is a deleted chat or other chat types, the text preview for Request Money will be removed after page refresh, because we are not modifying the sorting algorithm. In my opinion, the ideal solution is to actually move the ReportActionPreview as described in my previous suggestion (see alternative solution) What alternative solutions did you explore? (Optional)I believe the problem is linked to the reportpreview position. It may be best to postpone addressing this as it could be resolved in #37245. If deemed separate, I suggest the same solution for this issue. |
@wildan-m Thanks for the heads up! If you have time and don't mind, it'd be great if you could post a proposal specific to this issue as it does sound different to me. |
@jjcoffee, please check the position of the report preview as it is currently stationary due to an active report preview. The last message in the LHN is determined by this sorting algorithm. App/src/libs/ReportActionsUtils.ts Lines 220 to 225 in a0e444e
Please test this branch in offline mode, as it requires backend adjustments. |
Hmm on retesting this, now I'm getting that step 6 also doesn't show the expense preview in LHN, i.e. after an initial request, send a message, then make another request, and LHN still just shows the message. Weirdly, I seem to get the expense message in the LHN "after a while" or after signing out/in. |
@wildan-m The other issue you've proposed for is quite different, so a proposal directed specifically to this issue would be more appropriate here. @nkdengineer Thanks for the proposal, and sorry I think I must have overlooked this previously! 🙇 For your RCA I'd like to hear some more detail around why this is specifically happening after a deleted thread parent message, rather than any time a further money request is made. |
It is because after step 10, the App/src/libs/OptionsListUtils.ts Lines 578 to 579 in 042bdcc
And as you can see, |
@nkdengineer Sorry, what I'm getting at is that presumably the |
|
ProposalPlease re-state the problem that we are trying to solve in this issue.LHN does not show the expense preview when the latest message is a thread with deleted parent message What is the root cause of that problem?
App/src/libs/OptionsListUtils.ts Line 531 in 4239b37
isDeletedParentAction but not report preview actions and function execute next line with condition App/src/libs/OptionsListUtils.ts Line 576 in 4239b37
What changes do you think we should make in order to solve the problem?I think should add additional condition and set const isDeletedParentAction = ReportActionUtils.isDeletedParentAction(lastReportAction)
const reportPreview = allSortedReportActions[report?.reportID ?? '']?.find(reportAction => ReportActionUtils.isReportPreviewAction(reportAction))
if (isDeletedParentAction && reportPreview) lastReportAction = reportPreview in this way App/src/libs/OptionsListUtils.ts Line 556 in 4239b37
What alternative solutions did you explore? (Optional)Also reportPreviewAction has not updated |
The missing piece here is that the App/src/libs/OptionsListUtils.ts Line 594 in 3d4504e
This is how initially the new money request preview is correctly shown in the LHN. However, once we delete that message, we override the report's App/src/libs/OptionsListUtils.ts Line 576 in 4239b37
I think I'm therefore most interested in a solution that just continues to use the report's |
@jjcoffee what if update |
@andrey010 I think that would cause a regression as it would also move the money request report preview in the chat report itself. |
Waiting for confirmation of the expected behaviour via the question in #37245 (comment) - @Beamanator, don't suppose you know the answer? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@Beamanator, @abekkala, @jjcoffee Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Oofda sorry for my delay here!
I like @jjcoffee 's simplified steps here which definitely show a more general problem. @bfitzexpensify @miljakljajic I feel like we need a slack discussion to resolve the "desired behavior" for this issue & for this other issue in 1 place. Do either of you mind starting that convo in #expensify-open-source? |
Issue not reproducible during KI retests. (First week) |
@Beamanator, @abekkala, @jjcoffee Huh... This is 4 days overdue. Who can take care of this? |
On
I'm still seeing an incorrect message in the LHN, but now it's desktop-chrome-lhn-retest-2024-04-17_09.41.43.mp4 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Issue not reproducible during KI retests. (Second week) |
@abekkala Should we handle this related issue here? |
ah, if there is still an issue occurring with the same flow, then yes |
Bumped on Slack for proposals! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Still waiting on proposals! |
Still awaiting proposals |
I can still reproduce it with the latest staging. Kapture.2024-04-30.at.10.11.26.mp4 |
@Beamanator @jjcoffee, based on this, will this issue be closed or will it continue here? |
@lanitochka17, we're going to close this one out as it has really changed a bit over time. Can you create a new issue that shows the updated details and the updated flow? Noting what's wrong and what is expected? Thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.47-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:
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:
LHN will show the expense preview whenever a request is made, just like Step 6
Actual Result:
LHN does not show the expense preview when the latest message is a thread with deleted parent message
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6403083_1709659019145.20240305_141324.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: