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

[HOLD for payment 2024-08-14] [$250] iOS - Search - User lands on blank workspace chat after paying report from search #46139

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 24, 2024 · 21 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 Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 24, 2024

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: 9.0.11.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

Issue found when executing PR #45465

Action Performed:

  1. Open the app and log in as an admin of a workspace
  2. Navigate to the workspace chat
  3. Submit some expenses and submit the report
  4. Open Search > Shared
  5. Open the submitted report
  6. Approve and pay elsewhere the report

Expected Result:

User is navigated to the workspace chat and can view the chat history

Actual Result:

User is navigated to the blank workspace chat, and it empty until user swipes down

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

Bug6551710_1721839950202.IMG_8414.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018d43e8aee3c9a22d
  • Upwork Job ID: 1816195433928017858
  • Last Price Increase: 2024-07-24
Issue OwnerCurrent Issue Owner: @lschurr
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Triggered auto assignment to @lschurr (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
Copy link
Author

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

@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

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jul 24, 2024
@melvin-bot melvin-bot bot changed the title iOS - Search - User lands on blank workspace chat after paying report from search [$250] iOS - Search - User lands on blank workspace chat after paying report from search Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018d43e8aee3c9a22d

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

melvin-bot bot commented Jul 24, 2024

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

@Zakpak0
Copy link
Contributor

Zakpak0 commented Jul 25, 2024

Proposal

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

When paying an expense from the search tab, after confirming payment, the app is navigated to an empty Report View.

What is the root cause of that problem?

It seems like we aren't waiting for the navigator to be ready before we navigate back to the original report.

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

We should change these lines here
src/libs/actions/IOU.ts

        Navigation.dismissModalWithReport(chatReport);

To the following:
Wait for navigation to be ready and then call dismissModal.

    Navigation.isNavigationReady().then(() => {
        Navigation.dismissModalWithReport(chatReport);
        Report.notifyNewAction(chatReport.reportID)
    })

Here is a test branch with my changes

What alternative solutions did you explore? (Optional)

Additionally, I think it might also be helpful to convert the ReportView component from the depreciated withOnyx to useOnyx.
src/pages/home/report/ReportActionsView.tsx

    const [transactionThreadReportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadReportID}`,
        {
            canEvict: false,
        },
        ({ reportActions }) => ReportActionsUtils.getSortedReportActionsForDisplay(reportActions, true))
    const [transactionThreadReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID}`,
        {
            initialValue: {}
        }
    )
    const [session] = useOnyx(ONYXKEYS.SESSION)

@bernhardoj
Copy link
Contributor

Proposal

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

User is navigated to the blank workspace chat after paying money request from report RHP.

What is the root cause of that problem?

I haven't investigated why the workspace chat opens with only background image, but the blank issue is the same as #45727. The other issue here is that paying the money request closes the report RHP and navigate to the workspace chat.

It's because we call dismiss modal when paying money request.

App/src/libs/actions/IOU.ts

Lines 6961 to 6964 in b0f810d

const apiCommand = paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY ? WRITE_COMMANDS.PAY_MONEY_REQUEST_WITH_WALLET : WRITE_COMMANDS.PAY_MONEY_REQUEST;
API.write(apiCommand, params, {optimisticData, successData, failureData});
Navigation.dismissModalWithReport(chatReport);

The dismiss modal code is old, but I don't think the code should be there. The dismiss modal never really works before because all the pay buttons are never in an RHP, but now it's possible that the pay button is in an RHP, that is the report RHP. So, before the report RHP, the dismiss modal is useless, and no one notices that.

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

I suggest that we remove the dismiss modal code. Paying money request should let the user stay on the money request report.

@mananjadhav
Copy link
Collaborator

Will review the proposals in a while.

@mananjadhav
Copy link
Collaborator

Yeah I am not sure why we need to dismissModal here. I don't think we need that I am going to confirm the behavior with the engineer but I am inclined to remove the dismiss modal code.

🎀 👀 🎀 C+ reviewed.

Copy link

melvin-bot bot commented Jul 30, 2024

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

Copy link

melvin-bot bot commented Jul 30, 2024

@mananjadhav, @lschurr Eep! 4 days overdue now. Issues have feelings too...

@mananjadhav
Copy link
Collaborator

Quick bump @Gonals

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 1, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 1, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @mananjadhav

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Aug 7, 2024
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Aug 7, 2024
@melvin-bot melvin-bot bot changed the title [$250] iOS - Search - User lands on blank workspace chat after paying report from search [HOLD for payment 2024-08-14] [$250] iOS - Search - User lands on blank workspace chat after paying report from search Aug 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Aug 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.17-2 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-08-14. 🎊

For reference, here are some details about the assignees on this issue:

  • @mananjadhav requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Aug 7, 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:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] 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:
  • [@mananjadhav] 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:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] 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.
  • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@lschurr
Copy link
Contributor

lschurr commented Aug 14, 2024

Payment summary:

@mananjadhav
Copy link
Collaborator

This has been existed since a long time and hence I don't have an offending PR as such. We updated the logic for navigation as well as RHP during the course of time. Also I think the regression test is not necessary for this one.

@JmillsExpensify
Copy link

$250 approved for @mananjadhav

@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

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 Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

7 participants