Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Due for payment 2025-03-13] [$500] Web - On leaving thread & tapping back, user directed to previous visited page #54574

Open
1 of 8 tasks
vincdargento opened this issue Dec 25, 2024 · 54 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@vincdargento
Copy link

vincdargento commented Dec 25, 2024

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: v9.0.78-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Start in a DM with someone or any room in a workspace
  3. Go to your self DM
  4. Send a message and open reply in thread page
  5. Comment in the thread
  6. Click header to go back to your self DM
  7. Tap browser back button

Expected Result:

Land back in the thread

Actual Result:

Land on the DM or room I was in before

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

CleanShot.2025-01-21.at.11.02.49.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021881910352701713160
  • Upwork Job ID: 1881910352701713160
  • Last Price Increase: 2025-02-19
  • Automatic offers:
    • allgandalf | Reviewer | 106195677
    • daledah | Contributor | 106195679
Issue OwnerCurrent Issue Owner: @allgandalf
@vincdargento vincdargento added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 25, 2024
Copy link

melvin-bot bot commented Dec 25, 2024

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

@daledah
Copy link
Contributor

daledah commented Dec 26, 2024

🚨 Edited by proposal-police: This proposal was edited at 2025-02-01 15:23:09 UTC.

Proposal

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

On leaving thread & tapping back user directed to previous visited page

What is the root cause of that problem?

In

Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReportID));
if (isVisibleAction) {
// Pop the chat report screen before navigating to the linked report action.
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReportID, parentReportActionID), true);

we triggered goBack when users click on the report header, that removes the thread report from navigation stack.

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

we should use navigate in this case

 const isVisibleAction = shouldReportActionBeVisible(parentAction, parentAction?.reportActionID ?? CONST.DEFAULT_NUMBER_ID, canUserPerformWriteAction);

                if (isVisibleAction) {
                    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(parentReportID, parentReportActionID));
                }else{
                    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(parentReportID));
                }

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@FitseTLT
Copy link
Contributor

I think this should be considered as expected.

@melvin-bot melvin-bot bot added the Overdue label Dec 30, 2024
Copy link

melvin-bot bot commented Dec 31, 2024

@anmurali Huh... This is 4 days overdue. Who can take care of this?

@anmurali
Copy link

@FitseTLT - So #37355 was reverted? And we don't plan to change this behavior?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 31, 2024
Copy link

melvin-bot bot commented Jan 6, 2025

@anmurali Huh... This is 4 days overdue. Who can take care of this?

@anmurali
Copy link

anmurali commented Jan 8, 2025

Bumped @FitseTLT here

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2025
Copy link

melvin-bot bot commented Jan 8, 2025

@anmurali this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jan 10, 2025
@daledah
Copy link
Contributor

daledah commented Jan 13, 2025

@anmurali I think we still need to fix this bug, it's a mistake during the implementation

Copy link

melvin-bot bot commented Jan 13, 2025

@anmurali Eep! 4 days overdue now. Issues have feelings too...

@FitseTLT
Copy link
Contributor

@FitseTLT - So #37355 was reverted? And we don't plan to change this behavior?

@anmurali Sorry for the late response. What I am saying is the PR's behaviour has been changed with another PR not exactly reverted but now I don't think strongly about the behavior in #37355 So the right thing to do for you would be to raise a discussion internally with engineers and make sure if we really now want to apply that behavior. But in my opinion leaving a thread and going back it is okay to navigate to the last accessed report.

@daledah
Copy link
Contributor

daledah commented Jan 15, 2025

@anmurali What do you think about these comment above? Thanks

Copy link

melvin-bot bot commented Jan 15, 2025

@anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Copy link

melvin-bot bot commented Jan 17, 2025

@anmurali Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

Copy link

melvin-bot bot commented Jan 21, 2025

@anmurali 12 days overdue. Walking. Toward. The. Light...

@anmurali anmurali added the External Added to denote the issue can be worked on by a contributor label Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

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

@melvin-bot melvin-bot bot changed the title Web - On leaving thread & tapping back, user directed to previous visited page [$250] Web - On leaving thread & tapping back, user directed to previous visited page Jan 22, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

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

@rayane-d
Copy link
Contributor

@rayane-d Can you please explain why this change? Thanks

I vaguely remember, but we fixed multiple regressions after implementing this feature. Below are the regression tests.

@allgandalf @daledah Please confirm that these tests still pass with your solution:


Test 1:

  1. Go to chat.
  2. Go offline.
  3. Send a message.
  4. Create a thread on the message.
  5. Click on the parent "Thread" link.
  6. Verify that the parent report is opened and the parent message is highlighted.

Test 2:

  1. Go to chat.
  2. Go offline.
  3. Send a message.
  4. Create a thread on the message.
  5. Click on the parent "Thread" link.
  6. Verify that the parent report is opened without skeleton loading (the parent message is not highlighted offline)

Test 3:

  1. Open a report.
  2. Create a task.
  3. Go to task report.
  4. Delete the task.
  5. Click the room link under the header subtitle.
  6. Verify that the parent will open without issue.

