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

[HOLD for payment 2024-10-29] Search - Contacts with no chat history are also categorized under "Recent chats" #50998

Closed
3 of 8 tasks
IuliiaHerets opened this issue Oct 17, 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 Engineering

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 17, 2024

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.50-0
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
Email or phone of affected tester (no customers): applausetester+kh081006@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new private domain account (Expensifail).
  3. Open FAB > Start chat.
  4. Note that the contacts under "Recent chats" are only Concierge and yourself.
  5. Open Concierge.
  6. Click Search icon.
  7. Note that Recent chats include all the contacts instead of just Concierge and yourself.

Expected Result:

In Search modal, "Recent chats" should only include Concierge and self DM, while the other contacts should be under "Contacts" section.

Actual Result:

In Search modal, "Recent chats" includes Concierge, self DM and the rest of the contacts which user has never chatted with before.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6637299_1729144214325.20241017_134534.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @VictoriaExpensify
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

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

Copy link

melvin-bot bot commented Oct 17, 2024

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

Copy link

melvin-bot bot commented Oct 17, 2024

💬 A slack conversation has been started in #expensify-open-source

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 17, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 17, 2024
Copy link
Contributor

👋 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.

@rayane-djouah
Copy link
Contributor

@luacmartins @Expensify/design I initially thought it was intentional to include all search report options under one section title ("Recent chats"). Do we need to split the options into "Recent searches", "Recent chats", and "Contacts", or should we exclude the contacts options from the list?

@rayane-djouah
Copy link
Contributor

cc @Kicu @SzymczakJ

@daledah
Copy link
Contributor

daledah commented Oct 17, 2024

Proposal

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

In Search modal, "Recent chats" includes Concierge, self DM and the rest of the contacts which user has never chatted with before.

What is the root cause of that problem?

In SearchRouter, we merge recent reports and personal details as one:

const recentReports: OptionData[] = useMemo(() => {
const currentSearchOptions = debouncedInputValue === '' ? searchOptions : filteredOptions;
const reports: OptionData[] = [...currentSearchOptions.recentReports, ...currentSearchOptions.personalDetails];
if (currentSearchOptions.userToInvite) {
reports.push(currentSearchOptions.userToInvite);
}
return reports.slice(0, 10);
}, [debouncedInputValue, filteredOptions, searchOptions]);

And in 'SearchRouterList`, we only have "Recent Chats" section, not "Contacts" section:

sections.push({title: translate('search.recentChats'), data: styledRecentReports});

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

Add a param personalDetailLists to SearchRouterList and add "Contacts" section:

sections.push({title: translate('common.contacts'), data: personalDetailsList});

Then in here, remove currentSearchOptions.personalDetails from recentReports

Create personalDetailLists memo in 'SearchRouterand pass it toSearchRouterList`:

const personalDetailsList: OptionData[] = useMemo(
        () => (debouncedInputValue === '' ? searchOptions.personalDetails : filteredOptions.personalDetails),
        [debouncedInputValue, searchOptions, filteredOptions],
);

POC

Screenshot 2024-10-17 at 17 38 40

What alternative solutions did you explore? (Optional)

@MariaHCD
Copy link
Contributor

This doesn't need to block the deploy. It can be a follow up improvement as part of the Search project.

@MariaHCD MariaHCD added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Oct 17, 2024
@shawnborton
Copy link
Contributor

Hmm I would think we would only show actual recent chats in the recent chats section. No need to show Contacts here IMO.

@dannymcclain
Copy link
Contributor

Hmm I would think we would only show actual recent chats in the recent chats section. No need to show Contacts here IMO.

Same—IMO the options we display in the router are "quick shortcuts". We're surfacing them for convenience. If you're looking for a contact you can use the router to search for it.

@SzymczakJ
Copy link
Contributor

The only place to view your contacts that I knew about was ChatFinderPage. If we're going to remove contacts from SearchRouter how else will we view them? @dannymcclain @shawnborton

@shawnborton
Copy link
Contributor

I don't think anyone is suggesting to remove contacts from the SearchRouter. But the default "suggestions" perhaps should only include Recent chats, if that makes sense.

@SzymczakJ
Copy link
Contributor

I like that solution 😃. So to finally clarify: if user hasn't put anything in the text input then we only show recent chats, but when user typed something we show whatever is closest to the searched phrase(just like ChatFinderPage did)?

@shawnborton
Copy link
Contributor

Yeah, that is my understanding! cc @luacmartins for the gut check there too

@dannymcclain
Copy link
Contributor

Yes that's what I was thinking too!

@luacmartins
Copy link
Contributor

That seems fine to me as well.

@SzymczakJ SzymczakJ mentioned this issue Oct 17, 2024
48 tasks
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Oct 17, 2024
@melvin-bot melvin-bot bot changed the title Search - Contacts with no chat history are also categorized under "Recent chats" [HOLD for payment 2024-10-29] Search - Contacts with no chat history are also categorized under "Recent chats" Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.51-4 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 2024-10-29. 🎊

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

  • @SzymczakJ does not require payment (Contractor)

Copy link

melvin-bot bot commented Oct 22, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@MariaHCD / @luacmartins] The PR that introduced the bug has been identified. Link to the PR:
  • [@MariaHCD / @luacmartins] 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:
  • [@MariaHCD / @luacmartins] A discussion in #expensify-bugs 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:
  • [@SzymczakJ] Determine if we should create a regression test for this bug.
  • [@SzymczakJ] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@VictoriaExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 28, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

Copy link

melvin-bot bot commented Oct 31, 2024

@MariaHCD, @luacmartins, @VictoriaExpensify, @SzymczakJ Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 31, 2024
Copy link

melvin-bot bot commented Nov 4, 2024

@MariaHCD, @luacmartins, @VictoriaExpensify, @SzymczakJ Still overdue 6 days?! Let's take care of this!

@luacmartins
Copy link
Contributor

Waiting on payment @VictoriaExpensify

@VictoriaExpensify
Copy link
Contributor

I don't think anyone needs to be paid here - @SzymczakJ is a contractor and everyone else is internal. If I've missed someone that needs payment, let me know!

Otherwise, we are just waiting for the checklist to be complete and we can close this out

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 Engineering
Projects
None yet
Development

No branches or pull requests

9 participants