Skip to content

[Due for payment 2025-08-20] [$125] Reports - "you" returns current account in Filters > From page, but no results in From button #63856

Closed

Description

@lanitochka17

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.1.63-3
Reproducible in staging?: Y
Reproducible in production?: Y
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): sjdoijsosnsiojndso@agiuse.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Reports
  3. Click Filters
  4. Click From
  5. Type "you"
  6. Your own email shows up in the result
  7. Close the RHP
  8. Click From filter button
  9. Type "you"

Expected Result:

Your own email will show up in the result when searching for "you" in From filter button

Actual Result:

Your own email does not show up in the result when searching for "you" in From filter button

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6855612_1749563770571.20250610_215150.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021933522820397420564
  • Upwork Job ID: 1933522820397420564
  • Last Price Increase: 2025-07-28
  • Automatic offers:
    • daledah | Contributor | 107737033
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @jliexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 10, 2025
  2. melvin-bot commented on Jun 10, 2025

    @melvin-bot

    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.

  3. daledah commented on Jun 10, 2025

    @daledah
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-06-13 15:50:29 UTC.

    Proposal

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

    Your own email does not show up in the result when searching for "you" in From filter button

    What is the root cause of that problem?

    We are filtering here

    const {personalDetails: filteredOptionsList, recentReports} = filterAndOrderOptions(optionsList, cleanSearchTerm, {
    excludeLogins: CONST.EXPENSIFY_EMAILS_OBJECT,
    maxRecentReportsToShow: CONST.IOU.MAX_RECENT_REPORTS_TO_SHOW,
    });

    In the function filterOptions, we are using filterPersonalDetails with searchTerms

    const recentReports = filterReports(options.recentReports, searchTerms);
    const personalDetails = filterPersonalDetails(options.personalDetails, searchTerms);
    const currentUserOption = filterCurrentUserOption(options.currentUserOption, searchTerms);

    And we don't have you or me in personalDetailSearchTerms

    function filterPersonalDetails(personalDetails: OptionData[], searchTerms: string[]): OptionData[] {
    return searchTerms.reduceRight(
    (items, term) =>
    filterArrayByMatch(items, term, (item) => {
    const values = getPersonalDetailSearchTerms(item);
    return uniqFast(values);
    }),
    personalDetails,
    );
    }

    function getPersonalDetailSearchTerms(item: Partial<OptionData>) {
    return [item.participantsList?.[0]?.displayName ?? '', item.login ?? '', item.login?.replace(CONST.EMAIL_SEARCH_REGEX, '') ?? ''];
    }

    It leads to us not having data when searchTerms is you or me

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

    We should get currentUserOption in filterAndOrderOptions and use this instead of using includeCurrentUser flag

    1. Remove includeCurrentUser here and also remove includeCurrentUser in GetOptionsConfig

    selectedOptions,
    excludeLogins: CONST.EXPENSIFY_EMAILS_OBJECT,
    includeSelectedOptions: true,
    includeCurrentUser: true,

    type GetOptionsConfig = {
    excludeLogins?: Record<string, boolean>;
    includeCurrentUser?: boolean;
    includeRecentReports?: boolean;
    includeSelectedOptions?: boolean;
    recentAttendees?: Option[];
    excludeHiddenThreads?: boolean;
    canShowManagerMcTest?: boolean;
    } & GetValidReportsConfig;

    2. Get currentUserOption from filterAndOrderOptions function and add this to personalDetailList

        const {personalDetails: filteredOptionsList, recentReports, currentUserOption} = filterAndOrderOptions(optionsList, cleanSearchTerm, {
            excludeLogins: CONST.EXPENSIFY_EMAILS_OBJECT,
            maxRecentReportsToShow: CONST.IOU.MAX_RECENT_REPORTS_TO_SHOW,
        });
        ...
        return [...(personalDetailList ?? []), ...(recentReports ?? []), ...(currentUserOption ? [currentUserOption] : [])];
    

    return [...(personalDetailList ?? []), ...(recentReports ?? [])];

    1. To hide "(you)" text from specific search lists, we can add a new prop shouldAddCurrentUserPostfix to UserSelectionListItem. Then use it here

    const userDisplayName = useMemo(() => {
    return getDisplayNameForParticipant({
    accountID: item.accountID ?? CONST.DEFAULT_NUMBER_ID,
    shouldAddCurrentUserPostfix: true,
    });
    }, [item.accountID]);

        const userDisplayName = useMemo(() => {
            return getDisplayNameForParticipant({
                accountID: item.accountID ?? CONST.DEFAULT_NUMBER_ID,
                shouldAddCurrentUserPostfix,
            });
        }, [item.accountID]);

    Then pass shouldAddCurrentUserPostfix as false to the lists required. For example, UserSelectPopup for "from" button

    And SearchFiltersParticipantsSelector for "From" and "To" Filter

    Screen.Recording.2025-06-13.at.22.49.16.mov

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

    None

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. jliexpensify commented on Jun 11, 2025

    @jliexpensify
    Contributor

    Going to get @Expensify/design to weigh in, but I don't think this is an actual issue?

    IMO, no one calls themselves you, and searching for you is weird. This does work if you search your own email, though.

    I do agree that the search behaviour is a little inconsistent though.

  5. dubielzyk-expensify commented on Jun 11, 2025

    @dubielzyk-expensify
    Contributor

    Hmmm. I don't think there's many people how'd use you anyways. I kinda feel like this isn't worth fixing, but yeah, there's definitely inconsistency there.

  6. shawnborton commented on Jun 11, 2025

    @shawnborton
    Contributor

    cc @JS00001

    I think it's worth making them consistent. The fact that (you) is part of the display name makes me think we should make it so that searching for you would return it:

    Image

  7. shawnborton commented on Jun 11, 2025

    @shawnborton
    Contributor

    We've also discussed totally removing (you) from the UI at some point, but I can't remember where we last left off there. cc @trjExpensify @JmillsExpensify

  8. JS00001 commented on Jun 11, 2025

    @JS00001
    Contributor

    This doesnt seem intuitive to me, I feel like we should standardize to not include (you) in searches, rather than the other way around. I think it can be confusing to the user to get results that are not actually what they are looking for, but rather, generated by us, and only shown in this one place

    If we do decide to keep the behavior of searching "you", then I can throw up a quick Pr for it

  9. self-assigned this
    on Jun 11, 2025
  10. trjExpensify commented on Jun 11, 2025

    @trjExpensify
    Contributor

    Yeah, interesting one. (you) is the name of the selfDM chat, so it makes sense that the search router for chat switching includes it because that's the name of the chat -- or broadly wherever you're searching for the chat by name.

    Outside of that, I don't think (you) should be appended to a displayName wherever it's shown. For example, we don't do that in the members table, reportActions from yourself etc:

    Image Image

    So I think we can remove it from the From and To filters.

  11. JS00001 commented on Jun 11, 2025

    @JS00001
    Contributor

    Cool, lets get designs opinion on the above, and then I'll open this up externally to update either the 'from' dropdown, or all of them

  12. dannymcclain commented on Jun 11, 2025

    @dannymcclain
    Contributor

    Yeah this is an interesting one. I don't think we necessarily need to include "you" in the display of the From and To filters, but I will note that in Slack, even though "you" doesn't show anywhere in the search, if I type it in, it shows me as the top result. Same thing if I search for "me" 🤷‍♂

    Image

    Image

  13. trjExpensify commented on Jun 11, 2025

    @trjExpensify
    Contributor

    Maybe that's what we were shooting for to help with faster auto-complete? 🤷 It's definitely a nice-to-have, really.

    Slack uses it in the chat switcher too, which we would retain:

    Image
  14. 80 remaining items

  15. changed the title [-][$125] Reports - "you" returns current account in Filters > From page, but no results in From button[/-] [+][Due for payment 2025-08-20] [$125] Reports - "you" returns current account in Filters > From page, but no results in From button[/+] on Aug 13, 2025
  16. melvin-bot commented on Aug 13, 2025

    @melvin-bot

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

  17. melvin-bot commented on Aug 13, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.93-7 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-08-20. 🎊

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

  18. melvin-bot commented on Aug 13, 2025

    @melvin-bot

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

  19. jliexpensify commented on Aug 15, 2025

    @jliexpensify
    Contributor

    Payment Summary

    • C: @daledah $125 (to be paid via Upworks)
    • C+: @s77rt $125 (to be paid via new Expensify requests)

    NEW JOB: https://www.upwork.com/jobs/~021956155680088944807

  20. jliexpensify commented on Aug 15, 2025

    @jliexpensify
    Contributor

    @s77rt waiting on checklist

  21. s77rt commented on Aug 15, 2025

    @s77rt
    Member

    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: Suggested Search #62851 (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: n/a

    • [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.

      Bug requires regression test: No, I don't think this requires a test

  22. s77rt commented on Aug 15, 2025

    @s77rt
    Member

    Added checklist but this not due payment yet

  23. jliexpensify commented on Aug 17, 2025

    @jliexpensify
    Contributor
  24. jliexpensify commented on Aug 20, 2025

    @jliexpensify
    Contributor

    Paid and job closed.

    @s77rt - payment summary here.

  25. garrettmknight commented on Aug 26, 2025

    @garrettmknight
    Contributor

    $125 approved for @s77rt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions