App icon indicating copy to clipboard operation
App copied to clipboard

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

Open kbecciv opened this issue 4 years 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!


We found this issue when executing https://github.com/Expensify/App/pull/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): [email protected]

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

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/163404431-1f621560-2c5f-44b7-ac99-662cde7b0a35.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause

Slack conversation:

View all open jobs on GitHub

kbecciv avatar Apr 14 '22 13:04 kbecciv

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

melvin-bot[bot] avatar Apr 14 '22 13:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 14 '22 17:04 melvin-bot[bot]

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

michaelhaxhiu avatar Apr 14 '22 21:04 michaelhaxhiu

This can be external!

yuwenmemon avatar Apr 14 '22 22:04 yuwenmemon

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

melvin-bot[bot] avatar Apr 15 '22 14:04 melvin-bot[bot]

Posted! https://www.upwork.com/jobs/~0161ef6695919d8c97

mallenexpensify avatar Apr 15 '22 22:04 mallenexpensify

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

melvin-bot[bot] avatar Apr 15 '22 22:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 15 '22 22:04 melvin-bot[bot]

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

wildan-m avatar Apr 19 '22 09:04 wildan-m

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

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

mallenexpensify avatar Apr 25 '22 23:04 mallenexpensify

I'm also not sure I understand the bug (but having troubles with NewDot locally so haven't been able to do my own testing). I think since https://github.com/Expensify/App/issues/8470 is resolved we should retest to make sure this is still a bug.

NikkiWines avatar Apr 26 '22 00:04 NikkiWines

@NikkiWines This issue is found when executing PR https://github.com/Expensify/App/pull/8437/ As per Step 5 user should see a textbox when navigating back, but we only see it after refresh. Issue is still repro https://utest-dl.s3.amazonaws.com/testRunStepMinAttachmentsResult/19972675/Recording__312.mp4?AWSAccessKeyId=AKIAJ2UIWMJ2OMC3UCQQ&Expires=1682485321&Signature=YSI6KU4ND72GYyWGLRffN%2Bo5Avo%3D

mvtglobally avatar Apr 26 '22 05:04 mvtglobally

I think more specifically the problem now is that the archivedReason that requires a refresh. The textbox appears immediately, but it reads "This chat room has been archived" until you refresh and see the proper archivedReason.

Before refresh: image

After refresh: image

trjExpensify avatar Apr 27 '22 09:04 trjExpensify

Cool, thank you for retesting @mvtglobally and thanks for the clarification @trjExpensify.

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

@wildan-m, from @trjExpensify's explanation it sounds like we want option (1) here.

NikkiWines avatar Apr 28 '22 01:04 NikkiWines

@NikkiWines , @mvtglobally , @trjExpensify thanks for your confirmation.

I need to clarify another thing. On the second step to reproduce the issue:

  1. Create a new workspace from an account that's on the policyExpenseChat beta (e.g @expensifail.com)

How can I make my account a policyExpenseChat beta account?

I've tried to override this function to return true in my local code:

function canUseAllBetas(betas) {
    return true || Environment.isDevelopment() || _.contains(betas, CONST.BETAS.ALL);
}

and also enabled Use Secure Staging Server in the preferences.

@mvtglobally's screen: image

My local screen: image

There is no Chat Main and Workspace chat on my screen. Am I missing some steps?

wildan-m avatar Apr 28 '22 02:04 wildan-m

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

parasharrajat avatar Apr 28 '22 12:04 parasharrajat

^^ 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 avatar Apr 28 '22 16:04 trjExpensify

@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 avatar Apr 28 '22 16:04 wildan-m

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

wildan-m avatar Apr 28 '22 16:04 wildan-m

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 "[email protected]" before you removed that user)

trjExpensify avatar Apr 28 '22 16:04 trjExpensify