You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-03-05] [$250] Room - #announce room can be created via room mention #50173
Version Number: 9.0.44-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):applausetester+pso@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Go to staging.new.expensify.com
Create a new workspace.
Go to FAB > Start chat > Room.
Enter #announce as room name and save it.
Note that it shows error that the room name cannot be #announce.
Go to workspace chat.
Send message containing #announce mention.
Click Yes from the whisper to create the room.
Note that #announce room can be created via mention.
Invite 3 members to the workspace.
Note that now there are two #announce rooms.
Expected Result:
In Step 8, app should prevent #announce room from being created via room mention.
Actual Result:
In Step 8. #announce room can be via room mention.
In Step 11, after inviting 3 members to the workspace, it results in two #announce rooms.
@sonialiap FYI 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
Edited by proposal-police: This proposal was edited at 2024-10-14 21:42:57 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 8. #announce room can be via room mention.
In Step 11, after inviting 3 members to the workspace, it results in two #announce rooms.
What is the root cause of that problem?
The policyAnnounce is just created if the policy has 3 or more members. This is handled in PR.
In this bug, when policyAnnounce is not created, then we send a message with room mention #announce, BE returns the actionable whisper, that is incorrect.
What changes do you think we should make in order to solve the problem?
First, BE should not return actionable whisper message when user send #announce message.
Then, we need to modify the error message when creating a new room as well as when editing a room name. When user try creating a room with "announce" as name:
If the policyAnnounce room has not been created yet, should show "This name is reserved for future use. Please choose a different name"
If the policyAnnounce room has been, should show "A room with this name already exists" or "Announce is a default room on all workspaces. Please choose another name."
Below is the code changes:
Introduce a function to check whether the policy has policyAnnounce or not:
} else if (values.roomName === '#announce') {
if (!ValidationUtils.hasAnnounceRoom(reports, values.policyID ?? '-1')) {
ErrorUtils.addErrorMessage(errors, 'roomName', 'This name is reserved for future use. Please choose a different name');
} else {
ErrorUtils.addErrorMessage(errors, 'roomName', translate('newRoomPage.roomAlreadyExistsError'));
}
} else if (ValidationUtils.isReservedRoomName(values.roomName)) {
} else if (values.roomName === '#announce') {
ErrorUtils.addErrorMessage(errors, 'roomName', 'The name #announce is a default room title and cannot be used in a new name, please select a new name');
} else if (ValidationUtils.isReservedRoomName(values.roomName)) {
We only create a workspace when 3 or more participants are added. So, should we update the error message for creating a new room? When a user tries to create a room named 'announce,' my suggestion is:
If the policyAnnounce room has not been created yet, should show "This name is reserved for future use. Please choose a different name" - This message informs the user that the room doesn't exist yet but could be created in the future.
If the policyAnnounce room has been, should show "A room with this name already exists" or "Announce is a default room on all workspaces. Please choose another name." - This clarifies that the room is already created."
@IuliiaHerets can you please test this and confirm the URL of the new announce room you seem to be creating with the mention? I my test the mention links to the workspace announce room, so no new room is being created. I can't repo
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.6-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@allgandalf@sonialiap@allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] 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: N/A this was the way it was from the start
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Pick a workspace that does not have #announce room
Go to that workspace chat
Send #announce to the workspace chat
Verify the room mention does NOT highlight
Verify an actionable whisper Heads up, announce room doesn't exist. Do you want to create it? does NOT appear
Send a room mention that does NOT exist (#test-room for example; should NOT be a reserved room name like #admins or #announce)
Verify the room mention does NOT highlight
Verify an actionable whisper Heads up, announce room doesn't exist. Do you want to create it? appears
Click Yes
Verify that room is created
Verify the room mention highlights
Click the room mention
Verify app opens the room chat
Repeat steps 4 - 6 with another non-existent room mention
Click No
Verify the room mention does NOT highlight & the room is NOT created
Send a room mention that already exists
10 Click the room mention
Verify app opens the room chat
Activity
melvin-bot commentedon Oct 3, 2024
Triggered auto assignment to @sonialiap (
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.IuliiaHerets commentedon Oct 3, 2024
@sonialiap FYI 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
Nodebrute commentedon Oct 3, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
#announce room can be created via room mention
What is the root cause of that problem?
We are adding
#announcein reserved namesApp/src/CONST.ts
Line 1011 in 96aceca
What changes do you think we should make in order to solve the problem?
We can remove
#announcefrom hereApp/src/CONST.ts
Line 1011 in 96aceca
We should also cleanup in other places where we are using #announce
What alternative solutions did you explore? (Optional)
mkzie2 commentedon Oct 4, 2024
Edited by proposal-police: This proposal was edited at 2024-10-14 21:42:57 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 8. #announce room can be via room mention.
In Step 11, after inviting 3 members to the workspace, it results in two #announce rooms.
What is the root cause of that problem?
The
policyAnnounceis just created if the policy has 3 or more members. This is handled in PR.In this bug, when
policyAnnounceis not created, then we send a message with room mention#announce, BE returns the actionable whisper, that is incorrect.What changes do you think we should make in order to solve the problem?
First, BE should not return actionable whisper message when user send
#announcemessage.Then, we need to modify the error message when creating a new room as well as when editing a room name. When user try creating a room with "announce" as name:
If the
policyAnnounceroom has not been created yet, should show "This name is reserved for future use. Please choose a different name"If the
policyAnnounceroom has been, should show "A room with this name already exists" or "Announce is a default room on all workspaces. Please choose another name."policyAnnounceor not:App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Line 161 in 821edc5
App/src/pages/settings/Report/RoomNamePage.tsx
Line 66 in e7c24bb
What alternative solutions did you explore? (Optional)
First, BE should not return actionable whisper message when user send
#announcemessage.Then update the validation:
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Line 161 in 821edc5
App/src/pages/settings/Report/RoomNamePage.tsx
Line 66 in e7c24bb
mkzie2 commentedon Oct 4, 2024
We only create a workspace when 3 or more participants are added. So, should we update the error message for creating a new room? When a user tries to create a room named 'announce,' my suggestion is:
If the policyAnnounce room has not been created yet, should show "This name is reserved for future use. Please choose a different name" - This message informs the user that the room doesn't exist yet but could be created in the future.
If the policyAnnounce room has been, should show "A room with this name already exists" or "Announce is a default room on all workspaces. Please choose another name." - This clarifies that the room is already created."
What do you think? @Expensify/design @sonialiap
sonialiap commentedon Oct 8, 2024
@IuliiaHerets can you please test this and confirm the URL of the new announce room you seem to be creating with the mention? I my test the mention links to the workspace announce room, so no new room is being created. I can't repo
Screen.Recording.2024-10-08.at.4.30.24.PM.mov
MelvinBot commentedon Oct 8, 2024
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
IuliiaHerets commentedon Oct 10, 2024
@sonialiap QA team can repro this issue. The link from both rooms are different. Also, there are two #announce in LHN
20241010_082743.mp4
162 remaining items
melvin-bot commentedon Feb 26, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 26, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.6-1 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 2025-03-05. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 26, 2025
@allgandalf @sonialiap @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
sonialiap commentedon Mar 5, 2025
Payment summary:
allgandalf commentedon Mar 7, 2025
I will complete the checklist tomorrow
allgandalf commentedon Mar 9, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: N/A this was the way it was from the start
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:https://github.com/Expensify/Expensify/issues/479316
Regression Test Proposal
Precondition:
Test:
Verify the room mention does NOT highlight
Verify an actionable whisper Heads up, announce room doesn't exist. Do you want to create it? does NOT appear
Verify the room mention does NOT highlight
Verify an actionable whisper Heads up, announce room doesn't exist. Do you want to create it? appears
Verify that room is created
Verify the room mention highlights
Verify app opens the room chat
Verify the room mention does NOT highlight & the room is NOT created
10 Click the room mention
Verify app opens the room chat
Do we agree 👍 or 👎
allgandalf commentedon Mar 10, 2025
bump for payment @sonialiap
sonialiap commentedon Mar 11, 2025
Thanks @allgandalf for the checklist! Payment made