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-11-11] [$250] mWeb/Chrome - Workspace Settings-Back arrow leads to the forward page instead of the back page #51107

Closed
1 of 8 tasks
lanitochka17 opened this issue Oct 18, 2024 · 30 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 Oct 18, 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.50
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

Issue found when executing PR #50307

Action Performed:

Prerequisite: The user is logged in to the app

  1. Go to Settings
  2. Go to Workspaces
  3. Go to any workspace
  4. Go to Accounting
  5. Tap on "Export" menu under QuickBooks Desktop connection
  6. Tap on "Export date"
  7. Selecting any option from the list
  8. Tap the back arrow until you reach Workspaces again

Expected Result:

The back arrow leads to the back page

Actual Result:

The back arrow leads to the forward page instead of the back page

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6638967_1729272438158.50307.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021847870580076584100
  • Upwork Job ID: 1847870580076584100
  • Last Price Increase: 2024-10-20
  • Automatic offers:
    • ikevin127 | Reviewer | 104566717
    • truph01 | Contributor | 104566719
Issue OwnerCurrent Issue Owner: @jliexpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

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

@dylanexpensify dylanexpensify removed their assignment Oct 18, 2024
@dylanexpensify dylanexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

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

@dylanexpensify
Copy link
Contributor

Hey @jliexpensify! I'm heading out on parental leave so reassigning this! TY! 🙇‍♂️

@truph01
Copy link
Contributor

truph01 commented Oct 18, 2024

Edited by proposal-police: This proposal was edited at 2024-10-18 23:33:52 UTC.

Proposal

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

The back arrow leads to the forward page instead of the back page

What is the root cause of that problem?

  • In this:

onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING.getRoute(policyID))}

we call the goBack function with fallbackRoute leads to it navigates to new FullScreenNavigator instead of back to the existed one:

if (shouldEnforceFallback || (isFirstRouteInNavigator && fallbackRoute)) {
navigate(fallbackRoute, CONST.NAVIGATION.TYPE.UP);
return;
}

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

  • Just need to use Navigation.goBack() in this case.

  • The similar bug appears in other connections, such as qbo, netsuite, ... and we should fix it as well.

What alternative solutions did you explore? (Optional)

@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 19, 2024

Edited by proposal-police: This proposal was edited at 2024-10-20 05:49:59 UTC.

Proposal

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

The back arrow leads to the forward page instead of the back page

What is the root cause of that problem?

We pass fallback route to policy accounting page when when back button is pressed

onBackButtonPress={() => Navigation.goBack(ROUTES.POLICY_ACCOUNTING.getRoute(policyID))}

Since we pass the fallbackRoute it will create a new FullScreenNavigator

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

Instead of redirecting to policy account page we can pass the backTo params since we also have this page for RHP

Navigation.goBack(route.params?.backTo);

[SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_DESKTOP_EXPORT]: {path: ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_EXPORT.route},

We can do the same approach in other pages like QBO, NetSuite, etc

What alternative solutions did you explore? (Optional)

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Oct 20, 2024
@melvin-bot melvin-bot bot changed the title mWeb/Chrome - Workspace Settings-Back arrow leads to the forward page instead of the back page [$250] mWeb/Chrome - Workspace Settings-Back arrow leads to the forward page instead of the back page Oct 20, 2024
Copy link

melvin-bot bot commented Oct 20, 2024

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

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

melvin-bot bot commented Oct 20, 2024

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

@jliexpensify
Copy link
Contributor

I'm on Android 51-1 (Pixel 7) and can inconsistently reproduce this. I'll set it as External in case @ikevin127 can consistently reproduce.

@truph01
Copy link
Contributor

truph01 commented Oct 23, 2024

@ikevin127 Can you reproduce the bug?

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2024
@ikevin127
Copy link
Contributor

Will attempt to reproduce and if I can will proceed with reviewing proposals, otherwise let you know.

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 23, 2024

I've tried to reproduce the issue again with the latest main, and it's still reproducible

Screen.Recording.2024-10-22.at.21.11.52.mov

@ikevin127
Copy link
Contributor

I was able to reproduce consistently even though not being able to connect Quickbooks Desktop, but the issue is present in Quickbooks Online connection as well:

android-mweb-repro.webm

Given this, I Identified the following components where the same navigation go back with fallback logic is being used and by looking at previous PRs (like this one) I couldn't find a specific reason as to why the fallback was added.

These are the components where the same logic is used:

QuickbooksImportPage
QuickbooksAdvancedPage
QuickbooksExportConfigurationPage
QuickbooksDesktopAdvancedPage
QuickbooksDesktopImportPage
QuickbooksDesktopExportPage

SageIntacctAdvancedPage
XeroOrganizationConfigurationPage

