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

[Due for payment 2025-02-18] [$250] Search - Self DM is removed from top of search list when email is fully typed out in query #51411

Closed
1 of 8 tasks
lanitochka17 opened this issue Oct 24, 2024 · 24 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 24, 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: 9.0.53-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/runs/view/26723&group_by=cases:section_id&group_order=asc&group_id=229066
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open search
  2. Type out the gmail adress of the account you are logged in as
  3. Observe that while typing the gmail out "you" account is listed first but as soon as you type the gmail fully "you" account isnt the first item in the list

Expected Result:

"You" account should be listed first

Actual Result:

"You" account isnt listed first when gmail adress of the account is fully typed

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6644107_1729755835920.scrnli_GFnBU50NZYqeaq.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021882098792148557687
  • Upwork Job ID: 1882098792148557687
  • Last Price Increase: 2025-01-22
  • Automatic offers:
    • DylanDylann | Reviewer | 105937420
    • FitseTLT | Contributor | 105937421
Issue OwnerCurrent Issue Owner: @OfstadC
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

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

@lanitochka17
Copy link
Author

@OfstadC 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 melvin-bot bot added the Overdue label Oct 28, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Oct 28, 2024

2024-10-28_14-01-45 (1)
Can't reproduce. I also couldn't reproduce using an account with multiple other workspace members and chats.

@melvin-bot melvin-bot bot removed the Overdue label Oct 28, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Oct 30, 2024

Tested again and can't reproduce. Closing

@OfstadC OfstadC closed this as completed Oct 30, 2024
@lanitochka17
Copy link
Author

Issue is still reproducible again on the latest build 9.0.87-0
Try to check with an account that has several conversation, workspaces and requests for money

Image

@lanitochka17 lanitochka17 reopened this Jan 17, 2025
@OfstadC
Copy link
Contributor

OfstadC commented Jan 17, 2025

Thanks @lanitochka17. I'll give it another shot 😃

@melvin-bot melvin-bot bot added the Overdue label Jan 20, 2025
Copy link

melvin-bot bot commented Jan 21, 2025

@OfstadC Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@OfstadC
Copy link
Contributor

OfstadC commented Jan 22, 2025

Wildly now I can't even find myself at all to DM - [email protected]

Image

@melvin-bot melvin-bot bot removed the Overdue label Jan 22, 2025
@OfstadC
Copy link
Contributor

OfstadC commented Jan 22, 2025

But I can under my private domain accounts 🤔

@OfstadC OfstadC added the External Added to denote the issue can be worked on by a contributor label Jan 22, 2025
@melvin-bot melvin-bot bot changed the title Search - Self DM is removed from top of search list when email is fully typed out in query [$250] Search - Self DM is removed from top of search list when email is fully typed out in query Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 22, 2025
Copy link

melvin-bot bot commented Jan 22, 2025

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

@FitseTLT
Copy link
Contributor

FitseTLT commented Jan 23, 2025

Proposal

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

Search - Self DM is removed from top of search list when email is fully typed out in query

What is the root cause of that problem?

We put self dm on top by returning 0 here

if (option.isSelfDM) {
return 0;

so now until we write the full login in the search the other reports where the logins are the same as the self dm (current user) will be ordered just below the self dm because we return 1 here when the login is not equal to the search
if (option.login.toLowerCase() !== searchValue?.toLowerCase()) {
return 1;
}

but as soon as the search becomes equal to the login the other reports will have the same order value of 0 as the self dm via this line
// When option.login is an exact match with the search value, returning 0 puts it at the top of the option list
return 0;

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

To put the self dm on top of other reports we should return a lower value than 0 here

if (option.isSelfDM) {
return 0;

if (option.isSelfDM) {
                    return -1;

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We can test orderReportOptionsWithSearch to ensure it returns self dm on top of the list though the login of other options are equal to the search.

What alternative solutions did you explore? (Optional)

@DylanDylann
Copy link
Contributor

@FitseTLT's proposal looks good to me

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Jan 27, 2025

Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Jan 28, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

@madmax330, @OfstadC, @DylanDylann Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jan 31, 2025
@FitseTLT
Copy link
Contributor

Bump for an assignment @madmax330

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jan 31, 2025

📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Jan 31, 2025
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 31, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 11, 2025
@melvin-bot melvin-bot bot changed the title [$250] Search - Self DM is removed from top of search list when email is fully typed out in query [Due for payment 2025-02-18] [$250] Search - Self DM is removed from top of search list when email is fully typed out in query Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.95-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-02-18. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Feb 11, 2025

@DylanDylann @OfstadC @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@OfstadC
Copy link
Contributor

OfstadC commented Feb 11, 2025

@DylanDylann please complete the BZ checklist by the payment date 😃 - Thank you!

@DylanDylann
Copy link
Contributor

DylanDylann commented Feb 12, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: Put self DM at the top of search result #42704 (comment)

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Test:

  1. Open search
  2. Type out the gmail adress of the account you are logged in as
  3. Verify that the "you" account (self dm) is the first item in the list after typing the email address fully

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2025
@OfstadC
Copy link
Contributor

OfstadC commented Feb 18, 2025

Payment Summary

@OfstadC OfstadC closed this as completed Feb 18, 2025
@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

5 participants