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

[$500] Backend doesn't search for workspace chat #35257

Closed
1 of 6 tasks
kavimuru opened this issue Jan 26, 2024 · 59 comments
Closed
1 of 6 tasks

[$500] Backend doesn't search for workspace chat #35257

kavimuru opened this issue Jan 26, 2024 · 59 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Not a priority Reviewing Has a PR in review

Comments

@kavimuru
Copy link

kavimuru commented Jan 26, 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: v1.4.32-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706196526990119

Action Performed:

1.Search for a workspace chat which is existing

Expected Result:

workspace chat appears in the result for the searched user

Actual Result:

Doesn’t show up when I search

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

image (1)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014eeff4c475cb3811
  • Upwork Job ID: 1750944985884672000
  • Last Price Increase: 2024-03-07
@kavimuru kavimuru added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 26, 2024
@melvin-bot melvin-bot bot changed the title Backend doesn't search for workspace chat [$500] Backend doesn't search for workspace chat Jan 26, 2024
Copy link

melvin-bot bot commented Jan 26, 2024

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

Copy link

melvin-bot bot commented Jan 26, 2024

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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

melvin-bot bot commented Jan 26, 2024

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

@puneetlath puneetlath added Internal Requires API changes or must be handled by Expensify staff and removed 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 labels Jan 26, 2024
Copy link

melvin-bot bot commented Jan 26, 2024

Current assignee @allroundexperts is eligible for the Internal assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

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

@johncschuster
Copy link
Contributor

Looks like this one is internal. We'll need someone to pick this up. Let me see if I can link this to a wave... 🤔

@melvin-bot melvin-bot bot removed the Overdue label Jan 31, 2024
@puneetlath
Copy link
Contributor

I feel like wave7 as this can affect approvers. That's where it affected me.

@melvin-bot melvin-bot bot added the Overdue label Feb 2, 2024
@johncschuster
Copy link
Contributor

Thanks for the hot tip, @puneetlath! I'll head there now.

@melvin-bot melvin-bot bot removed the Overdue label Feb 2, 2024
@johncschuster
Copy link
Contributor

Asked here. Will bump on Monday if it hasn't been looked at.

@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
@johncschuster
Copy link
Contributor

It sounds like this could fit into wave5/6/7, so I've raised it in #engineering. If necessary, I'll start pinging folks from those waves.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 6, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

@johncschuster @allroundexperts this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Feb 9, 2024

@johncschuster, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Feb 13, 2024

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

Copy link

melvin-bot bot commented Mar 18, 2024

❌ There was an error making the offer to @abzokhattab for the Contributor role. The BZ member will need to manually hire the contributor.

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@abzokhattab
Copy link
Contributor

The issue is still reproducible, Maria @mvtglobally

Screen.Recording.2024-03-20.at.5.23.25.AM.mov

@abzokhattab
Copy link
Contributor

abzokhattab commented Mar 21, 2024

The PR will be ready today.

@johncschuster
Copy link
Contributor

How's the PR coming @abzokhattab?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Mar 23, 2024
@abzokhattab
Copy link
Contributor

The PR is ready! please check it out and let me know if you have any comments.

@Julesssss
Copy link
Contributor

Hey all, QA reported here that the test is failing on staging. It's not a blocker but could you please take a look? Thanks

@allroundexperts
Copy link
Contributor

@abzokhattab Can you please take a look?

@abzokhattab
Copy link
Contributor

I am not authorized to see the attached videos.. i have to login into the platform.utest.com

@allroundexperts
Copy link
Contributor

Ah, can you verify and post a video of this working on staging?

@danieldoglas
Copy link
Contributor

danieldoglas commented Apr 10, 2024

This PR caused performance issues on Staging. We're reverting it in #40019

@danieldoglas
Copy link
Contributor

This is the thread in #newdot-performance https://expensify.slack.com/archives/C05LX9D6E07/p1712763013050639

@Julesssss
Copy link
Contributor

@allroundexperts, @abzokhattab, and @youssef-lr would you mind working on the fix that @danieldoglas suggested here? Thanks

@abzokhattab
Copy link
Contributor

Can you please post the details of the fix here? I cannot access the Slack message because it is private.

@danieldoglas
Copy link
Contributor

Sorry, I didn't really describe a fix. I said we should look for a way to create that search string without doing that for loop.

we need to find a more efficient way of executing that function for the LHN items

@Julesssss
Copy link
Contributor

I cannot access the Slack message because it is private.

Oh sorry 😄

@abzokhattab
Copy link
Contributor

abzokhattab commented Apr 12, 2024

do you have any idea in mind to get rid of the for loop?

the optimization that can think of is to use a global cache for the search term of each personalDetail inside the for loop like this:
but i couldn't get rid of the loop

const cache = new Map<string, string[]>();

function getSearchText(
    report: OnyxEntry<Report> | null,
    reportName: string,
    personalDetailList: Array<Partial<PersonalDetails>>,
    isChatRoomOrPolicyExpenseChat: boolean,
    isThread: boolean,
): string {
    let searchTerms: string[] = [];
    const emailRegex = /\.(?=[^\s@]*@)/g; // Define the regex once outside the loop
    for (const personalDetail of personalDetailList) {
        if (!personalDetail.login) {
            continue;
        } // Skip if no login, reduces indentation

        let cachedResult: string[] | undefined = cache.get(personalDetail.login);

        if (!cachedResult) {
            const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(personalDetail, '', false);
            const modifiedLogin = personalDetail.login.replace(emailRegex, ''); // Use pre-defined regex
            cachedResult = [displayName, personalDetail.login, modifiedLogin];
            cache.set(personalDetail.login, cachedResult);
        }

        searchTerms = searchTerms.concat(cachedResult);
    }

what do you think ?

@danieldoglas @Julesssss @allroundexperts @youssef-lr

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

This issue has not been updated in over 15 days. @johncschuster, @youssef-lr, @allroundexperts, @abzokhattab 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 closed this as completed Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

@johncschuster, @youssef-lr, @allroundexperts, @abzokhattab, this Monthly task hasn't been acted upon in 6 weeks; closing.

If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

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. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Not a priority Reviewing Has a PR in review
Projects
No open projects
Archived in project
Development

No branches or pull requests