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-07-10] [HOLD for payment 2024-07-02] [$125] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin #44237

Closed
6 tasks done
izarutskaya opened this issue Jun 24, 2024 · 35 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

@izarutskaya
Copy link

izarutskaya commented Jun 24, 2024

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.1-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition:

  • User is invited to a workspace.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat as workspace member.
  3. Click on the chat header.
  4. Click Leave.
  5. Go to Troubleshoot > Clear cache and restart > Reset and refresh (or relogin).

Expected Result:

Users cannot leave workspace chat. That is the chat where they are in the employee role

Actual Result:

The workspace chat reappears in LHN after leaving the chat and relogin.

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

Bug6522629_1719216943415.20240624_161246.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c734d656ba4811ea
  • Upwork Job ID: 1805206172124171293
  • Last Price Increase: 2024-06-24
  • Automatic offers:
    • ishpaul777 | Reviewer | 102854287
    • bernhardoj | Contributor | 102854288
Issue OwnerCurrent Issue Owner: @JmillsExpensify
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

Copy link

melvin-bot bot commented Jun 24, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jun 24, 2024
Copy link
Contributor

👋 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
Copy link
Author

@JmillsExpensify 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
Copy link
Author

We think this issue might be related to the #collect project.

@mountiny
Copy link
Contributor

@izarutskaya in this case, is it the user leaving their own workspace chat? I dont think that should be possible

@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed DeployBlocker Indicates it should block deploying the API labels Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

@melvin-bot melvin-bot bot changed the title Workspace - Workspace chat reappears in LHN after leaving the chat and relogin [$250] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin Jun 24, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

@mountiny mountiny changed the title [$250] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin [$125] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

Upwork job price has been updated to $125

@mountiny
Copy link
Contributor

Marking as external. The expected behaviour is that the Leave button should not be available when its your workspace chat

@bernhardoj
Copy link
Contributor

Proposal

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

User can leave from their own workspace chat.

What is the root cause of that problem?

In #43251, we add the leave button for the workspace chat too if it's not the workspace admin.

const shouldShowLeaveButton = !isThread && (isGroupChat || (isChatRoom && ReportUtils.canLeaveChat(report, policy)) || (isPolicyExpenseChat && !isPolicyAdmin));

I believe this is because we are now able to invite users to the workspace chat, so it makes sense for the invited user to be able to leave, but not for the workspace chat owner.

What changes do you think we should

Prevent the leave button from showing if it's an own workspace chat.

const shouldShowLeaveButton = !isThread && (... || (isPolicyExpenseChat && !report.isOwnPolicyExpenseChat && !isPolicyAdmin));

@lanitochka17
Copy link

lanitochka17 commented Jun 25, 2024

Hello. Issue still happens another way. Fail or new issue?
The steps are the same except that the user is now invited to workspace chat instead of workspace

-423736081570707755520240625_002948.1.MP4

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 25, 2024
@melvin-bot melvin-bot bot changed the title [$125] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin [HOLD for payment 2024-07-02] [$125] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.1-19 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-07-02. 🎊

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

Copy link

melvin-bot bot commented Jun 25, 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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] 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:
  • [@ishpaul777] 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:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@ishpaul777
Copy link
Contributor

I was able to reproduce #44237 (comment), it looks like when a member leave workspace chat API throws error

Screenshot 2024-06-26 at 12 34 52 PM

cc @mountiny

@mountiny
Copy link
Contributor

@ishpaul777 you should not get the leave button in the report details, so then you should not be able to leave the chat. How come its still visible for the workspace chat you own?

@ishpaul777
Copy link
Contributor

Its not a workspace chat user own but a chat user is invited to.

@mountiny
Copy link
Contributor

Oh I see, i think that would be a new issue. @izarutskaya Can you please log this with the specific steps, ie its user that is invited and they are not able to leave the chat afterwards

I think we are calling wrong api command, it should call LeaveRoom or something like that

@lanitochka17
Copy link

@mountiny I will leave a link when it is ready

@lanitochka17
Copy link

@mountiny A new issue is ready #44492

@mountiny
Copy link
Contributor

Cool thanks, I think that is ready for payment then

$125 to @bernhardoj and to @ishpaul777

@melvin-bot melvin-bot bot added Daily KSv2 Weekly KSv2 and removed Weekly KSv2 Daily KSv2 labels Jul 2, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-02] [$125] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin [HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$125] Workspace - Workspace chat reappears in LHN after leaving the chat and relogin Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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-07-10. 🎊

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

Copy link

melvin-bot bot commented Jul 3, 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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] 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:
  • [@ishpaul777] 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:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@JmillsExpensify
Copy link

Issuing payments based on Vit's payment summary above. Do we need a regression test for this though?

@JmillsExpensify
Copy link

Also @bernhardoj will you be requesting via NewDot?

@bernhardoj
Copy link
Contributor

@JmillsExpensify yes, requested in ND.

@JmillsExpensify
Copy link

$125 approved for @bernhardoj

@JmillsExpensify
Copy link

JmillsExpensify commented Jul 11, 2024

Closing this one out! Contributors have been approved for payment via ND and Upwork.

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

6 participants