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.57k stars 2.91k forks source link

[HOLD for payment 2024-10-16] [$250] Desktop - Bank account - Modal appears to open the page in the app when I was redirected from the app #49812

Closed IuliiaHerets closed 3 weeks ago

IuliiaHerets commented 1 month 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.39-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: https://expensify.testrail.io/index.php?/tests/view/4992364&group_by=cases:section_id&group_order=asc&group_id=283225 Issue reported by: Applause Internal Team

Action Performed:

  1. Open the app
  2. Log in with a new Expensifail account
  3. Create a workspace
  4. Navigate to Workspace settings - More features
  5. Enable "Workflows"
  6. Navigate to Workflows - Connect bank account
  7. Click on the note to open the process in a browser

Expected Result:

The modal shouldn't appear.

Actual Result:

Modal appears to open the page in the app when I was redirected from the app.

Workaround:

Unknown

Platforms:

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/707d4d85-bdc0-496b-b30d-e21fad6e5c72

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021841531184818757029
  • Upwork Job ID: 1841531184818757029
  • Last Price Increase: 2024-10-02
Issue OwnerCurrent Issue Owner: @JmillsExpensify
melvin-bot[bot] commented 1 month 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.

IuliiaHerets commented 1 month ago

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

IuliiaHerets commented 1 month ago

@JmillsExpensify 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

bernhardoj commented 1 month ago

Proposal

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

The prompt to open on the desktop shows after redirected from the desktop app.

What is the root cause of that problem?

When we redirected from the desktop to the web app, the logic to prompt the user to open on the desktop will be executed. There is currently no logic to prevent it from showing if the user comes from the desktop app. https://github.com/Expensify/App/blob/4c768583e0df33b5f087a5b7f91d471a6b1b7bac/src/components/DeeplinkWrapper/index.website.tsx#L19-L32

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

  1. To know if the user is coming from the desktop, we can add a new param to the URL called referrer with a value of desktop. https://github.com/Expensify/App/blob/4c768583e0df33b5f087a5b7f91d471a6b1b7bac/src/libs/actions/Link.ts#L193-L202
const referrer = 'referrer=desktop';
const paramsArray = [accountID, emailParam, authTokenParam, exitTo, referrer];

buildURLWithAuthToken is currently only being used for redirecting the user from desktop to web, so we can always set the value to desktop for now.

  1. Don't prompt the user if the URL params referrer is desktop. https://github.com/Expensify/App/blob/4c768583e0df33b5f087a5b7f91d471a6b1b7bac/src/components/DeeplinkWrapper/index.website.tsx#L24-L26
if (Str.startsWith(window.location.pathname, Str.normalizeUrl(ROUTES.TRANSITION_BETWEEN_APPS))) {
    const params = new URLSearchParams(window.location.search);
    if (params.get('referrer') === 'desktop') {
        return;
    }
    App.beginDeepLinkRedirectAfterTransition();
} else ...
melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

JmillsExpensify commented 1 month ago

Not sure about the underlying issue though we have a proposal on this issue so let's get some thoughts on it.

aimane-chnaif commented 1 month ago

@bernhardoj's proposal looks good to me.

buildURLWithAuthToken is currently only being used for redirecting the user from desktop to web, so we can always set the value to desktop for now.

This makes sense

🎀👀🎀 C+ reviewed

melvin-bot[bot] commented 1 month ago

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

bernhardoj commented 1 month ago

PR is ready

cc: @aimane-chnaif

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.46-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-10-16. :confetti_ball:

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

melvin-bot[bot] commented 1 month ago

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:

aimane-chnaif commented 1 month ago
melvin-bot[bot] commented 1 month ago

Payment Summary

Upwork Job

BugZero Checklist (@JmillsExpensify)

JmillsExpensify commented 1 month ago

Payment summary is accurate.

bernhardoj commented 1 month ago

Requested in ND.

trjExpensify commented 1 month ago

Confirming the payment summary above is correct.

JmillsExpensify commented 1 month ago

$250 approved for @bernhardoj

JmillsExpensify commented 1 month ago

@aimane-chnaif I'm not seeing a record of you being paid out in Upwork. Are you seeing the same on your end? If not, I'll create a fresh offer.

aimane-chnaif commented 1 month ago

@JmillsExpensify I am still using upwork

JmillsExpensify commented 1 month ago

Offer sent

melvin-bot[bot] commented 3 weeks ago

@JmillsExpensify, @bernhardoj, @aldo-expensify, @aimane-chnaif Eep! 4 days overdue now. Issues have feelings too...

JmillsExpensify commented 3 weeks ago

All contributors paid out.

melvin-bot[bot] commented 3 weeks ago

@JmillsExpensify @aldo-expensify Be sure to fill out the Contact List!