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] LHN - LHN of Workspace Room Only Displays "Invited" After Deleting Tagged Contact #29451

Closed
6 tasks done
kbecciv opened this issue Oct 12, 2023 · 23 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented Oct 12, 2023

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: 1.3.83.1
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: @tranvantoan-qn
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697045478337999

Action Performed:

  1. Log in any account >> Create a New workspace.
  2. Go to the workspace's #announce room.
  3. Tag any user in the compose field >> Send
  4. Check the message on the LHN >> it correctly display the tagged user (OK)
  5. Delete the message sent at step Add Expensify eslint #3.
  6. Check the message on the LHN again.
  7. Observer: It only shows "Invited" without any other information, which is confusing.

Expected Result:

It should display "No activity yet" since there is no message left in the room.

Actual Result:

It only shows "Invited" without any other information, which is confusing.

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

Android: Native
Android.-.Native.mov
Android: mWeb Chrome
Android.-.Chrome.mov
iOS: Native
iOS.-.Native.MP4
iOS: mWeb Safari
RPReplay_Final1697120811.MP4
MacOS: Chrome / Safari
MacOS.-.Safari.mov
MacOS.-.Chrome.mp4
MacOS: Desktop
MacOS.-.Desktop.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d63f2bc16749a277
  • Upwork Job ID: 1712476986016030720
  • Last Price Increase: 2023-10-12
@kbecciv kbecciv 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 Oct 12, 2023
@melvin-bot melvin-bot bot changed the title LHN - LHN of Workspace Room Only Displays "Invited" After Deleting Tagged Contact [$500] LHN - LHN of Workspace Room Only Displays "Invited" After Deleting Tagged Contact Oct 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

Triggered auto assignment to @twisterdotcom (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 Oct 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

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

@wlegolas
Copy link
Contributor

Proposal

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

LHN - LHN of Workspace Room Only Displays "Invited" After Deleting Tagged Contact

What is the root cause of that problem?

The information displayed in the LHN menu comes from the lastMessageText from the Report. When deleting the comment the API is called to process the action "DeleteComment":

API.write('DeleteComment', parameters, {optimisticData, successData, failureData});

When deleting the last comment, and the delete process is occurring, we can see the information "No activity yet" when the delete process finishes, the text changed to "invited", because when finishing the "DeleteComment" in the response the Report has in the property lastMessageText the value "invited", and the Report has updated accordingly this response.

Here we can see this response:
image

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

In my analysis, I found two changes.

1 - We should use the method getLastVisibleMessage from the ReportActionsUtils to get the last message text from the Report in the SidebarUtils file.

let {lastMessageText} = ReportActionsUtils.getLastVisibleMessage(report.reportID);

2 - We should modify the condition to update the Report alternateText property a bit:

result.alternateText = lastMessageText.length > 0 ? lastMessageText : Localize.translate(preferredLocale, 'report.noActivityYet');

What alternative solutions did you explore? (Optional)

I tried to understand why the API returns the invited text, but I can't see the API code, also I tried to find if there is a test to validate this scenario but I didn't find one.

Result after applied these changes:
https://github.com/Expensify/App/assets/698363/47864bd4-f323-4c18-bda4-58be04573abe

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

📣 @wlegolas! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@wlegolas
Copy link
Contributor

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01033ea66c846b029a

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@s77rt
Copy link
Contributor

s77rt commented Oct 12, 2023

@wlegolas Thanks for the proposal. I don't think your RCA is complete but the issue seems to be backend related.

@s77rt
Copy link
Contributor

s77rt commented Oct 12, 2023

@twisterdotcom This should be internal. Once you tag someone in the announce room the last message of the admin channel becomes invited ... but no actual message is added. (same with the announce room, internally the lastMessage seems to be updated as well)

Screen.Recording.2023-10-12.at.7.42.26.PM.mov

@twisterdotcom twisterdotcom added the Internal Requires API changes or must be handled by Expensify staff label Oct 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

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

@twisterdotcom twisterdotcom added Engineering 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 Oct 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

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

@wlegolas
Copy link
Contributor

Hello @s77rt thank you for your feedback about my RCA. I agree that this problem is related to the backend because in my RCA I saw that the "invite" text comes from the API response.

I know it wasn't this time that I was able to help Expensify, maybe in the next opportunity.

@lakchote
Copy link
Contributor

Working on it.

@melvin-bot melvin-bot bot added the Overdue label Oct 16, 2023
@lakchote
Copy link
Contributor

PR in review.

@melvin-bot melvin-bot bot removed the Overdue label Oct 16, 2023
@lakchote
Copy link
Contributor

Waiting for the query to be timed before merging the PR.

@jasperhuangg
Copy link
Contributor

This isn't actually a bug that we need to fix

The PRs that will handle displaying InviteToRoom actions and correctly formatting the last message text for them are in the process of being merged/deployed.

This issue won't exist once they go out.

@twisterdotcom
Copy link
Contributor

Should we HOLD this, or just close @jasperhuangg?

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@lakchote
Copy link
Contributor

Waiting for @jasperhuangg answer.

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@lakchote
Copy link
Contributor

Jasper will be back on October 26th.

@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

@twisterdotcom @s77rt @lakchote 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!

@lakchote
Copy link
Contributor

DMed Jasper on Slack to have his opinion.

@tranvantoan-qn
Copy link

tranvantoan-qn commented Oct 26, 2023

I will re-check it to see if the PR mentioned in this #29451 (comment) actually fixed it

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. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

7 participants