Skip to content
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

[Payment due April 30th][$250] Expense - Transaction thread opens in skeleton after replying to system message thread #39861

Closed
6 tasks done
lanitochka17 opened this issue Apr 8, 2024 · 20 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Apr 8, 2024

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.61-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: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat with no unsettled request
  3. Create a manual request
  4. Go to transaction thread
  5. Edit any field to invoke system message
  6. Right click on the system message > Reply in thread
  7. Send a reply to the thread
  8. Go back to the main workspace chat
  9. Click on the expense preview

Expected Result:

In Step 6, the thread header should display the correct thread name with subtitle
In Step 9, the combined report should open up because there is only one request

Actual Result:

In Step 6, the thread header shows skeleton, while the LHN shows Hidden with placeholder avatar
In Step 9, a skeleton card appears in the IOU report (not combined report). When clicking on the skeleton, another page in skeleton shows up. There is no way to open transaction thread anymore

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6442573_1712596075763.20240409_005144.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011464f2b8229d83ea
  • Upwork Job ID: 1777781992910196736
  • Last Price Increase: 2024-04-09
  • Automatic offers:
    • eh2077 | Reviewer | 0
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@lanitochka17
Copy link
Author

@lschurr 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
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 9, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

In Step 6, the thread header shows skeleton, while the LHN shows Hidden with placeholder avatar
In Step 9, a skeleton card appears in the IOU report (not combined report). When clicking on the skeleton, another page in skeleton shows up. There is no way to open transaction thread anymore

What is the root cause of that problem?

When the system message is in combine report, the reportID here is not the current report of modified message. So the parentReportID data of thread is wrong which makes this issue.

Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, reportID);

What changes do you think we should make in order to solve the problem?

We should get the originalReportID of the reportAction by using ReportUtils.getOriginalReportID which already covers the combine report case to create correct the thread data.

const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction);
if (closePopover) {
    hideContextMenu(false, () => {
        InteractionManager.runAfterInteractions(() => {
            // Normally the focus callback of the main composer doesn't focus when willBlurTextInputOnTapOutside
            // is false, so we need to pass true here to override this condition.
            ReportActionComposeFocusManager.focus(true);
        });
        Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, originalReportID);
    });
    return;
}

Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, originalReportID);

Report.navigateToAndOpenChildReport(reportAction?.childReportID ?? '0', reportAction, reportID);

What alternative solutions did you explore? (Optional)

NA

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Apr 9, 2024
@melvin-bot melvin-bot bot changed the title Expense - Transaction thread opens in skeleton after replying to system message thread [$250] Expense - Transaction thread opens in skeleton after replying to system message thread Apr 9, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011464f2b8229d83ea

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 9, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (External)

@trjExpensify
Copy link
Contributor

CC'ing @NikkiWines @mountiny for vis! :)

@eh2077
Copy link
Contributor

eh2077 commented Apr 12, 2024

@nkdengineer Thanks for your proposal. Can you explain why only system message has this issue?

@nkdengineer
Copy link
Contributor

@eh2077 This happens for all messages of transaction thread report and the modified system message is one of them. In combine report, we display all report actions of IOU report and transaction thread report.

@eh2077
Copy link
Contributor

eh2077 commented Apr 12, 2024

@nkdengineer I can only reproduce this issue in offline mode on the main branch. Do you agree?

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 12, 2024

@eh2077 In online mode, the ancestor is also display wrong because when we reply in thread in this case, the wrong parent of action is also updated in optimistic data here.

if (newReportObject.parentReportID && parentReportActionID) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${newReportObject.parentReportID}`,
value: {[parentReportActionID]: {childReportID: reportID, childType: CONST.REPORT.TYPE.CHAT}},
});
failureData.push({

Screenshot 2024-04-12 at 21 58 58

@eh2077
Copy link
Contributor

eh2077 commented Apr 12, 2024

@nkdengineer Thanks for your patience!

@nkdengineer 's proposal looks good to me. I agree with their RCA and their solution.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 12, 2024

Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@MonilBhavsar
Copy link
Contributor

Proposal looks good 👍

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 15, 2024
Copy link

melvin-bot bot commented Apr 15, 2024

📣 @eh2077 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Apr 15, 2024

📣 @nkdengineer You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@eh2077
Copy link
Contributor

eh2077 commented May 3, 2024

It seems Melvin failed to track payment here. I think this is due for payment.

@lschurr Can you help with the payment?

@lschurr
Copy link
Contributor

lschurr commented May 3, 2024

Yep, the PR was deployed to prod on April 23rd, that means pay day should have been April 30th.

Payment summary:

@lschurr lschurr added the Awaiting Payment Auto-added when associated PR is deployed to production label May 3, 2024
@lschurr lschurr changed the title [$250] Expense - Transaction thread opens in skeleton after replying to system message thread [Payment due April 30th][$250] Expense - Transaction thread opens in skeleton after replying to system message thread May 3, 2024
@nkdengineer
Copy link
Contributor

@lschurr Offer accepted 🙇

@lschurr
Copy link
Contributor

lschurr commented May 6, 2024

Great, this is all set!

@lschurr lschurr closed this as completed May 6, 2024
@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants