You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-07-17] Chat - Chat Report appears on user's name when start new chat #95696
👋 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:
Identify the pull request that introduced this issue and revert it.
📣 @vapegobugu! 📣
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:
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.
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.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Root Cause: When a new 1:1 chat is created optimistically, the header/LHN renders before the derived reportAttributes value (which holds the real, participant-derived report name) has been computed. In that window, getReportName falls back to report.reportName, which for a fresh optimistic chat is set to CONST.REPORT.DEFAULT_REPORT_NAME = 'Chat Report' (CONST/index.ts:1880). So the literal string "Chat Report" is shown instead of the user's name.
This is a regression from #95287 ("Coalesce OnyxDerived recomputations via macrotask scheduling", merged 2026-07-08, in this deploy — checklist #95677). That PR changed recomputeDerivedValue to defer the reportAttributes recompute onto a macrotask instead of running it synchronously (OnyxDerived/index.ts:195-201). Before #95287 the derived name was already populated by the time the new chat rendered; now the render wins the race and shows the fallback. This matches the staging-only / production-safe split.
Recommended Fix: Eliminate the empty-derived-value window on optimistic report creation while keeping #95287's coalescing win for bulk updates — flush the reportAttributes recompute synchronously when a brand-new report key first appears in the REPORT delta (i.e. don't defer the first population of a report). If the deploy needs to be unblocked immediately, CP-revert #95287 (item 42 in checklist #95677).
Investigation details
Code path (input → bug → symptom):
FAB > Start chat > select user → navigateToAndOpenReport (Report/index.ts:2289) builds an optimistic report (buildOptimisticChatReport, participants set, reportName defaulted to 'Chat Report' at ReportUtils.ts:7862), calls openReport (SETs the report with reportName: DEFAULT_REPORT_NAME at Report/index.ts:1735-1738), then synchronously navigates.
The computed path is otherwise correct: for a plain 1:1 CHAT, computeReportName → buildReportNameFromParticipantNames resolves the participant display name — it just hasn't run yet at first paint. #95287's own test diff (tests/ui/components/HeaderViewTest.tsx) even documents that "the title can settle a tick after," confirming the timing shift.
Note on transient vs. persistent: the reporter's video suggests the wrong name persists rather than flashing for one tick. If so, there may be a secondary miss in the delta / personalDetailsIsOnlyTrigger short-circuit in reportAttributes.ts that leaves the new report's derived name stale on a later settle — worth confirming whether the fix needs to also address that, or is purely the timing window.
App repo checkout here is a shallow clone (1 commit), so introducing-PR attribution was done via gh pr/deploy-checklist history rather than local git blame.
Next Steps for Contributor+ team: To accept:@MelvinBot implement this to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
@MelvinBot, I don't think your analysis is correct. See the video and observe that the Chat Report appears on the StartNewChatPage option when selected for a brief moment.
You're right about the location — thanks shubham1206agra. It's the Start New Chat option row, not the chat header I pointed at. But it's the same mechanism and the same introducing PR, so here's the corrected analysis.
Corrected Analysis
Root Cause: When you tap a user with no existing 1:1 chat, an optimistic report is created with reportName = CONST.REPORT.DEFAULT_REPORT_NAME = 'Chat Report' (ReportUtils.ts:7862, const at CONST/index.ts:1880). That report immediately enters the options list as a Recents report option, whose title is getReportName(report, reportAttributesDerived) (OptionsListUtils/index.ts:1234-1253). getReportName returns reportAttributes[reportID]?.reportName ?? report.reportName (ReportNameUtils.ts:1113) — and for a brand-new report the derived reportAttributes entry doesn't exist yet, so it falls back to report.reportName = 'Chat Report' for a brief moment.
Still a regression from #95287 ("Coalesce OnyxDerived recomputations via macrotask scheduling", merged 2026-07-08, in this deploy). It defers the reportAttributes recompute onto a macrotask (OnyxDerived/index.ts:194-200), which opens the render window where the option row shows the placeholder before the derived name lands. Matches the staging-only / production-safe split and the "brief moment" behavior.
Recommended Fix: Harden getReportName so that when it must fall back to report.reportName and that value is DEFAULT_REPORT_NAME for a 1:1 DM, it computes the participant name instead of returning the placeholder (ReportNameUtils.ts:1113) — this closes both the option-row and header variants. A narrower alternative: in createOption, when computedReportName === DEFAULT_REPORT_NAME, use getDisplayNameForParticipant(...) (the same value the showPersonalDetails branch already uses). To simply unblock the deploy, CP-revert #95287.
Investigation details
Personal-detail ("Contacts") options never show this because they build the title via getDisplayNameForParticipant under showPersonalDetails: true (OptionsListUtils/index.ts:1236-1238). Only the report option (the newly-created optimistic report) flashes "Chat Report".
Selection flow: NewChatPageselectOption → navigateToAndOpenReport([login]) → createAndOpenNewOptimisticChat → buildOptimisticChatReport writes the report with reportName: 'Chat Report' synchronously; the option list re-renders that user as a report option before the macrotask-deferred reportAttributes recompute runs.
No recent OptionsListUtils/NewChatPage change newly introduced getReportName where a participant login was used before — the fallback pattern is pre-existing; only the recompute timing changed, via Coalesce OnyxDerived recomputations via macrotask scheduling #95287. This is a client-side timing issue best confirmed with an on-device/staging repro rather than server logs.
Correction to my earlier comment: the fallback fires in the option-row title (OptionsListUtilscreateOption), not the header's getReportName call as I first framed it — though both share the same getReportName fallback.
Confidence: High on the code path and that #95287 widened the exposing window.
Next Steps for Contributor+ team: To accept:@MelvinBot implement this to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Chat - Chat Report appears on user's name when start new chat[/-][+][Due for payment 2026-07-17] Chat - Chat Report appears on user's name when start new chat[/+]on Jul 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.32-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@cristipaval 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]. If no checklist is needed for this issue, you can click: [no checklist button]
@cristipaval 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jul 9, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/5b3a262db2fd27b1675bdadde190b7fde4be2eb6b4127c83e5bb1c5889a99cbc
melvin-bot commentedon Jul 9, 2026
Triggered auto assignment to @cristipaval (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jul 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 9, 2026
👋 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:
melvin-bot commentedon Jul 9, 2026
📣 @vapegobugu! 📣
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:
Format:
MelvinBot commentedon Jul 9, 2026
Issue Analysis
Root Cause: When a new 1:1 chat is created optimistically, the header/LHN renders before the derived
reportAttributesvalue (which holds the real, participant-derived report name) has been computed. In that window,getReportNamefalls back toreport.reportName, which for a fresh optimistic chat is set toCONST.REPORT.DEFAULT_REPORT_NAME='Chat Report'(CONST/index.ts:1880). So the literal string "Chat Report" is shown instead of the user's name.This is a regression from #95287 ("Coalesce OnyxDerived recomputations via macrotask scheduling", merged 2026-07-08, in this deploy — checklist #95677). That PR changed
recomputeDerivedValueto defer thereportAttributesrecompute onto a macrotask instead of running it synchronously (OnyxDerived/index.ts:195-201). Before #95287 the derived name was already populated by the time the new chat rendered; now the render wins the race and shows the fallback. This matches the staging-only / production-safe split.Recommended Fix: Eliminate the empty-derived-value window on optimistic report creation while keeping #95287's coalescing win for bulk updates — flush the
reportAttributesrecompute synchronously when a brand-new report key first appears in the REPORT delta (i.e. don't defer the first population of a report). If the deploy needs to be unblocked immediately, CP-revert #95287 (item 42 in checklist #95677).Investigation details
Code path (input → bug → symptom):
navigateToAndOpenReport(Report/index.ts:2289) builds an optimistic report (buildOptimisticChatReport, participants set,reportNamedefaulted to'Chat Report'atReportUtils.ts:7862), callsopenReport(SETs the report withreportName: DEFAULT_REPORT_NAMEatReport/index.ts:1735-1738), then synchronously navigates.HeaderView.tsx:164) and avatar/LHN (AvatarWithDisplayName.tsx:211) render immediately, callinggetReportName(report, reportAttributes).reportAttributesrecompute to a macrotask, soreportAttributes[newReportID]is not yet populated.getReportNamereturnsreport.reportName='Chat Report'.The computed path is otherwise correct: for a plain 1:1 CHAT,
computeReportName→buildReportNameFromParticipantNamesresolves the participant display name — it just hasn't run yet at first paint. #95287's own test diff (tests/ui/components/HeaderViewTest.tsx) even documents that "the title can settle a tick after," confirming the timing shift.Note on transient vs. persistent: the reporter's video suggests the wrong name persists rather than flashing for one tick. If so, there may be a secondary miss in the delta /
personalDetailsIsOnlyTriggershort-circuit inreportAttributes.tsthat leaves the new report's derived name stale on a later settle — worth confirming whether the fix needs to also address that, or is purely the timing window.App repo checkout here is a shallow clone (1 commit), so introducing-PR attribution was done via
gh pr/deploy-checklist history rather than localgit blame.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement thisto create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
shubham1206agra commentedon Jul 9, 2026
@MelvinBot, I don't think your analysis is correct. See the video and observe that the Chat Report appears on the StartNewChatPage option when selected for a brief moment.
MelvinBot commentedon Jul 9, 2026
You're right about the location — thanks
shubham1206agra. It's the Start New Chat option row, not the chat header I pointed at. But it's the same mechanism and the same introducing PR, so here's the corrected analysis.Corrected Analysis
Root Cause: When you tap a user with no existing 1:1 chat, an optimistic report is created with
reportName = CONST.REPORT.DEFAULT_REPORT_NAME='Chat Report'(ReportUtils.ts:7862, const atCONST/index.ts:1880). That report immediately enters the options list as a Recents report option, whose title isgetReportName(report, reportAttributesDerived)(OptionsListUtils/index.ts:1234-1253).getReportNamereturnsreportAttributes[reportID]?.reportName ?? report.reportName(ReportNameUtils.ts:1113) — and for a brand-new report the derivedreportAttributesentry doesn't exist yet, so it falls back toreport.reportName='Chat Report'for a brief moment.Still a regression from #95287 ("Coalesce OnyxDerived recomputations via macrotask scheduling", merged 2026-07-08, in this deploy). It defers the
reportAttributesrecompute onto a macrotask (OnyxDerived/index.ts:194-200), which opens the render window where the option row shows the placeholder before the derived name lands. Matches the staging-only / production-safe split and the "brief moment" behavior.Recommended Fix: Harden
getReportNameso that when it must fall back toreport.reportNameand that value isDEFAULT_REPORT_NAMEfor a 1:1 DM, it computes the participant name instead of returning the placeholder (ReportNameUtils.ts:1113) — this closes both the option-row and header variants. A narrower alternative: increateOption, whencomputedReportName === DEFAULT_REPORT_NAME, usegetDisplayNameForParticipant(...)(the same value theshowPersonalDetailsbranch already uses). To simply unblock the deploy, CP-revert #95287.Investigation details
getDisplayNameForParticipantundershowPersonalDetails: true(OptionsListUtils/index.ts:1236-1238). Only the report option (the newly-created optimistic report) flashes "Chat Report".NewChatPageselectOption→navigateToAndOpenReport([login])→createAndOpenNewOptimisticChat→buildOptimisticChatReportwrites the report withreportName: 'Chat Report'synchronously; the option list re-renders that user as a report option before the macrotask-deferredreportAttributesrecompute runs.getReportNamewhere a participant login was used before — the fallback pattern is pre-existing; only the recompute timing changed, via Coalesce OnyxDerived recomputations via macrotask scheduling #95287. This is a client-side timing issue best confirmed with an on-device/staging repro rather than server logs.OptionsListUtilscreateOption), not the header'sgetReportNamecall as I first framed it — though both share the samegetReportNamefallback.Confidence: High on the code path and that #95287 widened the exposing window.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement thisto create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
7 remaining items
m-natarajan commentedon Jul 9, 2026
Closing as per this comment and not repro anymore
[-]Chat - Chat Report appears on user's name when start new chat[/-][+][Due for payment 2026-07-17] Chat - Chat Report appears on user's name when start new chat[/+]melvin-bot commentedon Jul 10, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.32-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 2026-07-17. 🎊
melvin-bot commentedon Jul 10, 2026
@cristipaval 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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jul 14, 2026
@cristipaval 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]. If no checklist is needed for this issue, you can click: [no checklist button]
lanitochka17 commentedon Jul 28, 2026
Deploy Blocker #97250 was identified to be related to the PR #96785 that attempted to fix this issue.