HIGH: [Polish] [$500] Broken message text in LHN when Inviting someone to room.
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.4.12.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: @marcaaron Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1702330874424759
Action Performed:
- Create a new workspace
- Create a workspace room
- Invite a workspace member to the room
- Invite a non-workspace member to the room
- View the chat as the non-workspace member
Expected Result:
The last message text correctly shows "invited 2 users"
Actual Result:
the message text says "invited and"
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [x] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01d4986375431dd52a
- Upwork Job ID: 1734953294535315456
- Last Price Increase: 2024-02-06
- Automatic offers:
- DylanDylann | Contributor | 0
- dukenv0307 | Contributor | 0
Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Job added to Upwork: https://www.upwork.com/jobs/~01d4986375431dd52a
Bug0 Triage Checklist (Main S/O)
- [ ] This "bug" occurs on a supported platform (ensure
Platformsin 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
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)
Seems like this issue is non-reproducible anymore on the current main branch:
📣 @artus9033! 📣 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:
- Make sure you've read and understood the contributing guidelines.
- 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.
- 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.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Thanks @artus9033.
@m-natarajan are you still able to reproduce this issue?
I also can't reproduce but may be following the steps incorrectly. I asked in the original Slack thread for help checking on reproduction.
Closing as non-reproduceable.
@sakluger QA team found the reproducible steps for this issue:
- Create a workspace room.
- Invite users.
- Send a message to another chat (if on web).
- Log out and log in.
- Refresh the page. Can you try again, please? Thank you! https://github.com/Expensify/App/assets/93399543/35f4287a-7e68-4631-9e8b-f9fe5948d36d
@artus9033 are you able to reproduce with the above steps on iOS? If so, would you like to submit a proposal to fix?
I reproduced. I think this should be fixed in backend.
Here's the root cause with example:
report data:
reportActions associated with this report doesn't exist before opening report so it just shows lastMessageText.
After opening report, reportActions comes from openReport api. So last message is composed from last report action (actionName, targetAccountIDs.length):
🎀 👀 🎀
Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@aimane-chnaif Quick question: Does the bug above gets fixed if we refresh the page or does it persist?
@aimane-chnaif Quick question: Does the bug above gets fixed if we refresh the page or does it persist?
It persists as long as that report is not opened. (refresh app while on other report)
Ok, great, thanks for confirming.
I am able to reproduce this. Looking into the backend logic.
We construct the mention-user message correctly, but we strip out the HTML-tag-like structure when we convert the HTML to text. As a result, the content is reduced to commas and space.
@jasperhuangg Looks like you worked on the implementation: https://github.com/Expensify/Web-Expensify/pull/39506/files, Do you have any thoughts on handling this better?
I am thinking maybe frontend can handle this differently i.e. rather than using the text content for LHN, they can parse the HTML content following this https://github.com/Expensify/App/blob/2be282e9ab2fa9aa289f298215b895e21dd4e01b/src/pages/home/report/ReportActionItemMessage.tsx#L39-L40
Because this seems broken only for LHN, the report action in the chat seems to be working fine.
@aimane-chnaif Any thoughts?
I am thinking maybe frontend can handle this differently i.e. rather than using the
textcontent for LHN, they can parse the HTML content following this
That makes sense. But I am not sure if frontend has all necessary info to compose lastMessageText before opening report. i.e. personalDetail for accountID might not exist
I think that should be fine since the report action handles it the same way for accountID with no personal details stored locally. But we can wait for @jasperhuangg to take a look into the bug and share his thoughts.
It looks like this is because of accountID-based mentions.
This is definitely a back-end fix, and I believe this is a duplicate of https://github.com/Expensify/Expensify/issues/360572, which I plan on tackling today.
@jasperhuangg are you sure this is a dupe of https://github.com/Expensify/Expensify/issues/360572? If so we should close this one in favor of the other issue.
Actually I'm not entirely sure if it's the same bug, sorry for the confusion.
The front-end should have all the necessary information in Onyx personal details once this is merged https://github.com/Expensify/Auth/pull/9689 @techievivek. So that proposal should work, but we'll need to hold it on this issue: https://github.com/Expensify/App/issues/34175
Seems like we're holding for https://github.com/Expensify/App/issues/34175
Not overdue, holding working on the GH until https://github.com/Expensify/App/issues/34175 is done.
https://github.com/Expensify/App/issues/34175 was closed
The Auth PR that Jasper linked has been merged so I am guessing we can explore the frontend solution for this bug, no? @aimane-chnaif
I'm not sure - in https://github.com/Expensify/App/issues/34175, @jasperhuangg said that we should not implement a front-end fix because it would break 1:1:1, but that may be a different front-end fix.
@jasperhuangg what would you recommend as a next step for this issue?
The specific front end fix proposed by the contributor would break 1:1:1.
But I think we can still fix the front end to handle this correctly. We don't need to request the personal details here, we can just use the number of accountIDs in targetAccountIDs to say something like "invited X users".