Test 4 (Web and mWeb only):

  1. Open any report
  2. Send some messages (around 6-7 messages)
  3. Hover over the 3rd or 4th parent message and click on Reply in the thread
  4. Click on <<user's from>> link in header
  5. Hover over the same parent message (which is already highlighted)
  6. Click on reply in a thread
  7. Go back to the main chat by the back button browser or the back button in the header
  8. Verify that all parent messages are displayed in the main chat after going back from the thread by clicking the header back button or browser back button

Test 5:

  1. Go to any chat
  2. Send a message
  3. Right-click on the message > Reply in the thread
  4. Send a reply
  5. Click on the link in the header subtitle to return to main chat
  6. Send a message in the main chat
  7. Verify that the new message in Step 6 will appear in the chat view

Test 6:

  1. Navigate to a report that has multiple messages
  2. Mark a message at the bottom of the list unread
  3. Scroll up to older message
  4. Reply in the thread with one of the older messages
  5. Click on the 'From' link on the thread header
  6. Scroll up to older messages
  7. 'New message' button should be displayed

Test 7 :

  1. Send a message
  2. Right click on the message > Reply in thread
  3. Click on the header subtitle link
  4. Delete the message
  5. Verify that instead of not here page, we still show the report that contains the deleted message.

Test 8:

  1. Go to chat
  2. Send a message
  3. Send a reply to the message in thread
  4. Click on the header subtitle
  5. Send a message
  6. Note that user can send a message
  7. Swipe right twice to return to the main chat but without highlight on the parent message
  8. Send a message
  9. Verify that the user is be able to send a message

Test 9:

  1. Go to chat
  2. Send a message
  3. Send a reply to the message in thread
  4. Click on the header subtitle
  5. Send a message
  6. Note that user can send a message
  7. Swipe right twice to return to the main chat but without highlight on the parent message
  8. Send a message
  9. Verify that the user is be able to send a message

Test 10:

  1. Go to a DM
  2. Send a message
  3. Create a thread and reply to the message in thread
  4. Tap on profile photo to open the user’s profile details
  5. Tap back
  6. Click on header subtitle
  7. Go back. You’re not at root level thread
  8. Verify that you can send a message

Test 11:

  1. Go to FAB> Submit expense> Complete the flow
  2. Go to thread transaction page
  3. Go back to request page.
  4. Expected Result:
  5. There should be no loading spinner when open the request page
  6. copy link to comment in a report
  7. visit the link.
  8. Send a new message in report.
  9. Expected Result:
  10. No loading indicator at the bottom

@allgandalf
Copy link
Contributor

Thanks for the details here @rayane-d 🙇

@daledah please be sure to include a video testing all these tests in the PR detailed section

@daledah
Copy link
Contributor

daledah commented Feb 20, 2025

@rayane-d Please help me clarify these points:

  1. Can you tell me the difference between Test 1 and 2? I don't see why the expected behavior would not be the same.
  2. In test 3, when deleting the task we automatically navigate back to parent report
Screen.Recording.2025-02-20.at.23.12.33.mp4
  1. Test 8 and 9 are the same.
  2. There's a missing step in step 11, I'm assuming it's "Send a message in request page"?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 21, 2025
@daledah
Copy link
Contributor

daledah commented Feb 21, 2025

@allgandalf PR is opened for review, waiting for @rayane-d to response my comment to continue with all the tests.

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@daledah
Copy link
Contributor

daledah commented Feb 25, 2025

Friendly bump @rayane-d in case you missed #54574 (comment)

@rayane-d
Copy link
Contributor

rayane-d commented Mar 2, 2025

  1. Can you tell me the difference between Test 1 and 2? I don't see why the expected behavior would not be the same.

Test 1 should actually be:

  1. Go to chat.
  2. Send a message.
  3. Create a thread on the message.
  4. Click on the parent "Thread" link.
  5. Verify that the parent report is opened and the parent message is highlighted.

Test 2 is from this issue: #39264

  1. In test 3, when deleting the task we automatically navigate back to parent report

Test 3 is from this issue: #39251

Test 8 and 9 are the same.

Yes, my bad!

There's a missing step in step 11, I'm assuming it's "Send a message in request page"?

Yes, correct!


You can follow the steps and recordings from these PRs:

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 6, 2025
@melvin-bot melvin-bot bot changed the title [$500] Web - On leaving thread & tapping back, user directed to previous visited page [Due for payment 2025-03-13] [$500] Web - On leaving thread & tapping back, user directed to previous visited page Mar 6, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 6, 2025
Copy link

melvin-bot bot commented Mar 6, 2025

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

Copy link

melvin-bot bot commented Mar 6, 2025

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

If no regressions arise, payment will be issued on 2025-03-13. 🎊

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

Copy link

melvin-bot bot commented Mar 6, 2025

@allgandalf @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@anmurali anmurali removed their assignment Mar 7, 2025
@anmurali anmurali added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Mar 7, 2025
Copy link

melvin-bot bot commented Mar 7, 2025

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 7, 2025
@sakluger
Copy link
Contributor

sakluger commented Mar 7, 2025

Moving back to weekly since we're still almost a week out from the payment date.

@sakluger sakluger added Weekly KSv2 and removed Daily KSv2 labels Mar 7, 2025
@allgandalf
Copy link
Contributor

allgandalf commented Mar 10, 2025

@sakluger lets put it back to daily tomorrow , so that i don;t miss the checklis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

9 participants