Skip to content

[Due for payment 2025-04-30] [$250] Web-LHN preview shows "You: Manager:" instead of "Manager:" #59778

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
1 of 8 tasks
mitarachim opened this issue Apr 8, 2025 · 23 comments
Closed
1 of 8 tasks
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

@mitarachim
Copy link

mitarachim commented Apr 8, 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.24-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: #59573
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows 10/ Chrome
App Component: Left Hand Navigation (LHN)

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Create an account
  3. Click on FAB
  4. Click on Create Expense
  5. In the Scan tab, click on Try it out
  6. Click on Create Expense
  7. Click on the expense preview to go to the expense details
  8. Verify the LHN preview

Expected Result:

LHN preview shows "Manager:" because, at this time, the last message in the expense thread was posted by Manager McTest.

Actual Result:

LHN preview shows an inconsistent last message starting with "You: Manager:".

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Image

Bug6795603_1744077333768.You_Manager.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021910404165562837671
  • Upwork Job ID: 1910404165562837671
  • Last Price Increase: 2025-04-10
Issue OwnerCurrent Issue Owner: @CortneyOfstad
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

@daledah
Copy link
Contributor

daledah commented Apr 8, 2025

Proposal

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

LHN preview shows an inconsistent last message starting with "You: Manager:".

What is the root cause of that problem?

We are showing the payer name in this translation

paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}paid ${amount} elsewhere`,

And also adding the lastActorDisplayName in here

if (shouldShowLastActorDisplayName(report, lastActorDetails)) {
result.alternateText = `${lastActorDisplayName}: ${formatReportLastMessageText(Parser.htmlToText(lastMessageText)) || formattedLogin}`;
} else {

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

We shouldn't show the lastActorDisplayName in LHN when actionName is CONST.REPORT.ACTIONS.TYPE.IOU to make it consistent with what we show in SearchRouter here

const shouldDisplayLastActorName =
lastAction &&
lastAction.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW &&
lastAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU &&
shouldShowLastActorDisplayName(report, lastActorDetails);

By updating

  1. We should pass the lastAction to shouldShowLastActorDisplayName utils function

  2. Update shouldShowLastActorDisplayName function

    if (
        !lastActorDetails ||
        reportUtilsIsSelfDM(report) ||
        (isDM(report) && lastActorDetails.accountID !== currentUserAccountID) ||
        lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ||
        lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW
    ) {
        return false;
    }

if (!lastActorDetails || reportUtilsIsSelfDM(report) || (isDM(report) && lastActorDetails.accountID !== currentUserAccountID)) {
return false;
}

  1. Update in both OptionsListUtils and SidebarUtils files
Image

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)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@melvin-bot melvin-bot bot added the Overdue label Apr 10, 2025
@CortneyOfstad CortneyOfstad added the External Added to denote the issue can be worked on by a contributor label Apr 10, 2025
@melvin-bot melvin-bot bot changed the title Web-LHN preview shows "You: Manager:" instead of "Manager:" [$250] Web-LHN preview shows "You: Manager:" instead of "Manager:" Apr 10, 2025
Copy link

melvin-bot bot commented Apr 10, 2025

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

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

melvin-bot bot commented Apr 10, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Apr 10, 2025
@CortneyOfstad
Copy link
Contributor

Hey @shubham1206agra! Looks like we have a proposal above for review — thanks!

@shubham1206agra
Copy link
Contributor

Image

@daledah Can you please check for these too?

@daledah
Copy link
Contributor

daledah commented Apr 11, 2025

@daledah Can you please check for these too?

@shubham1206agra I didn't quite understand your question. Could you please clarify?

@shubham1206agra
Copy link
Contributor

@daledah Just check if your solution fixes archive messages too

@daledah
Copy link
Contributor

daledah commented Apr 11, 2025

Image

@shubham1206agra I can't reproduce this bug in archived messages on the latest main.

@shubham1206agra
Copy link
Contributor

@daledah's proposal looks good to me.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 12, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Apr 14, 2025
@melvin-bot melvin-bot bot removed 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

❌ There was an error making the offer to @daledah for the Contributor role. The BZ member will need to manually hire the contributor.

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2025
@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Apr 15, 2025
@melvin-bot melvin-bot bot added the Weekly KSv2 label Apr 15, 2025
@CortneyOfstad
Copy link
Contributor

PR deployed to staging 2 days ago

@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 23, 2025
@melvin-bot melvin-bot bot changed the title [$250] Web-LHN preview shows "You: Manager:" instead of "Manager:" [Due for payment 2025-04-30] [$250] Web-LHN preview shows "You: Manager:" instead of "Manager:" Apr 23, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 23, 2025
Copy link

melvin-bot bot commented Apr 23, 2025

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

Copy link

melvin-bot bot commented Apr 23, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.31-3 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-04-30. 🎊

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

  • @shubham1206agra requires payment through NewDot Manual Requests
  • @daledah requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Apr 23, 2025

@shubham1206agra @CortneyOfstad @shubham1206agra 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]

@CortneyOfstad
Copy link
Contributor

@daledah — I sent you a manual request in Upwork here. Please accept as soon as you can so there is no delay in payment. Thanks!

@shubham1206agra — please complete the checklist as soon as you can so there is no delay in payment. Thank you!

@daledah
Copy link
Contributor

daledah commented Apr 28, 2025

Please accept as soon as you can so there is no delay in payment.

@CortneyOfstad Accepted, thanks!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 30, 2025
Copy link

melvin-bot bot commented Apr 30, 2025

Payment Summary

Upwork Job

BugZero Checklist (@CortneyOfstad)

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

@shubham1206agra
Copy link
Contributor

shubham1206agra 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: https://github.com/Expensify/App/pull/59282/files#r2072840052

  • [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: Not Required

  • [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.

  • [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

Test:

  1. Create an account
  2. Click on FAB
  3. Click on Create Expense
  4. In the Scan tab, click on Try it out
  5. Click on Create Expense
  6. Click on the expense preview to go to the expense details
  7. Verify that: in LHN review text shows "Manager: ..." instead of "You: Manager:"
  8. Open Search router
  9. Verify that: in search router review text shows "Manager: ..." instead of "You: Manager:"

Do we agree 👍 or 👎

Copy link

melvin-bot bot commented May 5, 2025

@CortneyOfstad Eep! 4 days overdue now. Issues have feelings too...

@CortneyOfstad
Copy link
Contributor

Payment Summary

@daledah — paid $250 via Upwork
@shubham1206agra — to be paid $250 via NewDot

Regression Test

https://github.com/Expensify/Expensify/issues/497889

@melvin-bot melvin-bot bot removed the Overdue label May 6, 2025
@garrettmknight
Copy link
Contributor

$250 approved for @shubham1206agra

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
None yet
Development

No branches or pull requests

6 participants