Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.76k forks source link

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

Open IuliiaHerets opened 1 month ago

IuliiaHerets commented 1 month ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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): applausetester+kh050806@applause.expensifail.com 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:

Screenshots/Videos

https://github.com/user-attachments/assets/ee91535e-b6e6-4719-ab5f-0959e91bdb9a

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
melvin-bot[bot] commented 1 month ago

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 commented 1 month ago

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

IuliiaHerets commented 1 month ago

@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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

jliexpensify commented 1 month ago

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 commented 1 month ago

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. https://github.com/Expensify/App/blob/65a3811ea62ec073d44b4d2558e053183ad76ee8/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar.tsx#L86-L100

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 commented 1 month ago

I am not able to reproduce it on latest main

jliexpensify commented 1 month ago

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

melvin-bot[bot] commented 3 weeks ago

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

jliexpensify commented 3 weeks ago

Bumping @shubham1206agra again

melvin-bot[bot] commented 3 weeks ago

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

melvin-bot[bot] commented 3 weeks ago

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

jliexpensify commented 3 weeks ago

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

Kicu commented 3 weeks ago

Hello, I wanted to point out that I have a PR ready that will significantly change how filtering by policyID will work: https://github.com/Expensify/App/pull/47787

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

melvin-bot[bot] commented 3 weeks ago

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

shubham1206agra commented 2 weeks ago

@jliexpensify Please put this issue on hold as per https://github.com/Expensify/App/issues/47482#issuecomment-2310211048

jliexpensify commented 2 weeks ago

Done!