Skip to content

[Due for payment 2026-03-19] Reports - Report row shows fallback avatar when user has custom avatar #84472

Closed

Description

@mitarachim

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.3.33-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #84284
Email or phone of affected tester (no customers): sodijsnoidnjsoijsod@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Use new account.
  • User has custom avatar.
  1. Go to staging.new.expensify.com
  2. Create a workspace.
  3. Go to workspace chat.
  4. Create an empty report.
  5. Go to Reports > Reports.

Expected Result:

Report row will show user avatar.

Actual Result:

Report row shows fallback avatar.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7096073_1772840812463.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Mar 7, 2026
  2. melvin-bot commented on Mar 7, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #84284

  3. melvin-bot commented on Mar 7, 2026

    @melvin-bot

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

  4. melvin-bot commented on Mar 7, 2026

    @melvin-bot

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

  5. github-actions commented on Mar 7, 2026

    @github-actions
    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.
  6. MelvinBot commented on Mar 7, 2026

    @MelvinBot
    Contributor

    Proposal

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

    Report rows on the Reports page show fallback (generic silhouette) avatars instead of the user's custom uploaded avatar.

    What is the root cause of that problem?

    PR #84284 replaced the desktop/large-screen avatar rendering in ExpenseReportListItemRow with a new lightweight SearchReportAvatar component. The previous approach used the full ReportActionAvatars component, which internally reads personal details from Onyx's live PERSONAL_DETAILS_LIST via the useReportActionAvatars hook (src/components/ReportActionAvatars/useReportActionAvatars.ts:57-62). This store contains complete avatar data for all known users.

    The new approach pre-computes avatar data at data-transformation time via getSearchReportAvatarProps() (src/libs/SearchUIUtils.ts:1846-1878), which calls ReportUtils.getIcons() using only data.personalDetailsList from the search API response — with no fallback to Onyx's comprehensive personal details store.

    At src/libs/SearchUIUtils.ts:2352:

    const avatarProps = getSearchReportAvatarProps(
        reportItem, formatPhoneNumber, data.personalDetailsList ?? {}, ...
    );
    

    If the search API's personalDetailsList does not include the avatar field for a user (it's optional per src/types/onyx/PersonalDetails.ts:51), or if data.personalDetailsList is undefined entirely (allowed by src/types/onyx/SearchResults.ts:294), then getIcons() resolves to FallbackAvatar via the pattern at src/libs/ReportUtils.ts:3310:

    const avatarSource = personalDetails?.[accountID]?.avatar ?? FallbackAvatar;
    

    This only affects the desktop/large-screen layout (line 283 of ExpenseReportListItemRow.tsx). The mobile/narrow layout still uses ReportSearchHeader → AvatarWithDisplayName → ReportActionAvatars, which reads from the full Onyx store and is unaffected.

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

    In getSearchReportAvatarProps() (or its call site in getSections() at src/libs/SearchUIUtils.ts:2352), merge data.personalDetailsList with the full Onyx PERSONAL_DETAILS_LIST so that custom avatar URLs are available even when the search API response doesn't include them. This mirrors the fallback behavior the old useReportActionAvatars hook had.

    Alternatively, since getSections already receives data.personalDetailsList, the caller could be updated to merge it with Onyx personal details before passing it to getSearchReportAvatarProps, ensuring avatar data is complete.

    What alternative solutions did you explore? (Optional)

    1. Convert SearchReportAvatar to use a hook that reads from Onyx at render time — this would match the old behavior exactly but defeats the performance purpose of PR [PERF] - Use lighter avatar component in Report Item Row #84284, which aimed to avoid per-item Onyx subscriptions.
    2. Pre-populate avatars in the search API response — this would be a backend change to ensure personalDetailsList always includes avatar fields, but that's a larger scope change and wouldn't protect against missing data.

    The merge approach (option in the recommended fix) preserves the performance benefit of pre-computing avatars while ensuring custom avatar data is always available.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. 29 remaining items

  8. melvin-bot commented on Mar 19, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    • Contributor: @jmusial does not require payment (Contractor)
    • ROLE: @abzokhattab paid $(AMOUNT) via Upwork (LINK)

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • 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//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  9. mallenexpensify commented on Mar 20, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @abzokhattab due $250 via NewDot

    @abzokhattab plz complete the BZ checklist and tag me in a post once you have. Thx

  10. abzokhattab commented on Mar 20, 2026

    @abzokhattab
    Contributor

    @mallenexpensify Here is the main PR #84599. The mentioned PR is a follow-up that tackled this review comment

  11. mallenexpensify commented on Mar 21, 2026

    @mallenexpensify
    Contributor

    @abzokhattab payment summary updated above, plz complete the BZ checklist and tag me in a post once you have. Thx

  12. melvin-bot commented on Mar 24, 2026

    @melvin-bot

    @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  13. abzokhattab commented on Mar 26, 2026

    @abzokhattab
    Contributor

    BugZero Checklist:

    • [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/84284/changes#r2996080088

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

      Link to discussion: N/A — Not critical. Functional behavior is correct; only avatar display is affected.

    • [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: https://github.com/Expensify/Expensify/issues/616717

    Regression Test Proposal

    Precondition:

    • Use a new account with a custom uploaded avatar (not the default)
    • Create a workspace

    Test:

    1. Go to the workspace chat
    2. Create an empty report
    3. Navigate to Reports > Reports
    4. Verify the report row displays the user's custom avatar (not the fallback/default silhouette avatar)

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-b499-ae26-3493-2bbd01b34874
  14. abzokhattab commented on Mar 26, 2026

    @abzokhattab
    Contributor
  15. mallenexpensify commented on Mar 26, 2026

    @mallenexpensify
    Contributor

    Thx @abzokhattab

    ^ Test case created

  16. twisterdotcom commented on Mar 26, 2026

    @twisterdotcom
    Contributor

    @abzokhattab has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-41fd-a7e4-4d43-9e64522eeb24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions