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.27k stars 2.71k forks source link

[CHECKLIST - ISHPAUL] [$250] Mac Safari - Tasks/Chat - Second right hand menu pane RHP shown severely cut compared to prod #44765

Closed izarutskaya closed 1 month ago

izarutskaya 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.3-6 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers): gatantm+82@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team

Action Performed:

  1. Go to any chat
  2. Click on the plus icon > Assign task
  3. Add any Title > next
  4. Second flow click on the chat header > Share

Expected Result:

The second page of the opened RHP is shown without issues

Actual Result:

The second page of the opened RHP either when assigning a task or Sharing a channel is shown cut. Sometimes the button back is hard to reach as well

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

https://github.com/Expensify/App/assets/115492554/7163f8c9-558e-42ed-9d9b-8b7d896140f4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c408a04e30a45b7f
  • Upwork Job ID: 1808446874734237891
  • Last Price Increase: 2024-07-03
  • Automatic offers:
    • ishpaul777 | Contributor | 102994015
Issue OwnerCurrent Issue Owner: @jliexpensify
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 1 month ago

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.

github-actions[bot] commented 1 month ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
izarutskaya commented 1 month ago

@jliexpensify 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.

izarutskaya commented 1 month ago

We think this issue might be related to the #vip-vsb

izarutskaya commented 1 month ago

Production

Screenshot 2024-07-03 at 08 00 22

techievivek commented 1 month ago

oops, it's badly broken. Removing the DeployBlocker since this is not concerned with backend.

jliexpensify commented 1 month ago

@techievivek keep it Internal or can we make it External?

melvin-bot[bot] commented 1 month ago

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

mountiny commented 1 month ago

Lets make this external

melvin-bot[bot] commented 1 month ago

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

jnowakow commented 1 month ago

Hello, I'm from Software Mansion, an expert agency, and I'll work on this

jliexpensify commented 1 month ago

Assigned you @jnowakow

jnowakow commented 1 month ago

As per this message more people can look at this issue - it's only reproducible on Safari, on other browsers it works fine

mountiny commented 1 month ago

I could only reproduce in Safari, not in chrome

jasperhuangg commented 1 month ago

Demoting since the issue only happens on Safari, on a very specific flow, and isn't consistently reproducible.

ShridharGoel commented 1 month ago

Proposal

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

Mac Safari - Tasks/Chat - Second right hand menu pane shown with a distorted UI.

How to replicate this bug?

This happens in multiple other places as well, when we navigate from one RHP to another.

What is the root cause of that problem?

The concurrent mode was enabled in https://github.com/Expensify/App/pull/42592, but it is not stable in Safari browser.

Example of an older issue: https://github.com/facebook/react/issues/22459

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

As a temp fix, we should disable concurrent mode for Safari:

Update platformSetup/index.website.tsx:

export default function () {
    const appConfig = {
        rootTag: document.getElementById('root'),
    };

    if (Browser.isSafari()) {
        appConfig.mode = 'legacy';
    }

    AppRegistry.runApplication(Config.APP_NAME, appConfig);

    // When app loads, get current version (production only)
    if (Config.IS_IN_PRODUCTION) {
        checkForUpdates(webUpdater());
    }

    // Start current date updater
    DateUtils.startCurrentDateUpdater();
}

This would set the mode to legacy if the browser is Safari.

mountiny commented 1 month ago

@Kicu can you please check that out?

mountiny commented 1 month ago

I am not 100% if just disabling the mode is the right path forwards, can we help fix this issue in safari with some patch and try to fix it upstream? I worry that if we would not care, we might leave the safari disabled for a long time

s77rt commented 1 month ago

Not able to reproduce

https://github.com/Expensify/App/assets/16493223/525f5513-8271-4b42-8906-ad6c0b8dff4c

mountiny commented 1 month ago

@s77rt I believe it was not super reliable, have you tried couple of times?

s77rt commented 1 month ago

@mountiny Tested on staging and I'm able to reproduce (all the time) but not on main

https://github.com/Expensify/App/assets/16493223/60990a61-17ee-4c38-b653-93adb5b677d8

The bug is probably not fixed yet. But it does seem harder to reproduce locally

s77rt commented 1 month ago

@ShridharGoel Were you able to reproduce this locally?

ShridharGoel commented 1 month ago

Yes, I'm able to get this to happen consistently on local with the steps mentioned by me.

Kicu commented 1 month ago

I also tested, and:

Screenshot 2024-07-04 at 10 10 46

Do we also treat this as part of this bug? seems closely related.

mountiny commented 1 month ago

@Kicu seems like the RCA will be similar so I would say yes

Kicu commented 1 month ago

Both the original bug with Task RHP page and also my screenshot ☝️ where ReportDetails looks bad seem to have the same source. The source is using specific interpolators from base Animated from react-native or writing our own interpolators.

If we take a look where the RHP Navigator is defined: https://github.com/Expensify/App/blob/main/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx#L40 we see that there are options passed to it, and within them the specific interpolator to be used, defined here: https://github.com/Expensify/App/blob/main/src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts#L16 If I either comment out this interpolator or change to some other animation the bug does not happen.

This is the direct link to the interpolator in question: https://github.com/react-navigation/react-navigation/blob/main/packages/stack/src/TransitionConfigs/CardStyleInterpolators.tsx#L14

I tried to do some logging from inside react-navigation and Animated but found nothing. What I also found is that sometimes if we trigger the bug, then moving the browser window or changing focus fixes it. This leads me to believe that perhaps there is some problem in Safari related to painting, updating screen etc. Perhaps the internal Animated/progress.interpolate implementation has a bug that did not surface before 🤷

I guess the only 2 things to do that I can come up right now is to: A. disable/remove concurrent mode B. somehow disable this specific animation (see video 1)

Perhaps someone with more experience with animations could dig deeper and come up with something better.

vid1: interpolate animation disabled for RHP transition

https://github.com/Expensify/App/assets/3929868/5f991e73-6eba-420b-b7af-31863d07b313

Kicu commented 1 month ago

@adamgrzybowski helped a lot of with this. Thanks 🙇

Kicu commented 1 month ago

I pushed a somewhat dirty hotfix here: https://github.com/Expensify/App/pull/44840

We could probably write the same code in a nicer way, but for now we can at least test since this is a deploy blocker

ShridharGoel commented 1 month ago

Should I help with testing since I'm able to replicate easily on local setup?

ShridharGoel commented 1 month ago

https://github.com/Expensify/App/pull/44840#issuecomment-2209272361

s77rt commented 1 month ago

Passing the torch to @ishpaul777 as he can reproduce the bug and can better test the solution (Slack thread).

melvin-bot[bot] commented 1 month ago

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

Kicu commented 1 month ago

@mountiny I left some comments on my PR about what to do next since I cannot reproduce anymore, also asked a few folks in SWM to test how this behaves for them. I leave the decisions what to do next to you.

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.5-13 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-17. :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:

BrtqKr commented 1 month ago

Hey, we've noticed that this issue happens only on the most recent versions of safari (17.x.x). I've created a react-navigation issue. We'll try to research it at the library level, so this might help to resolve this, but atm I'd suggest keeping the workaround @Kicu applied.

https://github.com/react-navigation/react-navigation/issues/12058

melvin-bot[bot] commented 1 month ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.6-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-22. :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:

jliexpensify commented 1 month ago

Bump @ishpaul777 for the checklist!

Payment Summary

Upwork job

jliexpensify commented 1 month ago

Paid and job closed. Bump @ishpaul777 for the checklist.

ishpaul777 commented 1 month ago

will complete checklist today for sure 👍

ishpaul777 commented 1 month ago
jliexpensify commented 1 month ago

Thanks, closing!