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

[Workspace Chats] Web - Chat- Archive reason not immediately available for workspace chats #8644

Closed
kbecciv opened this issue Apr 14, 2022 · 29 comments
Assignees
Labels
Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Apr 14, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


We found this issue when executing #8437
Original issue isn't fixed https://github.com/Expensify/Expensify/issues/204497

Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Create a new workspace from an account that's on the policyExpenseChat beta (e.g @expensifail.com)
  3. Add a new member to the workspace via Manage Members > Invite
  4. Log-in as the member and send a couple of messages in the member's workspace chat
  5. Log back in again to the admin account and remove the member from the workspace via Manage Members > Remove
  6. Go back to LHN and open .
  7. Click back into the workspace chat.

Expected Result:

Textbox is appeared after back into the workspace chat

Actual Result:

Textbox is appeared after refresh the page

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.55.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): applausetester+41322abb@applause.expensifail.com

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug5532904_Screen_Recording_20220413-173202_Chrome.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause

Slack conversation:

View all open jobs on GitHub

@melvin-bot
Copy link

melvin-bot bot commented Apr 14, 2022

Triggered auto assignment to @yuwenmemon (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@yuwenmemon yuwenmemon changed the title Web - Chat- Textbook is not appear immediately, only after refreshed. Web - Chat- Textbox is not appear immediately, only after refreshed. Apr 14, 2022
@yuwenmemon yuwenmemon added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Apr 14, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 14, 2022

Triggered auto assignment to @michaelhaxhiu (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Apr 14, 2022
@yuwenmemon yuwenmemon removed their assignment Apr 14, 2022
@michaelhaxhiu
Copy link
Contributor

@yuwenmemon just to confirm, do you think this issue should be internal or external?

@yuwenmemon
Copy link
Contributor

This can be external!

@michaelhaxhiu michaelhaxhiu removed their assignment Apr 15, 2022
@michaelhaxhiu michaelhaxhiu added the External Added to denote the issue can be worked on by a contributor label Apr 15, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 15, 2022

Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@mallenexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Apr 15, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 15, 2022

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 15, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 15, 2022

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

@melvin-bot melvin-bot bot changed the title Web - Chat- Textbox is not appear immediately, only after refreshed. [$250] Web - Chat- Textbox is not appear immediately, only after refreshed. Apr 15, 2022
@wildan-m
Copy link
Contributor

@kbecciv How should it behave when a member is deleted from the workspace?

(1) Should it keep the old chat but hide the textbox or (2) delete the chat archive completely.

I can't reproduce the above issue exactly.
What happened to me is similar with this issue #8470

It can only be refreshed after logout and re-login and the chat entries are completely gone.

@mallenexpensify
Copy link
Contributor

Doubled price to $500
https://www.upwork.com/jobs/~0161ef6695919d8c97

@parasharrajat , can you help with @wildanmuhlis2 's question above?

@parasharrajat
Copy link
Member

@wildan-m do this.

  1. enable the beta as you did from Permissions.js. BTW they should be already enabled on dev server.
function canUsePolicyRooms(betas) {
    return true || _.contains(betas, CONST.BETAS.POLICY_ROOMS) || _.contains(betas, CONST.BETAS.ALL);
}

/**
 * @param {Array<String>} betas
 * @returns {Boolean}
 */
function canUsePolicyExpenseChat(betas) {
    return true || _.contains(betas, CONST.BETAS.POLICY_EXPENSE_CHAT) || canUseAllBetas(betas);
}
  1. Now Go to the Green Plus icon for the LHN (chat list).
  2. See if it gives an option to create a room (new Room).
  3. Create a Room.

Then follow the steps from the issue description.

@trjExpensify
Copy link
Contributor

^^ A policyExpenseChat gets created automatically for each member of a workspace, so you don't need to create a New room to test this.

@wildan-m
Copy link
Contributor

@parasharrajat after overriding canUsePolicyRooms , I can create a custom room for a specific workspace, but it's different from the chat room shown on @mvtglobally's screen. Her screen doesn't have a hashtag prefix.

My screen after create custom room:
image

Also, this custom room behave differently when member access revoked. It will show the textbox but pointed to Unavailable Workspace
image

@wildan-m
Copy link
Contributor

^^ A policyExpenseChat gets created automatically for each member of a workspace, so you don't need to create a New room to test this.

@trjExpensify Does it only work for account @expensifail.com? I use @gmail.com for test account

@trjExpensify
Copy link
Contributor

Not that I'm aware, just requires the policyExpenseChat beta. Did you CMD+K search for a member on the workspace to find the workspace chat? (E.g "wildevemail@gmail.com" before you removed that user)

@parasharrajat
Copy link
Member

Oh, yeah. Sorry, I didn't notice this. I wasn't aware of that feature. I can't find the same.

@TomatoToaster
Copy link
Contributor

I'm just being aware of this issue now, but I think this is better as an internal issue since users outside of the policyExpenseChat beta will never be able to see Workspace Chats (different from policyRooms). We filter out policyExpenseChats at the API level and so there's nothing you can do in the client that would let you access them.

@TomatoToaster TomatoToaster added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Exported labels Apr 28, 2022
@TomatoToaster TomatoToaster changed the title [$500] Web - Chat- Textbox is not appear immediately, only after refreshed. Web - Chat- Textbox is not appear immediately, only after refreshed. Apr 28, 2022
@wildan-m
Copy link
Contributor

@TomatoToaster thanks for your clarification, I'll move to other issues then

@TomatoToaster
Copy link
Contributor

Actually in testing this right now, it seems to be fixed! 🎉

Here's a screen recording testing this on production:

Screen.Recording.2022-05-02.at.11.41.16.AM.mov

I think this may have been inadvertently fixed when other PRs relating to the archive reason were merged since this issue was opened.

I'll wait for @trjExpensify or QA to confirm before closing this out, but I think no PR is necessary for this one.

@trjExpensify
Copy link
Contributor

Looks like we're good here!

archivereason

@trjExpensify
Copy link
Contributor

👋 @TomatoToaster - when I removed the member from the workspace, it still took navigating away and back to the workspace chat for the archiveReason to update:

archivereason1

@trjExpensify trjExpensify reopened this May 20, 2022
@JmillsExpensify
Copy link

Should we create a new issue for this one @TomatoToaster or keep using the old issue?

@TomatoToaster
Copy link
Contributor

This issues fine, I can look into this one.

@TomatoToaster TomatoToaster changed the title Web - Chat- Textbox is not appear immediately, only after refreshed. [Workspace Chats] Web - Chat- Archive reason not immediately available for workspace chats May 31, 2022
@TomatoToaster
Copy link
Contributor

Got a PR for this one, should be in review soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests