App icon indicating copy to clipboard operation
App copied to clipboard

[$250] LHN - Member WS chat title on LHN updates only after revisiting the chat

Open vincdargento opened this issue 1 year ago • 10 comments

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: 9.0.70-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A 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): [email protected] Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Create WS and add member
  3. Without navigating to members WS chat, notice members chat title from WS remain the WS name rather than Member name

Expected Result:

Each member have WS chat on LHN to submit expense with their name as the Title without visiting the chat

Actual Result:

The member WS chat name persist the WS name until navigating to the chat

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

https://github.com/user-attachments/assets/a18e6b3b-fde7-4652-8502-ad85f29f38a2

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864470970450528640
  • Upwork Job ID: 1864470970450528640
  • Last Price Increase: 2024-12-05
Issue OwnerCurrent Issue Owner: @hoangzinh

vincdargento avatar Dec 03 '24 14:12 vincdargento

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

melvin-bot[bot] avatar Dec 03 '24 14:12 melvin-bot[bot]

Proposal

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

LHN - Member WS chat title on LHN updates only after revisiting the chat

What is the root cause of that problem?

The getPolicyExpenseChatName returns the policy name because report?.isOwnPolicyExpenseChat is true.

https://github.com/Expensify/App/blob/acf418ced84cc7066476d8b7cce7fd52b8397f01/src/libs/ReportUtils.ts#L2891-L2901

This is because AddMembersToWorkspace returns report?.isOwnPolicyExpenseChat as true in its response.

Only after the user clicks on the report and openReport is called is when the report?.isOwnPolicyExpenseChat set as false.

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

From the backend, edit the AddMembersToWorkspace response to return report?.isOwnPolicyExpenseChat as false instead of false for these types of reports.

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

N/A

What alternative solutions did you explore? (Optional)

From the frontend, change to the condition below to check if the report.ownerAccountID is equal to the currentUserAccountID.

https://github.com/Expensify/App/blob/acf418ced84cc7066476d8b7cce7fd52b8397f01/src/libs/ReportUtils.ts#L2899-L2900

if (report?.isOwnPolicyExpenseChat && report?.ownerAccountID === currentUserAccountID) {
    return getPolicyName(report, false, policy); 

Tony-MK avatar Dec 04 '24 01:12 Tony-MK

Took me a while to repro - maybe a network/wifi speed issue that makes it obvious. I was able to get a fleeting glance of the behaviour on Safari only.

RachCHopkins avatar Dec 05 '24 00:12 RachCHopkins

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

melvin-bot[bot] avatar Dec 05 '24 00:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 05 '24 00:12 melvin-bot[bot]

I believe this issue would be best solved internally.

Tony-MK avatar Dec 05 '24 07:12 Tony-MK

Agree with @Tony-MK, it should be fixed in BE. cc @RachCHopkins can you help to add internal label for this issue? Thank you

Screenshot 2024-12-05 at 21 41 41

hoangzinh avatar Dec 05 '24 14:12 hoangzinh

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

melvin-bot[bot] avatar Dec 09 '24 09:12 melvin-bot[bot]

It's not overdue, waiting for internal to pick up this issue.

hoangzinh avatar Dec 09 '24 09:12 hoangzinh

On reflection, with this being Low priority, I think Monthly is more realistic here.

RachCHopkins avatar Dec 10 '24 22:12 RachCHopkins

@hoangzinh @RachCHopkins 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!

melvin-bot[bot] avatar Dec 17 '24 09:12 melvin-bot[bot]

@hoangzinh, @RachCHopkins, 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.

melvin-bot[bot] avatar Feb 24 '25 10:02 melvin-bot[bot]