Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.31k stars 2.74k forks source link

[READY FOR PAYMENT][$250] Workspace - Blank background displayed when redirected from desktop to connect bank #44929

Closed lanitochka17 closed 1 month ago

lanitochka17 commented 2 months ago

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.4-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 Email or phone of affected tester (no customers): applausetester+shch1@applause.expensifail.com Issue reported by: Applause - Internal Team

Issue found when executing PR https://github.com/Expensify/App/pull/44517

Action Performed:

  1. Sign into a valid account in the desktop app
  2. Go to Workspace > Workflow > Connect Bank account
  3. In the connect bank account page click on the link please click here to complete this process in a browser.
  4. Verify that: User expects to be redirected to the Safari browser and logged into the same account that was signed in on Desktop

Expected Result:

Workspace chat should be displayed when redirected from desktop to connect bank

Actual Result:

Blank background displayed when redirected from desktop to connect bank

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/5a4b2dfe-eb1a-4474-90cd-704d38b14b62

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010505fec65584f108
  • Upwork Job ID: 1810894967577795738
  • Last Price Increase: 2024-07-17
  • Automatic offers:
    • eh2077 | Reviewer | 103162940
    • dominictb | Contributor | 103162941
Issue OwnerCurrent Issue Owner: @JmillsExpensify
melvin-bot[bot] commented 2 months ago

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

dominictb commented 2 months ago

Proposal

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

Blank background displayed when redirected from desktop to connect bank

What is the root cause of that problem?

After clicking the link from desktop, the link will be open to web. We need to logout the previous user

https://github.com/Expensify/App/blob/8d99586b46d6ae710c9c36ddf55676836856ee09/src/pages/LogOutPreviousUserPage.tsx#L85-L86

Now the web is redirect to bank-account/new. -> the routes are bottom and right navigator.

Screenshot 2024-07-08 at 18 26 48

Then the current user is login and setUpPoliciesAndNavigate is called.

https://github.com/Expensify/App/blob/83be857a0db2dfd3e3f8ba241a5742898fee3462/src/libs/actions/App.ts#L428-L429

  1. We call goBack -> RightNavigator will be removed
  2. We now navigate to bank-account/new?policyID= -> RightNavigator is added to routes without central navigator

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

We don't need to call goBack in

https://github.com/Expensify/App/blob/83be857a0db2dfd3e3f8ba241a5742898fee3462/src/libs/actions/App.ts#L428-L429

We added it because We must call goBack() to remove the /transition route from history. But we already have the logic to goBack in logoutPreviousUser so we don't need it anymore.

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 2 months ago

@JmillsExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

JmillsExpensify commented 2 months ago

I think this is technically #wave-collect since it's the VBBA flow. Opening up to external.

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

eh2077 commented 2 months ago

@dominictb Thanks for your proposal!

The following condition is true https://github.com/Expensify/App/blob/83be857a0db2dfd3e3f8ba241a5742898fee3462/src/libs/actions/App.ts#L424 if and only if clicking connect bank from desktop right? https://github.com/Expensify/App/blob/83be857a0db2dfd3e3f8ba241a5742898fee3462/src/pages/ReimbursementAccount/BankAccountStep.tsx#L137

If so, then I think it'll be safe to fix it by removing Navigation.goBack(); here https://github.com/Expensify/App/blob/83be857a0db2dfd3e3f8ba241a5742898fee3462/src/libs/actions/App.ts#L428-L429

dominictb commented 1 month ago

if and only if clicking connect bank from desktop right?

Yes

If so, then I think it'll be safe to fix it by removing Navigation.goBack(); here

It works by my side. What about you?

eh2077 commented 1 month ago

It works by my side. What about you?

@dominictb However, it doesn’t work on my end

https://github.com/Expensify/App/assets/117511920/f4c0c22f-e530-4365-81eb-2abbed275c15

dominictb commented 1 month ago

@eh2077 I see you're using production link, right? Can you pls apply the solution and run dev?

eh2077 commented 1 month ago

@dominictb I opened the link from dev desktop. How to let it open dev domain on browser?

eh2077 commented 1 month ago

@dominictb It works for me too if I hard-coded the url to dev domain.

https://github.com/user-attachments/assets/375d1ad5-4a98-4bf7-b834-073fc4f877b8


@dominictb 's proposal looks good to me.

πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 1 month ago

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

dominictb commented 1 month ago

@thienlnam What do you think about my proposal above? Thanks

eh2077 commented 1 month ago

Not overdue waiting for @thienlnam 's review

melvin-bot[bot] commented 1 month ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] commented 1 month ago

πŸ“£ @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

melvin-bot[bot] commented 1 month ago

πŸ“£ @dominictb πŸŽ‰ 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 πŸ“–

dominictb commented 1 month ago

This should be ready for payment, no @JmillsExpensify @thienlnam?

thienlnam commented 1 month ago

Yeah, looks like the automation did not work here

melvin-bot[bot] commented 1 month ago

@JmillsExpensify @thienlnam @eh2077 @dominictb this issue is now 4 weeks old, please consider:

Thanks!

thienlnam commented 1 month ago

@eh2077 Can you complete the regression test here so we can close this out?

JmillsExpensify commented 1 month ago

Payment summary:

JmillsExpensify commented 1 month ago

Contributor paid via Upwork. @eh2077 mind completing the checklist so that I can process your payment as well?

eh2077 commented 1 month ago

Checklist

Regression test

  1. Sign into a valid account in the desktop app
  2. Go to Workspace > Workflow > Connect Bank account
  3. In the connect bank account page click on the link please click here to complete this process in a browser.
  4. At this point, user expects to be redirected to the Safari browser and logged into the same account that was signed in on Desktop
  5. Verify that: Workspace chat should be displayed when redirected from desktop to connect bank, instead of a blank background page
JmillsExpensify commented 1 month ago

Contributor paid and regression test created. Closing.