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

[HOLD for payment 2024-03-11] [$500] when a user leaves a thread, clicking the back button does not navigate them back to that specific thread #35810

Closed
1 of 6 tasks
kavimuru opened this issue Feb 5, 2024 · 46 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Feb 5, 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:
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @rafecolton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1705948892215059

Action Performed:

  1. Join a thread by commenting in it
  2. Leave the thread and get taken back to the DM or channel
  3. Hit the back button (or three-finger swipe, cmd + [)

Expected Result:

you are taken back to the thread you were just viewing

Actual Result:

that thread does not appear in the history, and you are taken back to whatever chat you were viewing before

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0166e0dcdf98b9fd23
  • Upwork Job ID: 1756011506926768128
  • Last Price Increase: 2024-02-16
  • Automatic offers:
    • akinwale | Reviewer | 0
    • FitseTLT | Contributor | 0
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Overdue label Feb 7, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

@muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot removed the Overdue label Feb 9, 2024
@muttmuure
Copy link
Contributor

Interesting - I can reproduce this

@muttmuure
Copy link
Contributor

I can still see the thread in search

@muttmuure
Copy link
Contributor

However the back button indeed doesn't work to navigate back to the thread I just left. It seems like some polish an external contributor could handle

@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

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

@melvin-bot melvin-bot bot changed the title If someone sends a message in a thread and leaves it disappear from their LHN [$500] If someone sends a message in a thread and leaves it disappear from their LHN Feb 9, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

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

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 9, 2024

This is intentional @muttmuure We remove it from route history.

App/src/libs/actions/Report.ts

Lines 2277 to 2289 in b9aada8

if (lastAccessedReportID) {
// We should call Navigation.goBack to pop the current route first before navigating to Concierge.
Navigation.goBack(ROUTES.HOME);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID));
} else {
const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);
const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
if (chat?.reportID) {
// We should call Navigation.goBack to pop the current route first before navigating to Concierge.
Navigation.goBack(ROUTES.HOME);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));
}
}

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 9, 2024

Proposal

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

If someone sends a message in a thread and leaves it disappear from their LHN

What is the root cause of that problem?

We goBack in here before navigating to the reports after leaving thread so it will be removed from the route history so navigating back will not navigate to the thread

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

I think this behaviour ^ should only be applied for rooms but for a Chat Thread we should n't goBack so change it to

if (lastAccessedReportID) {
        // We should call Navigation.goBack to pop the current route first before navigating to Concierge.
        if (!ReportUtils.isChatThread(report)) {
            Navigation.goBack(ROUTES.HOME);
        }
        Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID));
    } else {
        const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);
        const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
        if (chat?.reportID) {
            // We should call Navigation.goBack to pop the current route first before navigating to Concierge.
            if (!ReportUtils.isChatThread(report)) {
                Navigation.goBack(ROUTES.HOME);
            }
            Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));
        }
    }

What alternative solutions did you explore? (Optional)

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 9, 2024

@muttmuure I had a second thought on #35810 (comment) I think we should only clear it from history for chat rooms for simple chat threads we shouldn't so I have commented a proposal based on it.

@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

@akinwale, @muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@muttmuure
Copy link
Contributor

@akinwale mind reviewing the proposal above?

@melvin-bot melvin-bot bot removed the Overdue label Feb 13, 2024
@akinwale
Copy link
Contributor

We can move forward with @FitseTLT's proposal here.

🎀👀🎀 C+ reviewed.

Copy link

melvin-bot bot commented Feb 13, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Feb 15, 2024
Copy link

melvin-bot bot commented Feb 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Feb 19, 2024

@akinwale @techievivek @muttmuure 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!

Copy link

melvin-bot bot commented Feb 19, 2024

@akinwale, @techievivek, @muttmuure Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Mar 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.46-2 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 2024-03-11. 🎊

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

Copy link

melvin-bot bot commented Mar 4, 2024

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:

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 11, 2024
@techievivek
Copy link
Contributor

Not overdue, payment is due on 11 March.

@melvin-bot melvin-bot bot removed the Overdue label Mar 12, 2024
@techievivek
Copy link
Contributor

Oops, looks like automation didn't work here. @muttmuure Could we issue the payment here.

@melvin-bot melvin-bot bot added the Overdue label Mar 14, 2024
Copy link

melvin-bot bot commented Mar 15, 2024

@akinwale, @techievivek, @FitseTLT, @muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@techievivek
Copy link
Contributor

Gentle bump @muttmuure to look into the payment for this GH. 🙏

@melvin-bot melvin-bot bot removed the Overdue label Mar 18, 2024
@muttmuure
Copy link
Contributor

Was out of office, looking now!

@muttmuure
Copy link
Contributor

All paid

@muttmuure
Copy link
Contributor

@akinwale @FitseTLT please can you recommend if we need a regression test

@muttmuure muttmuure added Weekly KSv2 and removed Daily KSv2 labels Mar 19, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@techievivek
Copy link
Contributor

Gentle bump @akinwale @FitseTLT for the regression tests here.

@melvin-bot melvin-bot bot removed the Overdue label Apr 3, 2024
@akinwale
Copy link
Contributor

akinwale commented Apr 3, 2024

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

Not necessarily a regression. The behaviour was intentionally modified.

  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Steps

  1. Launch Expensify.
  2. Join a thread by commenting in an existing thread or start a new thread.
  3. Leave the thread.
  4. Navigate back (using the Back button or a shortcut for navigating back).
  5. Verify that the app navigated back to the same thread that was just exited.

Do we agree 👍 or 👎?

@akinwale
Copy link
Contributor

akinwale commented Apr 3, 2024

@techievivek Done!

@techievivek
Copy link
Contributor

Looks good to me, @muttmuure can we add this to testrail? thanks.

@melvin-bot melvin-bot bot added the Overdue label Apr 11, 2024
@techievivek
Copy link
Contributor

Gentle bump @muttmuure for adding the regression test to testRail.

@melvin-bot melvin-bot bot removed the Overdue label Apr 12, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 22, 2024
@muttmuure
Copy link
Contributor

Done

@melvin-bot melvin-bot bot removed the Overdue label Apr 23, 2024
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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants