Skip to content

[Due for payment 2025-06-05] [$250] Expense Reports - Arrow is shown next to submitter on the empty report when receiver is empty #62551

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

Open
5 of 8 tasks
jponikarchuk opened this issue May 22, 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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@jponikarchuk
Copy link

jponikarchuk commented May 22, 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.49-4
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.4
App Component: Search

Action Performed:

Precondition:

  • Log in with Expensifail account.
  1. Launch Expensify app.
  2. Go to workspace chat.
  3. Create an expense in the workspace chat.
  4. Create an empty report via + > Create report in the workspace chat.
  5. Go to Reports.
  6. Tap bookmark icon.
  7. Go to Expense Reports.

Expected Result:

There will be no arrow icon next to the submitter on the empty report when receiver is empty.

Actual Result:

There is an arrow icon next to the submitter on the empty report when receiver is empty.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4
Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021925529871486693749
  • Upwork Job ID: 1925529871486693749
  • Last Price Increase: 2025-05-22
  • Automatic offers:
    • ikevin127 | Contributor | 107420581
    • linhvovan29546 | Contributor | 107420640
Issue OwnerCurrent Issue Owner: @zanyrenney
@jponikarchuk jponikarchuk added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels May 22, 2025
Copy link

melvin-bot bot commented May 22, 2025

Triggered auto assignment to @zanyrenney (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 melvin-bot bot added the Daily KSv2 label May 22, 2025
Copy link

melvin-bot bot commented May 22, 2025

Triggered auto assignment to @Gonals (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented May 22, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels May 22, 2025
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@nabi-ebrahimi
Copy link
Contributor

nabi-ebrahimi commented May 22, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-05-22 06:32:27 UTC.

Proposal

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

Expense Reports - Arrow is shown next to submitter on the empty report when receiver is empty

What is the root cause of that problem?

We are rendering the arrow icon even when ToRecipient is not supposed to be displayed. here

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

We can check whether ToRecipient and the ToRecipient's account exist and are going to be rendered, and only then display the arrow.

   {shouldDisplayArrowIcon && shouldShowToRecipient && !!participantTo.accountID && !!isCorrectSearchUserName(participantToDisplayName) && (
                <Icon
                    src={Expensicons.ArrowRightLong}
                    width={variables.iconSizeXXSmall}
                    height={variables.iconSizeXXSmall}
                    fill={theme.icon}
                />
            )}

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)

Or we can check every case here.

We can check the accountIDs and correctDisplay names. instead of UserInfoCell component here

 const showArrowComponent = (reportItem.type === CONST.REPORT.TYPE.IOU && thereIsFromAndTo) || (reportItem.type === CONST.REPORT.TYPE.EXPENSE && !!reportItem?.from);
    const shouldShowToRecipient = useMemo(
        () => thereIsFromAndTo && reportItem?.from?.accountID !== reportItem?.to?.accountID,
        [thereIsFromAndTo, reportItem?.from?.accountID, reportItem?.to?.accountID],
    );

@nabi-ebrahimi
Copy link
Contributor

This proposal screenshot.

Image

@Gonals Gonals added the External Added to denote the issue can be worked on by a contributor label May 22, 2025
@melvin-bot melvin-bot bot changed the title Expense Reports - Arrow is shown next to submitter on the empty report when receiver is empty [$250] Expense Reports - Arrow is shown next to submitter on the empty report when receiver is empty May 22, 2025
Copy link

melvin-bot bot commented May 22, 2025

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

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

melvin-bot bot commented May 22, 2025

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

@Gonals Gonals added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels May 22, 2025
@Gonals
Copy link
Contributor

Gonals commented May 22, 2025

I don't think we need to block on this

@nkdengineer
Copy link
Contributor

Proposal

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

There is an arrow icon next to the submitter on the empty report when receiver is empty.

What is the root cause of that problem?

The arrow icon is shown if shouldShowToRecipient is true but in the case the to field is empty personal detail, we don't show anything for to field although shouldShowToRecipient is true.

shouldDisplayArrowIcon={shouldShowToRecipient}

const shouldShowToRecipient = useMemo(
() => thereIsFromAndTo && reportItem?.from?.accountID !== reportItem?.to?.accountID,
[thereIsFromAndTo, reportItem?.from?.accountID, reportItem?.to?.accountID],
);

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

We should update the condition to show the to field with additional check it's not empty personal or not

const shouldShowToRecipient = useMemo(
    () => thereIsFromAndTo && reportItem?.from?.accountID !== reportItem?.to?.accountID && reportItem?.to?.accountID !== CONST.REPORT.OWNER_ACCOUNT_ID_FAKE,
    [thereIsFromAndTo, reportItem?.from?.accountID, reportItem?.to?.accountID],
);

const shouldShowToRecipient = useMemo(
() => thereIsFromAndTo && reportItem?.from?.accountID !== reportItem?.to?.accountID,
[thereIsFromAndTo, reportItem?.from?.accountID, reportItem?.to?.accountID],
);

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)

NA

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.

@zanyrenney
Copy link
Contributor

Nice, @ishpaul777
Please can you review the proposal above and let me know if we can move forward and sign this contributor to the issue?

@ikevin127
Copy link
Contributor

@zanyrenney The offending PR is #62288 which was just deployed to staging ~14h ago, meaning the author @linhvovan29546 will open a follow-up PR since one was already expected, the PR is expected to fix this issue as well once merged.

I'll take over as C+ here since the regression is on us 👍

@mountiny mountiny assigned ikevin127 and unassigned ishpaul777 May 23, 2025
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 23, 2025
Copy link

melvin-bot bot commented May 23, 2025

📣 @ikevin127 🎉 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 📖

@mountiny
Copy link
Contributor

@linhvovan29546 can you comment please

@linhvovan29546
Copy link
Contributor

Hi, sorry everyone I’ll follow up on this issue

Copy link

melvin-bot bot commented May 23, 2025

📣 @linhvovan29546 🎉 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 📖

@linhvovan29546
Copy link
Contributor

linhvovan29546 commented May 24, 2025

I can’t reproduce this on main or staging now. It looks like we’re hiding the empty report. @ikevin127 Are you able to reproduce it? Should we still apply the fix to prevent this bug in the future?
Never mind, I’ll still apply the fix since it’s included in the unit test.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 24, 2025
@ikevin127
Copy link
Contributor

@ikevin127 Are you able to reproduce it?

Yes, I can consistently reproduce following OP steps with a private domain email (used https://temp-mail.org) on narrow layout devices / resizing web, since only on narrow we show the UserInfoCellsWithArrow component:

Image

♻ Reviewing the PR...

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 29, 2025
@melvin-bot melvin-bot bot changed the title [$250] Expense Reports - Arrow is shown next to submitter on the empty report when receiver is empty [Due for payment 2025-06-05] [$250] Expense Reports - Arrow is shown next to submitter on the empty report when receiver is empty May 29, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 29, 2025
Copy link

melvin-bot bot commented May 29, 2025

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

Copy link

melvin-bot bot commented May 29, 2025

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

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

Copy link

melvin-bot bot commented May 29, 2025

@ikevin127 @zanyrenney @ikevin127 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]

@ikevin127
Copy link
Contributor

@zanyrenney This issue can be closed as completed since it was a regression coming from this issue's PR, payment will be handled there.

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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants