Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD ON #47482][$250] Workspace switcher - Filter is not consistently applied when creating workspace from switcher #47482

Closed
6 tasks done
IuliiaHerets opened this issue Aug 15, 2024 · 24 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2 retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 15, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.0.20-6
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open workspace switcher.
  3. Select a workspace.
  4. Go to Search and then back to Inbox.
  5. Open workspace switcher.
  6. Click on the Create workspace button.
  7. Go back to Inbox.
  8. Note that the workspace switcher is reset to Expensify.
  9. Go to Search.
  10. Note that the workspace switcher is still the workspace selected in Step 3.
  11. Go back to Inbox.
  12. Now the workspace switcher changes back to the workspace selected in Step 3.

Expected Result:

The workspace switcher filter should be consistent when selecting a workspace and creating a new workspace from the workspace switcher.

Actual Result:

In Step 8. after creating a new workspace from the workspace switcher, the filter resets to Expensify.
The filter is not reset in Search page in Step 10.
When returning from Search to Inbox (Step 12), the filter reverts to the one selected in Step 3.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

20240815_135908.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0191bfdce4cbe61eaa
  • Upwork Job ID: 1824021164684057828
  • Last Price Increase: 2024-08-22
Issue OwnerCurrent Issue Owner: @shubham1206agra
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Triggered auto assignment to @jliexpensify (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
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@IuliiaHerets
Copy link
Author

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

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 15, 2024
@melvin-bot melvin-bot bot changed the title Workspace switcher - Filter is not consistently applied when creating workspace from switcher [$250] Workspace switcher - Filter is not consistently applied when creating workspace from switcher Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0191bfdce4cbe61eaa

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

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

@jliexpensify
Copy link
Contributor

I can repro - essentially, when we use the Workspace switcher a second time, it should default to the newly created workspace. Is that correct @IuliiaHerets?

@Krishna2323
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Workspace switcher - Filter is not consistently applied when creating workspace from switcher

What is the root cause of that problem?

Before navigating we are not checking if the activeWorkspaceID is undefined or not.

const navigateToSearch = useCallback(() => {
if (selectedTab === SCREENS.SEARCH.BOTTOM_TAB) {
return;
}
interceptAnonymousUser(() => {
const currentSearchParams = getCurrentSearchParams();
if (currentSearchParams) {
const {q, ...rest} = currentSearchParams;
const policy = PolicyUtils.getPolicy(currentSearchParams?.policyIDs);
Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: q, ...rest, policyIDs: policy ? currentSearchParams?.policyIDs : undefined}));
return;
}
Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: CONST.SEARCH.TAB.EXPENSE.ALL}));
});
}, [selectedTab]);

What changes do you think we should make in order to solve the problem?

We can pass undefined when activeWorkspaceID is undefined.

Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: q, ...rest, policyIDs: policy && activeWorkspaceID ? currentSearchParams?.policyIDs : undefined}));

What alternative solutions did you explore? (Optional)

We can always use activeWorkspaceID for policyIDs.

@BhuvaneshPatil
Copy link
Contributor

I am not able to reproduce it on latest main

@jliexpensify
Copy link
Contributor

Bump @shubham1206agra to double-check if this can still be reproduced + proposal reviews, thanks!

Copy link

melvin-bot bot commented Aug 20, 2024

@jliexpensify, @shubham1206agra Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Aug 20, 2024
@jliexpensify
Copy link
Contributor

Bumping @shubham1206agra again

Copy link

melvin-bot bot commented Aug 22, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Aug 22, 2024

@jliexpensify, @shubham1206agra 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@jliexpensify
Copy link
Contributor

Hi @shubham1206agra - bump on this! Will also DM you.

@Kicu
Copy link
Contributor

Kicu commented Aug 26, 2024

Hello, I wanted to point out that I have a PR ready that will significantly change how filtering by policyID will work: #47787

I'd suggest to do no work on this bug until ☝️ PR is merged, and most likely this bug will be fixed.

Copy link

melvin-bot bot commented Aug 26, 2024

@jliexpensify, @shubham1206agra 10 days overdue. I'm getting more depressed than Marvin.

@shubham1206agra
Copy link
Contributor

@jliexpensify Please put this issue on hold as per #47482 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Aug 27, 2024
@jliexpensify jliexpensify changed the title [$250] Workspace switcher - Filter is not consistently applied when creating workspace from switcher [HOLD ON #47482][$250] Workspace switcher - Filter is not consistently applied when creating workspace from switcher Aug 27, 2024
@jliexpensify jliexpensify added Weekly KSv2 and removed Daily KSv2 labels Aug 27, 2024
@jliexpensify
Copy link
Contributor

Done!

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Sep 19, 2024
Copy link

melvin-bot bot commented Sep 19, 2024

This issue has not been updated in over 15 days. @jliexpensify, @shubham1206agra eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Sep 19, 2024
@jliexpensify jliexpensify added the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Sep 19, 2024
@jliexpensify
Copy link
Contributor

Looks like the other PR was deployed a while back, please retest @IuliiaHerets

@shubham1206agra
Copy link
Contributor

@IuliiaHerets Bump here

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@jliexpensify
Copy link
Contributor

Awesome, thanks - closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2 retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause
Projects
No open projects
Status: Done
Development

No branches or pull requests

7 participants