App icon indicating copy to clipboard operation
App copied to clipboard

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

Open lanitochka17 opened this issue 1 year ago • 29 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

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: @rayane-djouah

lanitochka17 avatar Jun 28 '24 14:06 lanitochka17

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

melvin-bot[bot] avatar Jun 28 '24 14:06 melvin-bot[bot]

: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.

github-actions[bot] avatar Jun 28 '24 14:06 github-actions[bot]

@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 avatar Jun 28 '24 14:06 lanitochka17

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

lanitochka17 avatar Jun 28 '24 14:06 lanitochka17

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

bondydaa avatar Jun 28 '24 15:06 bondydaa

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

srikarparsi avatar Jun 28 '24 17:06 srikarparsi

☝️. 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.

bondydaa avatar Jun 28 '24 17:06 bondydaa

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

nkdengineer avatar Jun 29 '24 03:06 nkdengineer

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 avatar Jun 29 '24 18:06 tsa321

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.

Kicu avatar Jul 01 '24 07:07 Kicu

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 avatar Jul 01 '24 19:07 jasperhuangg

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

jasperhuangg avatar Jul 01 '24 19:07 jasperhuangg

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

tsa321 avatar Jul 01 '24 21:07 tsa321

~~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

jasperhuangg avatar Jul 02 '24 00:07 jasperhuangg

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

Kicu avatar Jul 02 '24 06:07 Kicu

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 avatar Jul 02 '24 15:07 bondydaa

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

bondydaa avatar Jul 02 '24 15:07 bondydaa

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

ishpaul777 avatar Jul 02 '24 16:07 ishpaul777

thanks @ishpaul777 for that context.

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

bondydaa avatar Jul 02 '24 17:07 bondydaa

~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

ishpaul777 avatar Jul 02 '24 17:07 ishpaul777

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

melvin-bot[bot] avatar Jul 03 '24 10:07 melvin-bot[bot]

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

melvin-bot[bot] avatar Jul 03 '24 10:07 melvin-bot[bot]

Looking for help identifying the fix

mountiny avatar Jul 03 '24 10:07 mountiny

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

jasperhuangg avatar Jul 03 '24 17:07 jasperhuangg

@hurali97 is investigating

mountiny avatar Jul 03 '24 21:07 mountiny

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

melvin-bot[bot] avatar Jul 10 '24 10:07 melvin-bot[bot]

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:

  • https://github.com/Expensify/App/pull/44819

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:

  • @rayane-djouah requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Jul 10 '24 10:07 melvin-bot[bot]

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Jul 11 '24 03:07 mvtglobally

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.

janicduplessis avatar Jul 11 '24 19:07 janicduplessis

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

jasperhuangg avatar Jul 11 '24 23:07 jasperhuangg