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.32k stars 2.75k forks source link

Search - Own email address is displayed twice on /search/filters page #47537

Closed IuliiaHerets closed 3 weeks ago

IuliiaHerets commented 3 weeks 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: 9.0.21-0 Reproducible in staging?: Y Reproducible in production?: N (Can't check - new feature) Issue was found when executing this PR: https://github.com/Expensify/App/pull/46962 Email or phone of affected tester (no customers): gocemate+a980@gmail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to /search/filters
  3. Click on From filter and check email list
  4. Click on To filter and check email list

Expected Result:

Self email address should be displayed once

Actual Result:

Self email address is displayed twice, both From and To filters

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/eb2e6077-45f9-4ea7-96cc-a4f8218a2aea

image (233)

View all open jobs on GitHub

melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to @stephanieelliott (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.

melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 3 weeks ago

:wave: 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
IuliiaHerets commented 3 weeks ago

We think that this bug might be related to #vip-vsb

bernhardoj commented 3 weeks ago

Edited by proposal-police: This proposal was edited at 2024-08-16 04:30:10 UTC.

Proposal

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

There are 2 current user options in the search From and To filters.

What is the root cause of that problem?

In the search filter From/To, we put the current user option at the top of the list and then the recent reports. https://github.com/Expensify/App/blob/5e5bff3630958264c22a34f083879792ff8ee6ab/src/components/Search/SearchFiltersParticipantsSelector.tsx#L110-L122

However, the recent reports also contains a self DM, so the list contains 2 current user option. That's because we include self DM when getting the options (the last param). https://github.com/Expensify/App/blob/5e5bff3630958264c22a34f083879792ff8ee6ab/src/components/Search/SearchFiltersParticipantsSelector.tsx#L59-L80

This is a new search filter feature, so not a regression.

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

We shouldn't include the self DM into the recent report because we already put the current user at the top of the list. We can set it to false or just remove the param.

techievivek commented 3 weeks ago

@bernhardoj can you please link the GH that caused this regression?

techievivek commented 3 weeks ago

This seems to be coming from here https://github.com/Expensify/App/pull/46962

techievivek commented 3 weeks ago

I will just inform on the PR and it can be fixed as a followup, and nothing significant to be a blocker.

luacmartins commented 3 weeks ago

I agree this is not a blocker. @Kicu @rayane-djouah since we worked on this PR together.

Kicu commented 3 weeks ago

hey I did the filters and I will take a look today at this issue and try to come up with a fix. Please assign me

Kicu commented 3 weeks ago

PR with a simple fix is ready.

@bernhardoj your suggestion was actually correct and I ended up doing exactly the same thing you suggested - so switching the argument-flag for including selfDM. Feels the cleanest

rayane-djouah commented 3 weeks ago

PR on staging

rayane-djouah commented 3 weeks ago

We can close this one. No payment is due.

luacmartins commented 3 weeks ago

Nice! Thanks everyone!