Skip to content

[$250] Chat search briefly displays “Chat Report” label before resolving to correct chat name #84140

Closed

Description

@m-natarajan

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:
Reproducible in staging?: Needs Reproduction (Unable to reproduce)
Reproducible in production?: Needs Reproduction
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @twisterdotcom
Slack conversation (hyperlinked to channel name): #Product

Action Performed:

  1. Open New Expensify (Web).
  2. Use search to find a recent DM
  3. Observe the search results and/or initial chat load state.

Expected Result:

The chat should immediately display the correct conversation name (e.g., the participant’s name).
No temporary or generic placeholder label should appear.

Actual Result:

The chat briefly displays as “Chat Report.”

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

The screenshot for the issue is in Slack thread

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ahmedGaber93
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022029191820519087181
  • Upwork Job ID: 2029191820519087181
  • Last Price Increase: 2026-03-25

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 4, 2026
  2. melvin-bot commented on Mar 4, 2026

    @melvin-bot

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

  3. MelvinBot commented on Mar 4, 2026

    @MelvinBot
    Contributor

    Proposal

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

    When a user searches for a DM in New Expensify (Web) and navigates to it, the chat header briefly displays "Chat Report" before resolving to the correct conversation name (e.g., the participant's name).

    What is the root cause of that problem?

    The report name resolution uses a two-tier fallback in getReportName at src/libs/ReportNameUtils.ts:905:

    reportAttributesDerivedValue?.[report.reportID]?.reportName ?? report.reportName ?? ''
    

    When navigating to a chat, the report object in Onyx has reportName: 'Chat Report' (the CONST.REPORT.DEFAULT_REPORT_NAME constant defined at src/CONST/index.ts:1594). This value comes from optimistic data written in openReport (src/libs/actions/Report/index.ts:1239) and buildOptimisticChatReport (src/libs/ReportUtils.ts:7756).

    The derived REPORT_ATTRIBUTES value, which computes the correct participant-based name via computeReportName → buildReportNameFromParticipantNames, recomputes asynchronously after the report data changes. During the gap between the optimistic write and the derived value update, getReportName falls back to report.reportName which is 'Chat Report'.

    Critically, HeaderView (src/pages/inbox/HeaderView.tsx:234) determines its loading state as:

    const isLoading = !report?.reportID || !title;
    

    Since 'Chat Report' is a truthy string, isLoading evaluates to false, so the skeleton loader is skipped and the incorrect "Chat Report" name is rendered directly. Once the derived value finishes recomputing, the title updates to the correct name.

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

    In HeaderView (src/pages/inbox/HeaderView.tsx), update the isLoading condition to also treat CONST.REPORT.DEFAULT_REPORT_NAME as a loading state for DM/1:1 chats (where the display name should come from participant personal details rather than the reportName field). This way, the skeleton loader remains visible until the derived reportAttributes computes the correct participant-based name, preventing the "Chat Report" flash.

    Specifically, for chat reports that are not rooms, groups, or other special types (i.e., regular DMs where the name is derived from participants), the condition should check if the title still equals the default placeholder and continue showing the skeleton until a real name is available.

    What alternative solutions did you explore? (Optional)

    1. Precomputing the derived value before navigation: This would prevent the flash entirely but would add latency to the navigation, making the app feel slower.
    2. Changing the default reportName to an empty string: This would make isLoading catch it naturally, but 'Chat Report' is also used as a fallback on the backend and in other report types (like trip rooms at src/libs/ReportNameUtils.ts:743), so changing it broadly could have unintended side effects.
    3. Eagerly computing the name in getReportName when derived value is missing: This would mean calling computeReportName synchronously as a fallback, but this function is expensive and would negate the performance benefits of the derived values system.

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 4, 2026
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 4, 2026
  6. melvin-bot commented on Mar 4, 2026

    @melvin-bot

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

  7. changed the title [-]Chat search briefly displays “Chat Report” label before resolving to correct chat name[/-] [+][$250] Chat search briefly displays “Chat Report” label before resolving to correct chat name[/+] on Mar 4, 2026
  8. melvin-bot commented on Mar 4, 2026

    @melvin-bot
  9. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    📣 @nguyendinson! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  10. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    ⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.

  11. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    ⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

  12. 31 remaining items

  13. lanitochka17 commented on Mar 23, 2026

    @lanitochka17

    Issue is still reproducible on the latest build 9.3.42-0 on Android app too

    Names.3.mp4
  14. JmillsExpensify commented on Mar 25, 2026

    @JmillsExpensify
    Contributor

    Still waiting for proposals

  15. melvin-bot commented on Mar 25, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  16. jainam884 commented on Mar 26, 2026

    @jainam884

    @JmillsExpensify I’ve updated my existing proposal in-place with a fresh analysis aligned to the current repro path and latest issue discussion: #84140 (comment)

    This revision focuses on Search route popup typed-query results (where Chat Report appears on first load) and the option-refresh timing/root cause. Please review when you get a chance.

  17. ahmedGaber93 commented on Mar 26, 2026

    @ahmedGaber93
    Contributor

    @jainam884 Thanks for the proposal.

    I’ve reviewed it, and it seems to duplicate Melvin’s proposal, which isn’t working for me.
    We’re currently trying to reproduce this issue: #84140 (comment)

    are you able to reproduce it?

  18. jainam884 commented on Mar 27, 2026

    @jainam884

    @ahmedGaber93 I was able to reproduce this earlier, but later I couldn’t reproduce it anymore (similar to the March 18, 2026 update).

    I saw the issue was reopened on March 23, 2026 based on the Android 9.3.42-0 recording: #84140 (comment)

    At this moment, I’m still not able to reproduce it consistently with those steps.
    Could you share the exact current repro context (environment + account/setup + query flow) so I can retest against the same conditions?

  19. mvtglobally commented on Mar 28, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  20. JmillsExpensify commented on Mar 29, 2026

    @JmillsExpensify
    Contributor

    Let's focus on other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions