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.56k stars 2.9k forks source link

[HOLD for payment 2024-07-24] [HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [CRITICAL] [$250] Comment link - Navigating to a report action comment doesn't scroll the report page #44625

Closed lanitochka17 closed 3 months ago

lanitochka17 commented 4 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.3-1 Reproducible in staging?: Y Reproducible in production?: N 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. Navigate to staging.new.expensify.com
  2. Open a chat with a user and send a lot of comments so that there is a scrollable history
  3. Go to the top comment and copy the link to that comment
  4. Open another chat and navigate to the copied link

Expected Result:

The chat page scrolls to that specific comment

Actual Result:

The report page opens up but doesn't scroll to the specific comment

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/0e401f8c-947b-488a-be13-f28a05815b8e

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016eb6bedcd3171adc
  • Upwork Job ID: 1808449293455136963
  • Last Price Increase: 2024-07-03
Issue OwnerCurrent Issue Owner: @slafortune
melvin-bot[bot] commented 4 months ago

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

github-actions[bot] commented 4 months 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.
lanitochka17 commented 4 months ago

@bondydaa 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 4 months ago

We think that this bug might be related to #vip-vsp

bondydaa commented 4 months ago

i'm pretty sure if this only happens on web then it's most likely an app thing and not a web deploy problem.

srikarparsi commented 4 months ago

Hey @nkdengineer and @mollfpr, could you take a look if this regression is from this PR whenever you have a chance?

bondydaa commented 4 months ago

☝️. that PR is the only one that stood out to me from the checklist that looks like it might be related to comment linking in some way so i'd ping'd srikar 1:1.

nkdengineer commented 4 months ago

@srikarparsi I tried to revert my PR and it doesn't fix this issue. Correct me if I missed something.

tsa321 commented 4 months ago

Offending PR: https://github.com/Expensify/App/pull/42592

The ReportScreen gets mounted, unmounted, mounted, unmounted, and then mounted again.

In the network tab of the developer tools, the OpenReport API request is being called twice, when opening a report.

Kicu commented 4 months ago

Just two cents from me (im the author of the react PR)

In the network tab of the developer tools, the OpenReport API request is being called twice, when opening a report.

as long as we are using StrictMode to try and prevent any possible future errors with react concurrent, the double requests will keep happening. That is how strict mode is supposed to work.

At least in theory we should try to make the app work despite the double renders.

jasperhuangg commented 4 months ago

Offending PR: https://github.com/Expensify/App/pull/42592

The ReportScreen gets mounted, unmounted, mounted, unmounted, and then mounted again.

In the network tab of the developer tools, the OpenReport API request is being called twice, when opening a report.

@tsa321

Did you test this out with your local build of the App? I think the logic added in that PR only runs on dev builds, so since this is also happening on staging I don't think that's the cause.

jasperhuangg commented 4 months ago

@Kicu ^ please correct me if I'm wrong 🙇

tsa321 commented 4 months ago

@tsa321

Did you test this out with your local build of the App? I think the logic added in that PR only runs on dev builds, so since this is also happening on staging I don't think that's the cause.

@jasperhuangg you are right, Looks like I made a mistake.

jasperhuangg commented 4 months ago

Can't reproduce this anymore after reverting https://github.com/Expensify/App/pull/44412

~~cc @roryabraham ~~

EDIT: Made a mistake, the page still scrolls but just not all the way that's not related

Kicu commented 4 months ago

@Kicu ^ please correct me if I'm wrong 🙇

You are correct I believe. Staging should run production build of React and so if an error happens both on dev and on staging it shouldn't be because of StrictMode.

Btw I didn't check the actual build/deploy scripts, but if one opens react performance devtools on staging they don't work, with the message that a dev build is required. I hope that is enough of a confirmation 😅

bondydaa commented 4 months ago

hm so i tested on staging and it links me to the correct comment and highlights it but it is more "bottom pinned" where the comment loads at the very bottom instead of the top.

https://github.com/Expensify/App/assets/4073354/ca4f6e42-bdd3-4c1f-8d0b-b85db3ac68b8

bondydaa commented 4 months ago

okay a couple more cases here...

this is a case where you link to the top most comment when you have enough to make the page scrollable which won't scroll back up

https://github.com/Expensify/App/assets/4073354/c873c4c3-6bf1-4b5f-82f1-87ebf7967886

And then this case shows where you have more messages below the linked comment and the linked comment gets "bottom pinned" and can't be scrolled until you click new messages which loads more messages underneath them.

https://github.com/Expensify/App/assets/4073354/bb3991d5-b384-46b5-a676-8c39dd8487d1

ishpaul777 commented 4 months ago

shows where you have more messages below the linked comment and the linked comment gets "bottom pinned" and can't be scrolled until you click new messages which loads more messages underneath them.

this seems to be similar to https://github.com/Expensify/App/issues/40644 should be fixed in https://github.com/Expensify/App/pull/41962

bondydaa commented 4 months ago

thanks @ishpaul777 for that context.

Lets just focus then on why we've stopped scrolling "up" then on this bug report.

ishpaul777 commented 4 months ago

~I am trying to revert https://github.com/Expensify/App/pull/43531, to check if thats the offending PR~

Edit: no it's not the offending PR

melvin-bot[bot] commented 4 months ago

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

melvin-bot[bot] commented 4 months ago

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

mountiny commented 4 months ago

Looking for help identifying the fix

jasperhuangg commented 4 months ago

This issue has been blocking deploy for almost 3 days–we decided it was more harmful for it to keep blocking deploy than to let a bug with comment linking go out to production.

I added it to the #newdot-quality project and marked it CRITICAL

mountiny commented 4 months ago

@hurali97 is investigating

melvin-bot[bot] commented 4 months ago

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

melvin-bot[bot] commented 4 months 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:

mvtglobally commented 4 months ago

Issue not reproducible during KI retests. (First week)

janicduplessis commented 4 months ago

I wasn't aware of this issue, ended up investigating as part of the issues we found when working on https://github.com/Expensify/App/pull/41962

https://github.com/Expensify/App/pull/45313 fixes it.

I'm pretty sure this is a dev only issue since it happens only when strict mode is on so it would explain why it is not reproducible on staging.

jasperhuangg commented 4 months ago

@janicduplessis we were able to reliably reproduce the issue on staging when we initially ran into it–I don't think it has to do with strict mode.

melvin-bot[bot] commented 4 months 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 4 months ago

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

bondydaa commented 4 months ago

adding BZ for payment, I think just @rayane-djouah for PR reviewing/testing right?

melvin-bot[bot] commented 4 months 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 4 months 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:

slafortune commented 4 months ago

@rayane-djouah - offer sent here

Can you please complete the checklist?

rayane-djouah commented 3 months ago
rayane-djouah commented 3 months ago

@slafortune - Offer accepted and checklist completed. Thanks!

slafortune commented 3 months ago

Paid ✅