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 2023-09-27] [$1000] Opening report via deep link animates the page twice #23441

Closed
1 of 6 tasks
kavimuru opened this issue Jul 23, 2023 · 68 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Jul 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Navigate to a report
  2. Copy the url to clipboard
  3. Return to LHN
  4. Minimise the app
  5. Paste the url in an external app like Notes
  6. Tap on the report url

Expected Result:

NewDot opens and navigates to the corresponding report

Actual Result:

App opens and the report page gets animated in twice

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.44-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

RPReplay_Final1690059958.MP4
NDSC1986.1.MP4

Expensify/Expensify Issue URL:
Issue reported by: @aswin-s
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690060285079399

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019b9b5dcffbb53478
  • Upwork Job ID: 1684994291328241664
  • Last Price Increase: 2023-09-01
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 26486528
    • tienifr | Contributor | 26486529
    • aswin-s | Reporter | 26486531
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@kevinksullivan
Copy link
Contributor

Unable to produce this as the link takes me to mWeb. Closing unless someone can correct the steps or let me know what's wrong.

RPReplay_Final1690224407.MP4

@aswin-s
Copy link
Contributor

aswin-s commented Jul 25, 2023

@kevinksullivan I can still reproduce this bug. I'm on latest prod build 1.3.42-26. Also I noticed that the link gets opened in mWeb, which should never happen on staging or prod builds. Deep links should get opened in native app itself.

Steps followed.

  1. Navigate to a group chat
  2. Copy URL
  3. Navigate back to LHN. (Important)
  4. Minimise NewDot and paste the URL in notes.
  5. Tap on the URL to open the deep in in NewDot.
RPReplay_Final1690262141.MP4

@aswin-s
Copy link
Contributor

aswin-s commented Jul 25, 2023

Reproduced on TestFlight version 1.3.44-2 as well.

@aswin-s
Copy link
Contributor

aswin-s commented Jul 26, 2023

@kevinksullivan Shouldn't this be reopened? It's a regression from #20624

@kbecciv
Copy link

kbecciv commented Jul 26, 2023

Issue is reproduced on build 1.3.45.3

RPReplay_Final1690331387.MP4

@kbecciv kbecciv reopened this Jul 26, 2023
@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Jul 28, 2023
@melvin-bot melvin-bot bot changed the title Opening report via deep link animates the page twice [$1000] Opening report via deep link animates the page twice Jul 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019b9b5dcffbb53478

@melvin-bot melvin-bot bot added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Jul 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

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

@kevinksullivan
Copy link
Contributor

Moving forward

@melvin-bot melvin-bot bot removed the Overdue label Jul 28, 2023
@tienifr
Copy link
Contributor

tienifr commented Jul 29, 2023

Proposal

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

NewDot opens and navigates to the corresponding report.

What is the root cause of that problem?

The problem in this line:

Navigation.navigate(ROUTES.getReportRoute(reportID), 'UP');

After the navigation refactor, the deep linking already works out of the box, but in here we still keep the legacy logic where we manually handle the navigation to a specific report. That manual handling is not necessary now. This leads to the double navigation and the visual issue.

The issue happens after this PR. It causes a forced replacement of the current report screen, leading to the double navigation:

  1. First navigation is the out-of-the-box navigation from react-navigation
  2. Second is the forced replacement

If we don't have the change in that PR (adds 'UP'), this issue will not happen because in 2, it detects that we're already on that screen, then the second navigate will do nothing.

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

We just need to remove this code block:

App/src/libs/actions/Report.js

Lines 1715 to 1717 in eb02006

if (reportID) {
Navigation.navigate(ROUTES.getReportRoute(reportID), 'UP');
}

There'll be no regression since the deep linking is already handled out-of-the-box by the navigation library.
I've tested with all these flows on iOS, Android, web, desktop and all works well:

  1. Deeplinking to a report while logged in
  2. Deeplinking to a report while logged out
  3. Deeplinking to a report while logged in and another report is opened
  4. Deeplinking to a report while logged in and a random screen (Settings/Workspace/...) is opened

What alternative solutions did you explore? (Optional)

We can revert the change in this PR, I've tested and it doesn't cause that issue again. But this is still unnecessary code so I prefer to remove it completely and let react-navigation handle it.

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@abdulrahuman5196
Copy link
Contributor

Reviewing today

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 31, 2023
@abdulrahuman5196
Copy link
Contributor

Sorry wasn't able review that time. Will give a review in my morning

@melvin-bot melvin-bot bot removed the Overdue label Aug 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

📣 @aswin-s 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 4, 2023
@aswin-s
Copy link
Contributor

aswin-s commented Sep 4, 2023

Offer seems to be for 50$ for reporter. It is supposed to be 250$ for issues created in July, right?

@mountiny
Copy link
Contributor

mountiny commented Sep 4, 2023

ye will be handled once we pay out

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @tienifr got assigned: 2023-09-04 09:32:43 Z
  • when the PR got merged: 2023-09-18 08:02:05 UTC
  • days elapsed: 9

On to the next one 🚀

@sophiepintoraetz
Copy link
Contributor

Whoops - forgot to unsubscribe to this one and paid @aswin-s $250.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 20, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Opening report via deep link animates the page twice [HOLD for payment 2023-09-27] [$1000] Opening report via deep link animates the page twice Sep 20, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.71-12 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 2023-09-27. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

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:

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

@kevinksullivan
Copy link
Contributor

Awaiting payment, @abdulrahuman5196 please finish out the checklist above. Thanks!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 26, 2023
@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:

#22740

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

#20624 (comment)

Determine if we should create a regression test for this bug.
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.

No need for new test. Normal deeplink regression tests should be fine.

@melvin-bot melvin-bot bot removed the Overdue label Sep 29, 2023
@abdulrahuman5196
Copy link
Contributor

@kevinksullivan Completed the checklist

@kevinksullivan
Copy link
Contributor

All set

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 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Development

No branches or pull requests

10 participants