[Workspace Chats] Web - Chat- Archive reason not immediately available for workspace chats
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:
- Go to https://staging.new.expensify.com
- Create a new workspace from an account that's on the policyExpenseChat beta (e.g @expensifail.com)
- Add a new member to the workspace via Manage Members > Invite
- Log-in as the member and send a couple of messages in the member's workspace chat
- Log back in again to the admin account and remove the member from the workspace via Manage Members > Remove
- Go back to LHN and open .
- 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:
Triggered auto assignment to @yuwenmemon (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Triggered auto assignment to @michaelhaxhiu (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
@yuwenmemon just to confirm, do you think this issue should be internal or external?
This can be external!
Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Posted! https://www.upwork.com/jobs/~0161ef6695919d8c97
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)
Triggered auto assignment to @NikkiWines (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@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.
Doubled price to $500 https://www.upwork.com/jobs/~0161ef6695919d8c97
@parasharrajat , can you help with @wildanmuhlis2 's question above?
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 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
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:

After refresh:

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 , @mvtglobally , @trjExpensify thanks for your confirmation.
I need to clarify another thing. On the second step to reproduce the issue:
- 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:

My local screen:

There is no Chat Main and Workspace chat on my screen. Am I missing some steps?
@wildan-m do this.
- 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);
}
- Now Go to the Green Plus icon for the LHN (chat list).
- See if it gives an option to create a room (new Room).
- Create a Room.
Then follow the steps from the issue description.
^^ A policyExpenseChat gets created automatically for each member of a workspace, so you don't need to create a New room to test this.
@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:

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

^^ A
policyExpenseChatgets created automatically for each member of a workspace, so you don't need to create aNew roomto test this.
@trjExpensify Does it only work for account @expensifail.com? I use @gmail.com for test account
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)