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
[$250] Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace. #53879
Version Number: 9.0.73-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):ibellicotest+86@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Open the Expensify app.
Tap on the workspace switcher on the top left corner.
Select any workspace.
Tap on "Settings" and select "Workspaces"
Tap on the three dots icon on the selected workspace.
Delete the workspace.
Return to inbox using the device back button.
Verify that inbox section is not filtered by the selected workspace anymore and all the chats are displayed.
Expected Result:
When deleting the actual workspace, inbox section should return to "All Chats" mode again.
Actual Result:
After deleting actual workspace and returning to inbox using device back button, chats are still filtered by workspace and are not reseted to "All Chats" mode.
Please re-state the problem that we are trying to solve in this issue.
The home LHN doesn't reset to All chats when deleting the selected workspace from workspace switcher page.
What is the root cause of that problem?
When we delete the workspace, it will call switchPolicyID which pushes a new bottom tab screen, in this case, the Settings, with the policyID param removed.
// If there is no 'Home' route in the BottomTabNavigator or if we are updating a different navigator, we want to push a new route.
return{
type: CONST.NAVIGATION.ACTION_TYPE.PUSH,
payload: {
name,
params,
},
target: bottomTabNavigatorRoute.state.key,
};
[Home, Home (policyA), Settings (policyA)] -> [Home, Home (policyA), Settings (policyA), Settings]
So, the LHN (Home) with the filtered workspace is still in the stack. Also, that's why we need to go back twice from settings, but it's a different issue to discuss. When we go back, we simply pop the screen until we arrive at the LHN with the filtered workspace.
We already have a solution to handle this case, which was added by this PR: #45285, that is by removing the policyID from the LHN (home) when the workspace is missing.
changed the title [-]Android - Inbox - WS filters are not reseted to "All Chats" when deleting actual workspace.[/-][+]Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace.[/+]on Dec 17, 2024
changed the title [-]Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace.[/-][+][$250] Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace.[/+]on Dec 17, 2024
Regarding the solution.
Updating to check a field value instead might not be the best - activeWorkspace?.type. What if in future we started storing that as well?
Activity
melvin-bot commentedon Dec 10, 2024
Triggered auto assignment to @abekkala (
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.bernhardoj commentedon Dec 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The home LHN doesn't reset to All chats when deleting the selected workspace from workspace switcher page.
What is the root cause of that problem?
When we delete the workspace, it will call
switchPolicyIDwhich pushes a new bottom tab screen, in this case, the Settings, with thepolicyIDparam removed.App/src/libs/Navigation/switchPolicyID.ts
Lines 47 to 73 in f8f12c2
[Home, Home (policyA), Settings (policyA)] -> [Home, Home (policyA), Settings (policyA), Settings]
So, the LHN (Home) with the filtered workspace is still in the stack. Also, that's why we need to go back twice from settings, but it's a different issue to discuss. When we go back, we simply pop the screen until we arrive at the LHN with the filtered workspace.
We already have a solution to handle this case, which was added by this PR: #45285, that is by removing the
policyIDfrom the LHN (home) when the workspace is missing.App/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx
Lines 32 to 52 in f8f12c2
The problem is, after deleting the workspace, the workspace data still exists on the onyx with this information that is returned by the BE.

What changes do you think we should make in order to solve the problem?
To fix it, we can check for the workspace/policy type.
App/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx
Line 34 in f8f12c2
or use
shouldShowPolicyWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
melvin-bot commentedon Dec 16, 2024
@abekkala Huh... This is 4 days overdue. Who can take care of this?
[-]Android - Inbox - WS filters are not reseted to "All Chats" when deleting actual workspace.[/-][+]Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace.[/+][-]Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace.[/-][+][$250] Android - Inbox - WS filters are not reset to "All Chats" when deleting actual workspace.[/+]melvin-bot commentedon Dec 17, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021869052011810427221
melvin-bot commentedon Dec 17, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)17 remaining items
abekkala commentedon Jan 6, 2025
@abdulrahuman5196 have you completed your review of the proposal?
abdulrahuman5196 commentedon Jan 6, 2025
I seem to agree on the root cause - #53879 (comment)
Regarding the solution.
Updating to check a field value instead might not be the best -
activeWorkspace?.type. What if in future we started storing that as well?shouldShowPolicy seems to be an better alternative.
Let me just test the proposal and approve if no issues.
melvin-bot commentedon Jan 7, 2025
@abekkala @abdulrahuman5196 this issue is now 4 weeks old, please consider:
Thanks!
melvin-bot commentedon Jan 7, 2025
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
abekkala commentedon Jan 8, 2025
@abdulrahuman5196 were you able to test that proposal?
melvin-bot commentedon Jan 10, 2025
@abekkala, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
abekkala commentedon Jan 10, 2025
@abdulrahuman5196 checking in again, were you able to test the proposal above?
mvtglobally commentedon Jan 12, 2025
Issue not reproducible during KI retests. (Second week)
abdulrahuman5196 commentedon Jan 13, 2025
Hi sorry for delay. Will check tomorrow morning.
Meanwhile @bernhardoj Are you still able to repro the issue? Seems QA is not able to repro for 2 weeks - #53879 (comment)
bernhardoj commentedon Jan 14, 2025
Yes, I can't repro anymore. The code is different now.