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
Room - 'No workspace found' page is not displayed when user navigates to room #34253
Version Number: 1.4.24-0 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Sign up with a new account & verify that you are not a member of any workspace
Click on 'FAB' menu > click on 'Start Chat'
Click on 'Room'
Expected Result:
'No workspace found' page should be displayed
Actual Result:
User is navigated to 'Create room' page but is unable to create. a room
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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:
Identify the pull request that introduced this issue and revert it.
What changes do you think we should make in order to solve the problem?
If we only want to create a room for the workspace which is displayed in WorkspaceListPage, we can use PolicyUtils.shouldShowPolicy to filter out the workspace options here. This will be consistent with the list workspaces which we show in the WorkspaceListPage
Well that kind of defeats the purpose of the PR... I think we need to do what @Julesssss suggested in the backend, but waiting for him to double check.
Looks like we're waiting on Vit to confirm, and this might need a backend fix. @iwiznia I assigned you since you'll be on before me tomorrow, and you seem to be familiar with this issue
Should we revert that PR for the meantime so we can continue with deploy? Seems like reverting will just require you to create a workspace and that works as intended - so seems like we should go with that for now and then we can figure out what changes are required later
Activity
github-actions commentedon Jan 10, 2024
👋 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:
melvin-bot commentedon Jan 10, 2024
Triggered auto assignment to @cead22 (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.paultsimura commentedon Jan 10, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
The default "{user}'s Expenses" workspace is now present in Onyx for the newly created users:
And it is not filtered out when building the list of workspaces available for room creation.
What changes do you think we should make in order to solve the problem?
If we don't want to allow to create rooms in it, we should filter out the default "{user}'s Expenses" workspace here:
App/src/pages/workspace/WorkspaceNewRoomPage.js
Lines 188 to 196 in 38cf1b6
Similar to how we decide whether the Policy should be present in the User's policies list:
App/src/libs/PolicyUtils.ts
Lines 80 to 94 in de0a96b
What alternative solutions did you explore? (Optional)
We can partially revert de0a96b by bringing back the
policy.isPolicyExpenseChatEnabledcheck intogetActivePoliciesfunction.dukenv0307 commentedon Jan 10, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
User is navigated to 'Create room' page but is unable to create. a room
What is the root cause of that problem?
BE returns the default policy of the user. So the workspace option is not empty here
App/src/pages/workspace/WorkspaceNewRoomPage.js
Line 190 in 5a3bc6e
What changes do you think we should make in order to solve the problem?
If we only want to create a room for the workspace which is displayed in
WorkspaceListPage, we can usePolicyUtils.shouldShowPolicyto filter out the workspace options here. This will be consistent with the list workspaces which we show in theWorkspaceListPageApp/src/pages/workspace/WorkspaceNewRoomPage.js
Line 190 in 5a3bc6e
What alternative solutions did you explore? (Optional)
NA
paultsimura commentedon Jan 10, 2024
BTW, this is a regression from #34046
cc: @iwiznia
iwiznia commentedon Jan 10, 2024
Huh? Why/how? Ohhhhh, is it because we are not creating the chats for the admin? Basically what @Julesssss pointed out here?
paultsimura commentedon Jan 10, 2024
Yes. We should have kept the
policy.isPolicyExpenseChatEnabledcheck here:We are still keeping this check when deciding whether the Workspace should be visible on Profile -> Workspaces page:
App/src/libs/PolicyUtils.ts
Lines 80 to 94 in de0a96b
iwiznia commentedon Jan 10, 2024
Well that kind of defeats the purpose of the PR... I think we need to do what @Julesssss suggested in the backend, but waiting for him to double check.
Julesssss commentedon Jan 10, 2024
I think you mean @mountiny.
Just noting that the UI issue reminds me of this bug.
iwiznia commentedon Jan 10, 2024
Damnit! Sorry about that. I swear it's your avatars, they look too similar for my shitty ill working eyes 😂
cead22 commentedon Jan 11, 2024
Looks like we're waiting on Vit to confirm, and this might need a backend fix. @iwiznia I assigned you since you'll be on before me tomorrow, and you seem to be familiar with this issue
thienlnam commentedon Jan 11, 2024
Should we revert that PR for the meantime so we can continue with deploy? Seems like reverting will just require you to create a workspace and that works as intended - so seems like we should go with that for now and then we can figure out what changes are required later
thienlnam commentedon Jan 11, 2024
Ended up reverting it #34311 - which actually ended up overlapping with another TS change that was merged to main that I fixed here
iwiznia commentedon Jan 11, 2024
So can we close this now that it was reverted?
thienlnam commentedon Jan 12, 2024
Yeah, we can close this since this bug no longer exists and then move the convo to the original issue