The only ones which lead to our issue from what I tested are the ✅ ones and I'm not saying we should remove the fallback from all of them as that would be out of scope for our issue and also we would risk regressions.

@ikevin127
Copy link
Contributor

Given the context from the comment above, @truph01's proposal looks good to me since it identified the root cause and proposed a working solution which fixes our issue.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 24, 2024

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

@ikevin127
Copy link
Contributor

@NJ-2020 Thanks for your proposal. Unfortunately it came in second, the only difference being the replacement of the fallback route with route.params?.backTo which I don't see a strong reason for, but if you think I'm missing something and having no fallback would be a bad idea, please let us know why.

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

melvin-bot bot commented Oct 24, 2024

📣 @ikevin127 🎉 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 Oct 24, 2024

📣 @truph01 🎉 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 📖

@FitseTLT
Copy link
Contributor

@ikevin127 the purpose of backTo is usually to provide a fallbackRoute in the case of direct link access, especially in small screens, are you sure the proposed changes will not break that?

FYI we have an issue with the same RCA as this one and proposing a general fix that will prevent similar issues as this 👍

@ikevin127
Copy link
Contributor

especially in small screens, are you sure the proposed changes will not break that?

@FitseTLT Unless you tested the selected solution in this specific issue's case and have found that it breaks something - I think we're good to go here.

I looked over at your proposal's RCA and solution from the other issue and the solution is suggesting calling goBack and navigate one after the other which means calling 2 functions, honestly I'd be reserved to move forward with that solution because it doesn't show a deep understanding of the RCA nor an elegant solution.

If CME (@mountiny) considers that we should hold for the other issue / proposed solution, I won't have anything against that - as this is not about who get's to push their solution first 👍

@truph01
Copy link
Contributor

truph01 commented Oct 24, 2024

@ikevin127 I saw in this docs, connecting QBD requires Windows device but I don't have. Can you connect it?

image

@ikevin127
Copy link
Contributor

@truph01 Wasn't able to connect QBD for the same reason but we have the same issue on Quickbooks Online integration which you should be able to connect - you can show that in your videos for the PR Checklist and make sure to apply the fix for the Quickbooks Desktop integration.

Copy link

melvin-bot bot commented Oct 28, 2024

@jliexpensify, @mountiny, @ikevin127, @truph01 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 28, 2024
@ikevin127
Copy link
Contributor

Looks like PR was not opened yet. @truph01 Any updates ?

@melvin-bot melvin-bot bot removed the Overdue label Oct 28, 2024
@truph01
Copy link
Contributor

truph01 commented Oct 29, 2024

I am working on the PR

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Oct 29, 2024
@melvin-bot melvin-bot bot changed the title [$250] mWeb/Chrome - Workspace Settings-Back arrow leads to the forward page instead of the back page [HOLD for payment 2024-11-11] [$250] mWeb/Chrome - Workspace Settings-Back arrow leads to the forward page instead of the back page Nov 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 4, 2024
Copy link

melvin-bot bot commented Nov 4, 2024

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

Copy link

melvin-bot bot commented Nov 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.56-9 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-11-11. 🎊

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

Copy link

melvin-bot bot commented Nov 4, 2024

@ikevin127 @jliexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@ikevin127
Copy link
Contributor

ikevin127 commented Nov 5, 2024

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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.

    1st PR: https://github.com/Expensify/App/pull/50164/files#r1828564227.
    2nd PR: https://github.com/Expensify/App/pull/46511/files#r1828564191.

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: Not needed as this wasn't a critical / interrupting a core flow issue.

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • The user is logged in to the app.

Test 1

Prerequisite: User has connected to QBD.

  1. Go to Settings.
  2. Go to Workspaces.
  3. Go to any workspace.
  4. Go to Accounting.
  5. Tap on "Export" menu under QuickBooks Desktop connection.
  6. Tap on "Export date".
  7. Selecting any option from the list.
  8. Tap the back arrow until you reach Workspaces again and verify that the navigation goes back as expected with each click / tap.

Test 2

Prerequisite: User has connected to QBO.

  1. Go to Settings.
  2. Go to Workspaces.
  3. Go to any workspace.
  4. Go to Accounting.
  5. Tap on "Export" menu under QuickBooks Online connection.
  6. Tap on "Export date".
  7. Selecting any option from the list.
  8. Tap the back arrow until you reach Workspaces again and verify that the navigation goes back as expected with each click / tap.

Do we agree 👍 or 👎.

@jliexpensify
Copy link
Contributor

Payment Summary

Upwork job

@jliexpensify
Copy link
Contributor

Paid and job closed!

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
None yet
Development

No branches or pull requests

8 participants