App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-11-04] Chat - No results found message displayed even when results are found

Open kavimuru opened this issue 5 years ago • 69 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Log in with any account.
  3. Tap + green fab and select "New chat" option
  4. On the search box, search any user you have access to

Expected Result:

If a user is found the message ''No result found" hould not be displayed

Actual Result:

No results found message displayed even when results are found for searched user

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.91-0 Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/131736762-bb64f633-48fd-40c8-a228-2b6f46903392.mp4

Bug5219427_No_result_found

Expensify/Expensify Issue URL:

View all open jobs on GitHub

kavimuru avatar Sep 01 '21 20:09 kavimuru

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

OSBotify avatar Sep 01 '21 20:09 OSBotify

Triggered auto assignment to @jasperhuangg (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Sep 01 '21 20:09 MelvinBot

@jasperhuangg is going to be schoolin' pretty soon here, so I'm going to grab this deploy blocker from him.

roryabraham avatar Sep 01 '21 20:09 roryabraham

I'm unable to reproduce on staging.

roryabraham avatar Sep 01 '21 20:09 roryabraham

@kavimuru Can you please refresh and/or retest, because the reproduction steps are not working for me.

roryabraham avatar Sep 01 '21 20:09 roryabraham

@roryabraham I can reproduce this on master. Seems a kind of regression.

df

parasharrajat avatar Sep 01 '21 21:09 parasharrajat

Hmmm @parasharrajat well out of the newly deployed PRs on the checklist, this one seems like the most likely candidate to have caused a regression here, because it's the only one that altered related code such as OptionListUtils.

roryabraham avatar Sep 01 '21 21:09 roryabraham

Maybe it's another beta issue

roryabraham avatar Sep 01 '21 21:09 roryabraham

I'm also unable to reproduce on my side. Asking the same tester who reported this if he can still repro.

isagoico avatar Sep 01 '21 21:09 isagoico

I will check it Rory. Thanks for pointing it out.

parasharrajat avatar Sep 01 '21 21:09 parasharrajat

Also, it might be useful to know if it's only reproducible only for the New Group page or also for Search and/or New Chat

roryabraham avatar Sep 01 '21 21:09 roryabraham

Figured it out (I think). You have to search for one of the users that are currently included in the recents list. @roryabraham Let me know if that works for you and I'll add it to the Action performed.

image

isagoico avatar Sep 01 '21 21:09 isagoico

Issue is also reproducible in production. Removing the blocker label. image

isagoico avatar Sep 01 '21 21:09 isagoico

Since this is no longer a time-sensitive deploy blocker, I'm going to unassign myself for now.

roryabraham avatar Sep 01 '21 21:09 roryabraham

Actually, I'm not sure if he's a member of the CME team, so I'm going to do something else.

roryabraham avatar Sep 01 '21 21:09 roryabraham

Triggered auto assignment to @MitchExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Sep 01 '21 21:09 MelvinBot

@roryabraham This is not a regression from my PR. this issue exists before that PR was merged. I believe this change was not implemented correctly.

parasharrajat avatar Sep 01 '21 21:09 parasharrajat

Ok, I have found the issue. @isagoico is correct it's related to the recent Chats list.

Proposal

  1. We need to change the condition here as it is not considering recentChats at all. https://github.com/Expensify/App/blob/8c60189870b91ebaa80e100fa4c89d5f6d778c61/src/pages/NewChatPage.js#L132

to

   (this.state.personalDetails.length + this.state.recentReports.length) !== 0,

Group page and search page already have this condition.

parasharrajat avatar Sep 01 '21 21:09 parasharrajat

Gotcha, so this is only an issue for the New Chat page, not search or New Group. @parasharrajat your proposal looks good. @MitchExpensify Please hire @parasharrajat on Upwork, and @parasharrajat feel free to submit a PR.

@parasharrajat Tangentially related, but IMO there is too much duplicated code between NewChatPage and NewGroupPage, and also partially SearchPage. I would be willing to pay a small bonus if you spend some time DRYing up that code. Up to you!

roryabraham avatar Sep 01 '21 22:09 roryabraham

Sure, I will refactor it.

parasharrajat avatar Sep 01 '21 22:09 parasharrajat