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.14k stars 2.64k forks source link

[HOLD for payment 2024-07-24] [$250] mWeb-In new WS, for distance rate selecting a category & opening it directs to hmm not here #44206

Open lanitochka17 opened 3 weeks ago

lanitochka17 commented 3 weeks 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.1 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 Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/

  2. Tap profile icon -- Workspace -- New Workspace

  3. Tap more features -- Enable distance rate

  4. Tap Distance rates

  5. Tap settings

  6. Select a default category

  7. Open the selected default category

Expected Result:

In new workspace, for distance rate selecting a default category and opening it must show the selected category

Actual Result:

In new workspace, for distance rate selecting a default category and opening it directs to hmm it's not here page

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/29d0e392-6363-41d7-9d67-09d3a0e547c2

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bf4b3c18873471ae
  • Upwork Job ID: 1805141403738762533
  • Last Price Increase: 2024-07-08
  • Automatic offers:
    • situchan | Reviewer | 103065121
    • wildan-m | Contributor | 103065123
Issue OwnerCurrent Issue Owner: @kadiealexander
melvin-bot[bot] commented 3 weeks ago

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

lanitochka17 commented 3 weeks ago

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

lanitochka17 commented 3 weeks ago

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

melvin-bot[bot] commented 3 weeks ago

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

melvin-bot[bot] commented 3 weeks ago

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

Muhammad-UmairAli commented 3 weeks ago

Clone the Expensify/App repository and create a new branch from the latest main. Reproduce the issue and start debugging the navigation logic in the affected components. Identify and fix the navigation issue, ensuring the selected category is correctly passed and displayed. Write and run tests to confirm the fix works as expected. Submit the pull request for review, including all necessary details and test evidence.

melvin-bot[bot] commented 3 weeks ago

πŸ“£ @Muhammad-UmairAli! πŸ“£ Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
Muhammad-UmairAli commented 3 weeks ago

Contributor details Your Expensify account email: motivizor.hintsforlife@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~0145449b71231ec7db

melvin-bot[bot] commented 3 weeks ago

βœ… Contributor details stored successfully. Thank you for contributing to Expensify!

isogit123 commented 3 weeks ago

I can't reproduce the issue.

melvin-bot[bot] commented 3 weeks ago

πŸ“£ @isogit123! πŸ“£ Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
isogit123 commented 3 weeks ago

Contributor details Your Expensify account email: aboutabl6@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~011b9b21b42a676c99

melvin-bot[bot] commented 3 weeks ago

βœ… Contributor details stored successfully. Thank you for contributing to Expensify!

situchan commented 3 weeks ago

No proposals to review

jriyyya commented 3 weeks ago

Hi @situchan , I am working on the proposal, I will soon come up with it. I did find out that the issue is not related to selecting a default category, but to reproduce, If you just enable the distance rate and wait there for a few seconds, the Hmm not here shows up for about 1-2 seconds.

Edit: Similar behavior observed when enabling any of the more features

https://github.com/Expensify/App/assets/96080203/8558c9b6-3c22-43af-a4da-5a45301618ac

melvin-bot[bot] commented 3 weeks ago

πŸ“£ @jriyyya! πŸ“£ Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
jriyyya commented 3 weeks ago

Contributor details Your Expensify account email: riya1jain567@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01a88295f6ba1ce1bc?mp_source=share

melvin-bot[bot] commented 3 weeks ago

βœ… Contributor details stored successfully. Thank you for contributing to Expensify!

melvin-bot[bot] commented 2 weeks ago

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

situchan commented 2 weeks ago

No satisfactory proposals yet

wildan-m commented 2 weeks ago

Proposal

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

mWeb-In new WS, for distance rate selecting a category & opening it directs to hmm not here

What is the root cause of that problem?

We attempted to address this issue with this PR, but some of the code modifications unintentionally led to removal. The modification involved changing the name from FeatureEnabledAccessOrNotFoundWrapper to AccessOrNotFoundWrapper, but after the refactoring, the fix was only partially applied.

why this happens only on mWeb in root cause?

It happens on all platforms, but mobile internet may be slower than desktop. To effectively reproduce the issue, follow these steps:

  1. Log in
  2. Turn off the network connection
  3. Click on the account icon
  4. Navigate to workspaces
  5. Create a new workspace
  6. Click on More Features
  7. Enable a feature (Distance rate/Workflow)
  8. Click on the enabled feature section
  9. Reconnect to the network
  10. Wait until the "not found" page briefly appears.

Native android reproduction steps:

https://github.com/Expensify/App/assets/11847279/5245f446-fe1e-4438-8c0a-71f2673aeff7

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

Re-apply the changes that were missing from this PR. The updated code will be in the AccessOrNotFoundWrapper.tsx file.

    const isFeatureEnabled = featureName ? PolicyUtils.isPolicyFeatureEnabled(policy, featureName) : true;
    const [isPolicyFeatureEnabled, setIsPolicyFeatureEnabled] = useState(isFeatureEnabled);
    const {isOffline} = useNetwork();

    const isPageAccessible = accessVariants.reduce((acc, variant) => {
        const accessFunction = ACCESS_VARIANTS[variant];
        return acc && accessFunction(policy, login, report, allPolicies ?? null, iouType);
    }, true);

    const isPolicyNotAccessible = isEmptyObject(policy) || (Object.keys(policy).length === 1 && !isEmptyObject(policy.errors)) || !policy?.id;
    const shouldShowNotFoundPage = (!isMoneyRequest && !isFromGlobalCreate && isPolicyNotAccessible) || !isPageAccessible || !isPolicyFeatureEnabled || shouldBeBlocked;

    // We only update the feature state if it isn't pending.
    // This is because the feature state changes several times during the creation of a workspace, while we are waiting for a response from the backend.
    // Without this, we can have unexpectedly have 'Not Found' be shown.
    useEffect(() => {
        if (pendingField && !isOffline && !isFeatureEnabled) {
            return;
        }
        setIsPolicyFeatureEnabled(isFeatureEnabled);
    }, [pendingField, isOffline, isFeatureEnabled]);

Branch for this solution.

What alternative solutions did you explore? (Optional)

mvtglobally commented 2 weeks ago

Issue not reproducible during KI retests. (First week)

situchan commented 2 weeks ago

mWeb-In new WS, for distance rate selecting a category & opening it directs to hmm not here

@wildan-m thanks for the proposal. As you re-stated, can you please explain why this happens only on mWeb in root cause?

wildan-m commented 2 weeks ago

@situchan My proposal updated.

Change log: explain why the issue mostly occurred on mweb

Issue not reproducible during KI retests. (First week)

@mvtglobally try using more effective reproduction steps as explained in the root cause of my proposal

situchan commented 2 weeks ago

reviewing updated proposal

melvin-bot[bot] commented 1 week ago

@kadiealexander @situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 1 week ago

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

situchan commented 1 week ago

updating today

situchan commented 1 week ago

@wildan-m's proposal LGTM! πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

πŸ“£ @situchan πŸŽ‰ 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 week ago

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

mvtglobally commented 1 week ago

Issue not reproducible during KI retests. (Second week)

wildan-m commented 1 week ago

@situchan The pull request is prepared for review.

melvin-bot[bot] commented 3 days ago

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

melvin-bot[bot] commented 3 days ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.7-8 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-07-24. :confetti_ball:

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

melvin-bot[bot] commented 3 days 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: