Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.85k forks source link

Expense - Incorrectly fallback avatar is shown for split expense #49884

Open lanitochka17 opened 3 weeks ago

lanitochka17 commented 3 weeks ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.41-1 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app
  2. Tap on a workspace chat
  3. Create a manual split expense
  4. Note the avatar of split expense

Expected Result:

Fall back avatar musn't be shown for split expense

Actual Result:

Incorrectly fallback avatar is shown for split expense

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/fd78fe0e-5910-49bd-95f2-ac9636a00110

View all open jobs on GitHub

github-actions[bot] commented 3 weeks ago

:wave: 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.
melvin-bot[bot] commented 3 weeks ago

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

huult commented 3 weeks ago

Proposal

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

Incorrectly fallback avatar is shown for split expense

What is the root cause of that problem?

The fallback avatar is showing in the split expense due to this condition check. https://github.com/Expensify/App/blob/3047c1baa21f47825f5c1ffd652184341dd22256/src/pages/home/report/ReportActionsListItemRenderer.tsx#L176

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

We should remove CONST.REPORT.ACTIONS.TYPE.IOU for it to work as expected in this ticket. Something like this:

shouldShowSubscriptAvatar={
                (ReportUtils.isPolicyExpenseChat(report) || ReportUtils.isInvoiceRoom(report)) &&
                [
-                    CONST.REPORT.ACTIONS.TYPE.IOU,
                    CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW,
                    CONST.REPORT.ACTIONS.TYPE.SUBMITTED,
                    CONST.REPORT.ACTIONS.TYPE.APPROVED,
                    CONST.REPORT.ACTIONS.TYPE.FORWARDED,
                ].some((type) => type === reportAction.actionName)
            }
POC https://github.com/user-attachments/assets/3b706ebc-d334-42fb-bd72-cf8d109ebf67
Gonals commented 3 weeks ago

Seems to be a frontend issue, so not a Web-E blocker

tgolen commented 3 weeks ago

@grgia It looks like this is probably a regression from https://github.com/Expensify/App/pull/49172. Would you be able to take a look at this?

grgia commented 3 weeks ago

Looking, but I think the problem is that two reports are created? this is the split in new dot for me, I don't see a submit button

Screenshot 2024-09-30 at 5 35 18 PM
melvin-bot[bot] commented 3 weeks ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] commented 3 weeks ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

jasperhuangg commented 3 weeks ago

We reverted the problematic PR https://github.com/Expensify/App/pull/49945. Gonna remove the label but keep this open so @grgia can fix this in a followup.