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-06-13] [$250] Last message text are not shown when searching for the rooms #41816

Closed
2 of 6 tasks
m-natarajan opened this issue May 7, 2024 · 35 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

@m-natarajan
Copy link

m-natarajan commented May 7, 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: 1.4.71-0
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: @youssef-lr
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1708669400849159

Action Performed:

  1. Open app
  2. Click on Find icon

Expected Result:

Last comment should display for the rooms

Actual Result:

Showing the workspace chat name as last comment

Workaround:

unknown

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

Screenshot 2024-05-07 174932

IMG_6381

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d5ae7362185c5a44
  • Upwork Job ID: 1788509395347320833
  • Last Price Increase: 2024-05-09
Issue OwnerCurrent Issue Owner: @laurenreidexpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

Showing the workspace chat name as last comment

What is the root cause of that problem?

In getSearchOptions, we pass forcePolicyNamePreview as true into getOptions function

forcePolicyNamePreview: true,

So the alternateText is forced to the policyName by this condition

return showChatPreviewLine && !forcePolicyNamePreview && option.lastMessageText ? option.lastMessageText : option.subtitle;

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

We should remove param so it can have the default value is false and then the last message text is shown in search page

forcePolicyNamePreview: true,

What alternative solutions did you explore? (Optional)

NA

Result

Screenshot 2024-05-08 at 10 52 10

@dragnoir
Copy link
Contributor

dragnoir commented May 8, 2024

Proposal

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

Last message text are not shown when searching for the rooms

What is the root cause of that problem?

On the function getAlternateText part of OptionsListUtils
we have a condition between if we should display option.lastMessageText or option.subtitle for chat room

if (!!option.isChatRoom || !!option.isPolicyExpenseChat) {
return showChatPreviewLine && !forcePolicyNamePreview && option.lastMessageText ? option.lastMessageText : option.subtitle;
}

because forcePolicyNamePreview is always true, the condition goes to option.subtitle

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

We should create a seperate condition for the chat room

if (option.isChatRoom) {
  return  showChatPreviewLine  &&  option.lastMessageText  ?  option.lastMessageText  :  option.subtitle;
}

if (option.isPolicyExpenseChat) {
  return  showChatPreviewLine  &&  !forcePolicyNamePreview  &&  option.lastMessageText  ?  option.lastMessageText  :  option.subtitle;
}

If we change forcePolicyNamePreview to false from getSearchOptions or remove it, this will effect also the Policy Expense Chat preview on the find page

POC;

image

What alternative solutions did you explore? (Optional)

NA

@laurenreidexpensify
Copy link
Contributor

@youssef-lr is this under vip-vsb?

@youssef-lr
Copy link
Contributor

@laurenreidexpensify Yes I think it fits there.

@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label May 9, 2024
@melvin-bot melvin-bot bot changed the title Last message text are not shown when searching for the rooms [$250] Last message text are not shown when searching for the rooms May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

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

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

melvin-bot bot commented May 9, 2024

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

@rushatgabhane
Copy link
Member

rushatgabhane commented May 13, 2024

@dragnoir's proposal LGTM
🎀 👀 🎀

Copy link

melvin-bot bot commented May 13, 2024

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

@nkdengineer
Copy link
Contributor

@youssef-lr What is the expected here? Should we fix for all reports show the last message text in search page or only fix for chat room?

@laurenreidexpensify
Copy link
Contributor

@youssef-lr bump for response, pls unassign yourself once you've reviewed thanks!

@youssef-lr
Copy link
Contributor

Sorry I missed this. @nkdengineer this issue is about chat rooms only so I think we can limit it to those.

@nkdengineer
Copy link
Contributor

nkdengineer commented May 16, 2024

@youssef-lr Should the policy expense chat, admin and announce room show the workspace name in search page? Actually these report also show WS name in the search page. I think we should show last message text for all report in search page. What do you think?

@youssef-lr
Copy link
Contributor

#admins and #announce rooms should show the policy name I think so they can be distinguished, but other rooms should show the last message. For policy expense chats, do we not already show the last message?

@nkdengineer
Copy link
Contributor

@youssef-lr Yes policy expense chat also show the WS name now.

@melvin-bot melvin-bot bot added the Overdue label May 20, 2024
@rushatgabhane
Copy link
Member

waiting on @youssef-lr's approval

Copy link

melvin-bot bot commented May 21, 2024

@youssef-lr @rushatgabhane @laurenreidexpensify @aldo-expensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented May 21, 2024

📣 @dragnoir You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@aldo-expensify aldo-expensify removed their assignment May 21, 2024
@nkdengineer
Copy link
Contributor

@youssef-lr I think we're still discussing about the expected here #41816 (comment)

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 22, 2024
@dragnoir
Copy link
Contributor

@nkdengineer This issue specifically concerns rooms. I believe other cases should be addressed in separate issues.

@dragnoir
Copy link
Contributor

PR ready #42476

@laurenreidexpensify
Copy link
Contributor

Merged, not yet on staging

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 6, 2024
@melvin-bot melvin-bot bot changed the title [$250] Last message text are not shown when searching for the rooms [HOLD for payment 2024-06-13] [$250] Last message text are not shown when searching for the rooms Jun 6, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

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

Copy link

melvin-bot bot commented Jun 6, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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-06-13. 🎊

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

  • @dragnoir requires payment (Needs manual offer from BZ)
  • @rushatgabhane requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Jun 6, 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:

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] 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.
  • [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@laurenreidexpensify
Copy link
Contributor

laurenreidexpensify commented Jun 13, 2024

Payment Summary -

@rushatgabhane pls confirm regression steps and checklist thanks

Copy link

melvin-bot bot commented Jun 13, 2024

Payment Summary

Upwork Job

BugZero Checklist (@laurenreidexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1788509395347320833/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@laurenreidexpensify
Copy link
Contributor

@rushatgabhane pls confirm regression steps and checklist above so we can close thanks

@rushatgabhane
Copy link
Member

  1. The PR that introduced the bug has been identified. Link to the PR: This is a new behavior. Not a bug.

  2. 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: N.A.

  3. 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: N.A.

  4. Determine if we should create a regression test for this bug. Yes

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

             1. Go to any room chat
             2. Send a comment
             3. Click on the search icon from LHN
             4. Verify that the last posted comment is displayed under the room name in search page
    

@JmillsExpensify
Copy link

@mallenexpensify can you please confirm the payment summary about with an amount for @rushatgabhane? I can't approve until I have that.

@mallenexpensify
Copy link
Contributor

@JmillsExpensify , updated Lauren's payment breakdown above

@JmillsExpensify
Copy link

$250 approved for @rushatgabhane

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
No open projects
Archived in project
Development

No branches or pull requests

9 participants