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-04-25] [$250] IOU - Blank page after returning to IOU report from thread and deleting the other request #40087

Closed
6 tasks done
izarutskaya opened this issue Apr 11, 2024 · 45 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Apr 11, 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: 1.4.62-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Create two IOUs.
  4. Go to the transaction thread of the first IOU.
  5. Click on the header subtitle to return to IOU report.
  6. Right click on the second IOU preview > Delete request.
  7. Delete the request.

Expected Result:

App will open one report transaction view (combined IOU report).

Actual Result:

A blank page shows up.

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

Bug6445479_1712816252003.bandicam_2024-04-11_14-14-44-762.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012dc6ca492e81c98f
  • Upwork Job ID: 1778531947093139456
  • Last Price Increase: 2024-04-11
  • Automatic offers:
    • Ollyws | Reviewer | 0
    • tienifr | Contributor | 0
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 11, 2024
Copy link

melvin-bot bot commented Apr 11, 2024

Triggered auto assignment to @trjExpensify (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.

Copy link

melvin-bot bot commented Apr 11, 2024

Triggered auto assignment to @youssef-lr (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 11, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

@trjExpensify 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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@izarutskaya
Copy link
Author

Production

bandicam.2024-04-11.11-13-28-751.mp4

@tienifr
Copy link
Contributor

tienifr commented Apr 11, 2024

Proposal

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

A blank page shows up.

What is the root cause of that problem?

When users create 2 IOUs -> transactionThreadReportID is null because of this logic

If transactionThreadReportID is null we will show all actions

When they go to the first IOU and go back, the url will be /r/reportID/reportActionID, then delete the second IOU, the url is still /r/reportID/reportActionID and transactionThreadReportID has value (because there's only one IOU action)

if transactionThreadReportID is not null we will filter out all IOU actions because of this logic, then try to show the IOU action that has id in url

-> the empty chat is shown

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

When transactionThreadReportID has value (only one IOU action), we should remove reportActionID in url


    useEffect(()=>{
        if(transactionThreadReportID && route.params.reportActionID){
            Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(route.params.reportID));

        }
    },[transactionThreadReportID])

What alternative solutions did you explore? (Optional)

NA

Result

web-resize.mp4

@youssef-lr
Copy link
Contributor

I'm checking a PR to confirm if it's the offending one

@youssef-lr
Copy link
Contributor

Confirmed it's a regression from #40079 after reverting it locally, @paultsimura @shubham1206agra @MonilBhavsar can you guys take a look please? @tienifr checking your proposal meanwhile

@shubham1206agra
Copy link
Contributor

@tienifr Thanks for the proposal, but your solution will remove highlights from comments too when it switches back to singleTransactionView.

@roryabraham Shouldn't there be a failsafe whenever we use a wrong/non-existent reportActionID in the URL, it should revert back to no reportActionID in the URL present?

cc @youssef-lr

@tienifr
Copy link
Contributor

tienifr commented Apr 11, 2024

@shubham1206agra I just remove reportActionID when there's only one IOU action. In that case we need to redirect to transaction report, so the highlighted action should not be shown

@shubham1206agra
Copy link
Contributor

@shubham1206agra I just remove reportActionID when there's only one IOU action. In that case we need to redirect to transaction report, so the highlighted action should not be shown

Right, but if the highlight is on a comment it will be shown as it is in the report. Why the comment's highlight will be removed?

@shubham1206agra
Copy link
Contributor

Confirmed it's a regression from #40079 after reverting it locally, @paultsimura @shubham1206agra @MonilBhavsar can you guys take a look please? @tienifr checking your proposal meanwhile

@youssef-lr Am I missing something? @tienifr solution suggests something else. And the logic in #40079 should not affect this issue at all.

@paultsimura
Copy link
Contributor

I also doubt the referenced PR is the cause, but I'll be able to test thoroughly in about 3-4 hours only.

@youssef-lr
Copy link
Contributor

Sorry folks, that PR is not the culprit. When I tested after reverting, I delete the highlighted report action and not the last one, and that doesn't seem to reproduce the bug. It's only reproduced when we delete the non-highlighted report action.

@youssef-lr
Copy link
Contributor

Back to searching for the offending PR as I think that would help us know how to fix this properly.

@youssef-lr
Copy link
Contributor

Ok this is the offending PR #39454, it seems like this is new functionality because when I revert it I don't see the previous report action highlighted. @rayane-djouah @rushatgabhane @jasperhuangg can you guys take a look please @tienifr's proposal?

@jasperhuangg
Copy link
Contributor

@tienifr's proposal makes sense to me, thanks for catching this! Feel free to assign them if it makes sense to you as well.

@youssef-lr
Copy link
Contributor

It looks good to me too.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Apr 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] IOU - Blank page after returning to IOU report from thread and deleting the other request [HOLD for payment 2024-04-25] [$250] IOU - Blank page after returning to IOU report from thread and deleting the other request Apr 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

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

Copy link

melvin-bot bot commented Apr 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.62-17 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-04-25. 🎊

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

Copy link

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

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

@rushatgabhane
Copy link
Member

rushatgabhane commented Apr 18, 2024

  1. The PR that introduced the bug has been identified. Link to the PR: Update thread headers and ancestry to deep link back to the original comment using comment linking #39454

  2. 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: Update thread headers and ancestry to deep link back to the original comment using comment linking #39454 (comment)

  3. 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: N.A.

  4. Determine if we should create a regression test for this bug. No

  5. 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 - N.A.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Apr 24, 2024
@trjExpensify
Copy link
Contributor

👋 Let's get the checklist done, @rushatgabhane!

@rushatgabhane
Copy link
Member

All done

@melvin-bot melvin-bot bot added the Overdue label Apr 30, 2024
@youssef-lr
Copy link
Contributor

Not overdue.

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2024
@trjExpensify
Copy link
Contributor

Determine if we should create a regression test for this bug. No

Mind being a little more descriptive on the why here, @rushatgabhane? Is one being added elsewhere for the new "ancestor" thread logic?

@melvin-bot melvin-bot bot added the Overdue label May 3, 2024
Copy link

melvin-bot bot commented May 7, 2024

@youssef-lr, @trjExpensify, @rushatgabhane, @tienifr Eep! 4 days overdue now. Issues have feelings too...

@trjExpensify
Copy link
Contributor

Bump on this, @rushatgabhane.

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@rushatgabhane
Copy link
Member

@trjExpensify i was thinking the root cause is trivial. i.e. we didn't navigate to IOU report when it was deleted.

In PR #40157, we made that change so this issue won't happen again

@rushatgabhane
Copy link
Member

But yes, if we think that we should add a test, here are the regression steps -

  1. Go to the app
  2. Go to any chat.
  3. Create two IOUs.
  4. Go to the transaction thread of the first IOU.
  5. Click on the header subtitle to return to IOU report.
  6. Right click on the second IOU preview > Delete request.
  7. Delete the request.
  8. Verify that you are navigated to the other first IOU request.

@trjExpensify
Copy link
Contributor

@trjExpensify i was thinking the root cause is trivial. i.e. we didn't navigate to IOU report when it was deleted.

In PR #40157, we made that change so this issue won't happen again

Alright, thanks for expanding on that - I don't think it's trivial if it results in a blank empty page. Looks like we have a regression test for this which includes navigating back as the expected behaviour, so I think we're covered.

@trjExpensify
Copy link
Contributor

Payment summary as follows:

Closing!

@JmillsExpensify
Copy link

$250 approved for @rushatgabhane

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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests