Skip to content

[Due for payment 2025-05-05] [$250] Expense Reports - Invite user whisper is missing Concierge user name and avatar #59948

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

Closed
6 of 8 tasks
vincdargento opened this issue Apr 9, 2025 · 22 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

@vincdargento
Copy link

vincdargento commented Apr 9, 2025

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.1.25-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
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
Device used: Mac 15.3 / Chrome
App Component: Search

Action Performed:

Precondition:

  • Log in with Expensifail account.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit an expense to the workspace chat.
  4. Go to Reports.
  5. Go to Expense Reports.
  6. Click on the expense report from Step 3.
  7. Send a user mention who is not a member of the expense report.
  8. Refresh the page if whisper does not show up.

Expected Result:

Invite user whisper is accompanied by Concierge user name and avatar.

Actual Result:

Invite user whisper is missing Concierge user name and avatar.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021912140453301034956
  • Upwork Job ID: 1912140453301034956
  • Last Price Increase: 2025-04-15
  • Automatic offers:
    • gijoe0295 | Contributor | 106949048
Issue OwnerCurrent Issue Owner: @greg-schroeder
@vincdargento vincdargento added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 9, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-04-09 18:39:20 UTC.

Proposal

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

Invite user whisper is missing Concierge user name and avatar

What is the root cause of that problem?

We will display a message as group (hide sender, because we assume the messages are consecutive and from the same user) if cannot find the next consecutive action:

if (!currentAction || !nextAction) {
return true;

const displayAsGroup =
!isConsecutiveChronosAutomaticTimerAction(visibleReportActions, index, chatIncludesChronosWithID(reportAction?.reportID)) &&
hasNextActionMadeBySameActor(visibleReportActions, index);

Image

Note that, "next" here means the above message in display order, because messages are displayed in reverse order. In this case, the nextAction for the actionable message should be the first message with index 0 (the mention message). But we cannot find it because the loop here stops at 1 (i >0):

function findNextAction(reportActions: ReportAction[], actionIndex: number): OnyxEntry<ReportAction> {
for (let i = actionIndex - 1; i > 0; i--) {

That means any message appears in the second place will hide sender. For example, if another user sends a message here, its sender would be hidden as well even though the first message sender and the second's are not the same.

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

Update the loop condition to be i >= 0.

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

None

What alternative solutions did you explore? (Optional)

None

@melvin-bot melvin-bot bot added the Overdue label Apr 14, 2025
@gijoe0295
Copy link
Contributor

@greg-schroeder Can you take a look?

@greg-schroeder greg-schroeder added the External Added to denote the issue can be worked on by a contributor label Apr 15, 2025
@melvin-bot melvin-bot bot changed the title Expense Reports - Invite user whisper is missing Concierge user name and avatar [$250] Expense Reports - Invite user whisper is missing Concierge user name and avatar Apr 15, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 15, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2025
@s77rt
Copy link
Contributor

s77rt commented Apr 15, 2025

@gijoe0295 Can you still reproduce the bug? The expense chat loads in RHP in my case (maybe we reverted a PR?)

because we assume the messages are consecutive and from the same user) if cannot find the next consecutive action

I think this is unintended, this comment states that we would return false but true is returned instead

// It's OK for there to be no previous action, and in that case, false will be returned
// so that the comment isn't grouped
if (!currentAction || !nextAction) {
return true;
}

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 15, 2025

Can you still reproduce the bug? The expense chat loads in RHP in my case (maybe we reverted a PR?)

@s77rt I still can. Now you need to create >= 2 expenses in a workspace chat and have canUseTableReportView enabled.

@s77rt
Copy link
Contributor

s77rt commented Apr 15, 2025

@gijoe0295 Thanks. The RCA makes sense but I think we should just correct the returned boolean value.

🎀 👀 🎀 C+ reviewed
Link to proposal

Copy link

melvin-bot bot commented Apr 15, 2025

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

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 15, 2025

@s77rt If we return false, the second consecutive message from the same user wouldn't be grouped:

Image

I think the comment is just typo mistake when copying from the old isConsecutiveActionMadeByPreviousActor function.

@s77rt
Copy link
Contributor

s77rt commented Apr 15, 2025

@gijoe0295 Let's fix the loop condition as well 👍

@dangrous
Copy link
Contributor

loop update looks good!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 16, 2025
Copy link

melvin-bot bot commented Apr 16, 2025

📣 @gijoe0295 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Apr 22, 2025

@gijoe0295 Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Apr 22, 2025
@s77rt
Copy link
Contributor

s77rt commented Apr 22, 2025

@gijoe0295 Any ETA on the PR?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Apr 22, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 28, 2025
@melvin-bot melvin-bot bot changed the title [$250] Expense Reports - Invite user whisper is missing Concierge user name and avatar [Due for payment 2025-05-05] [$250] Expense Reports - Invite user whisper is missing Concierge user name and avatar Apr 28, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 28, 2025
Copy link

melvin-bot bot commented Apr 28, 2025

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

Copy link

melvin-bot bot commented Apr 28, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.32-8 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 2025-05-05. 🎊

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

Copy link

melvin-bot bot commented Apr 28, 2025

@s77rt @greg-schroeder @s77rt The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 5, 2025
@s77rt
Copy link
Contributor

s77rt commented May 5, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: [Better Expense Reports] Add MoneyRequestReportView #58360 (comment)

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Bug requires regression test: No, I think the missed condition is not something that could resurface again

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

Do we agree 👍 or 👎

@greg-schroeder
Copy link
Contributor

Was OOO for the bank holiday yesterday, processing today

@greg-schroeder
Copy link
Contributor

greg-schroeder commented May 6, 2025

Payment summary:

Contributor: @gijoe0295 - $250 - Paid via Upwork
C+: @s77rt - $250 - ND Manual Request

No regression test required per C+, closing

@JmillsExpensify
Copy link

$250 approved for @s77rt

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
Status: DONE
Development

No branches or pull requests

6 participants