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-05-22] [$250] Reports page - Custom report title briefly shows "Chat Report" when clicking a report row #88162
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Set up a report with a custom report title (via title formula)
Click on a report row to open the report
Expected Result:
The report title in the title column should remain as the custom report title throughout the transition.
Actual Result:
When clicking on a report row, the custom report title is briefly changed to "Chat Report" before reverting back to the correct custom title once the report loads. This appears to be related to an optimistic update that temporarily replaces the resolved report name with a default/fallback value.
Workaround:
None known — this is a visual flicker only and does not affect functionality.
Platforms:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
Notes
A similar but distinct issue existed for the chat search/switcher context (#84140), which was closed as not reproducible. This issue is specific to the Reports page and likely involves the custom report title formula not being applied during the optimistic update when a report row is clicked.
Issue OwnerCurrent Issue Owner: @mallenexpensifyUpwork Automation - Do Not Edit
changed the title [-]Reports page - Custom report title briefly shows "Chat Report" when clicking a report row[/-][+][$250] Reports page - Custom report title briefly shows "Chat Report" when clicking a report row[/+]on Apr 16, 2026
When a report row is clicked, openReport creates an optimistic report update. If reportActionsExist(reportID) returns false (report actions aren't cached yet — common when navigating from the Reports/Search page), it sets reportName to the cached value OR falls back to CONST.REPORT.DEFAULT_REPORT_NAME ('Chat Report').
This optimistic merge overwrites the report's reportName in Onyx. For expense reports with a custom title formula, computeReportName returns report.reportName directly — so if the optimistic merge set it to 'Chat Report', the UI briefly shows that until the server response restores the correct title.
What changes do you think we should make in order to solve the problem?
The optimistic update in openReport should not overwrite reportName when the report already exists in Onyx with a valid reportName. At src/libs/actions/Report/index.ts:1275-1279, the logic should skip setting reportName in the optimistic data when the report is already cached with a non-empty reportName:
This preserves the existing custom report title during the optimistic phase and only falls back to 'Chat Report' when no report name exists at all.
What alternative solutions did you explore? (Optional)
An alternative would be to suppress the optimistic reportName merge entirely when the report already exists in Onyx (i.e., only set reportName for truly new/unknown reports). However, the approach above is more targeted — it preserves the existing behavior for reports without a cached name while fixing the flicker for reports that already have one.
Investigation details
Data flow causing the flicker:
User clicks a report row → navigates to SearchMoneyRequestReportPage (or ReportFetchHandler)
openReport({reportID}) is called
reportActionsExist(reportID) returns false (actions not cached from Search page)
Optimistic report merges reportName = cached name ?? 'Chat Report' into Onyx
computeReportName at ReportNameUtils.ts:896 returns report.reportName for expense reports → shows 'Chat Report'
Server response arrives → overwrites with correct custom title → flicker complete
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.
Please re-state the problem that we are trying to solve in this issue.
On New Expensify (Web), opening a report from the Reports page causes the report title to briefly flicker from the resolved custom report title (set via title formula) to the literal string "Chat Report", and then revert back to the correct custom title once the report finishes loading. The expected behavior is that the custom report title remains stable and visible throughout the navigation transition, with no momentary fallback to a default name.
What is the root cause of that problem?
The Reports page renders each row using the derived reportAttributes.reportName Onyx value. reportAttributes is computed by the OnyxDerived config below, which calls computeReportName for every report in the collection — that is the function that resolves the workspace title formula into a human-readable name like TripUSA-2024-12.
For an expense report (the type used on the Reports page), computeReportName short-circuits and returns the raw report.reportName field directly — it does not re-derive the title from the formula on every call. So whatever value is sitting in report.reportName in Onyx becomes the displayed title.
When the user clicks a row, Report.openReport is dispatched. It builds an optimistic Onyx update for the report. If the report's actions have not been hydrated yet (which is the common case when arriving from a Search snapshot — the REPORT_ACTIONS_<id> key is still empty), it builds an optimisticReport payload that unconditionally includes a reportName field, falling back to CONST.REPORT.DEFAULT_REPORT_NAME (literally the string "Chat Report") whenever the value read from allReports is missing. The optimistic merge then writes that value into ONYXKEYS.COLLECTION.REPORT_<id>.reportName.
// Not translated because default report names are not translated on the backend (matches Expensify Classic behavior)
DEFAULT_EXPENSE_REPORT_NAME: 'New Report',
Putting it together: when the user opens a report from the Reports page, search rows are typically backed by a SNAPSHOT_* Onyx key, so the global ONYXKEYS.COLLECTION.REPORT_<id> entry is either absent or has an empty/stale reportName. The ?? CONST.REPORT.DEFAULT_REPORT_NAME fallback therefore kicks in and the optimistic merge writes reportName: "Chat Report" to the report. Because reportAttributes is derived from the report collection, it immediately recomputes; computeReportName returns report.reportName (now "Chat Report") for the expense report, and the header re-renders with that value. A few hundred milliseconds later, the OpenReport API response arrives, replaces report.reportName with the server-resolved custom title, and the header reverts. The end-user sees a visible flicker from the custom title → "Chat Report" → custom title.
What changes do you think we should make in order to solve the problem?
The optimistic update should never downgrade an already-known report name to the fallback "Chat Report" string. The fallback only exists to seed a placeholder when the report is being newly created (the isCreatingNewReport branch a few lines below already handles that case explicitly with Onyx.METHOD.SET). For the plain "open an existing report" path, the optimistic merge should either:
write the existing resolved name (a no-op merge), or
omit reportName entirely so the merge does not touch the field.
This way, if Onyx already has a real reportName for the report, it is preserved verbatim; if it does not, no "Chat Report" placeholder is injected and the header simply waits one render cycle for the API response — which is far less jarring than flashing the wrong title.
Opening a report whose reportName is already in Onyx (the normal case from the Reports page / Search row): the optimistic merge re-writes the same value, so reportAttributes does not flip and the header keeps showing the custom title throughout the transition.
Opening a report whose reportName is not yet in Onyx (e.g. arriving from a deep link before any snapshot has loaded the report): nothing is written to report.reportName at all; the header shows whatever fallback computeReportName already produces (typically an empty string or a chat-thread-derived name), and the real title appears as soon as the OpenReport response lands. No "Chat Report" placeholder is ever shown.
Creating a brand-new report (isCreatingNewReport === true): unaffected — that branch a few lines below explicitly calls Onyx.METHOD.SET with reportName: CONST.REPORT.DEFAULT_REPORT_NAME plus newReportObject, which is the legitimate use of the placeholder for not-yet-persisted reports.
Please re-state the problem that we are trying to solve in this issue.
When opening a report from the Reports page, the report title briefly changes from the correct custom title to "Chat Report" before reverting back. This creates a visible UI flicker and inconsistent user experience during navigation.
What is the root cause of that problem?
The issue is caused by an optimistic Onyx update inside openReport.
When reportActionsExist(reportID) is false, the optimistic update sets:
@abbasifaizan70 can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, and an Upwork job exists, please submit a proposal. https://www.upwork.com/jobs/~022058998122999943661
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Apr 16, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)[-]Reports page - Custom report title briefly shows "Chat Report" when clicking a report row[/-][+][$250] Reports page - Custom report title briefly shows "Chat Report" when clicking a report row[/+]melvin-bot commentedon Apr 16, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022044913230401817001
MelvinBot commentedon Apr 16, 2026
Proposal
What is the root cause of that problem?
When a report row is clicked,
openReportcreates an optimistic report update. IfreportActionsExist(reportID)returnsfalse(report actions aren't cached yet — common when navigating from the Reports/Search page), it setsreportNameto the cached value OR falls back toCONST.REPORT.DEFAULT_REPORT_NAME('Chat Report').This optimistic merge overwrites the report's
reportNamein Onyx. For expense reports with a custom title formula,computeReportNamereturnsreport.reportNamedirectly — so if the optimistic merge set it to'Chat Report', the UI briefly shows that until the server response restores the correct title.What changes do you think we should make in order to solve the problem?
The optimistic update in
openReportshould not overwritereportNamewhen the report already exists in Onyx with a validreportName. Atsrc/libs/actions/Report/index.ts:1275-1279, the logic should skip settingreportNamein the optimistic data when the report is already cached with a non-emptyreportName:This preserves the existing custom report title during the optimistic phase and only falls back to
'Chat Report'when no report name exists at all.What alternative solutions did you explore? (Optional)
An alternative would be to suppress the optimistic
reportNamemerge entirely when the report already exists in Onyx (i.e., only setreportNamefor truly new/unknown reports). However, the approach above is more targeted — it preserves the existing behavior for reports without a cached name while fixing the flicker for reports that already have one.Investigation details
Data flow causing the flicker:
SearchMoneyRequestReportPage(orReportFetchHandler)openReport({reportID})is calledreportActionsExist(reportID)returnsfalse(actions not cached from Search page)reportName= cached name ??'Chat Report'into OnyxcomputeReportNameatReportNameUtils.ts:896returnsreport.reportNamefor expense reports → shows'Chat Report'Key files:
src/libs/actions/Report/index.ts:1275-1313— optimistic update logicsrc/libs/ReportNameUtils.ts:896-898— expense report name resolutionsrc/CONST/index.ts:1731—DEFAULT_REPORT_NAME: 'Chat Report'Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.abbasifaizan70 commentedon Apr 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On New Expensify (Web), opening a report from the Reports page causes the report title to briefly flicker from the resolved custom report title (set via title formula) to the literal string "Chat Report", and then revert back to the correct custom title once the report finishes loading. The expected behavior is that the custom report title remains stable and visible throughout the navigation transition, with no momentary fallback to a default name.
What is the root cause of that problem?
The Reports page renders each row using the derived
reportAttributes.reportNameOnyx value.reportAttributesis computed by the OnyxDerived config below, which callscomputeReportNamefor every report in the collection — that is the function that resolves the workspace title formula into a human-readable name likeTripUSA-2024-12.App/src/libs/actions/OnyxDerived/configs/reportAttributes.ts
Lines 304 to 326 in f855ba5
For an expense report (the type used on the Reports page),
computeReportNameshort-circuits and returns the rawreport.reportNamefield directly — it does not re-derive the title from the formula on every call. So whatever value is sitting inreport.reportNamein Onyx becomes the displayed title.App/src/libs/ReportNameUtils.ts
Lines 859 to 898 in f855ba5
When the user clicks a row,
Report.openReportis dispatched. It builds an optimistic Onyx update for the report. If the report's actions have not been hydrated yet (which is the common case when arriving from a Search snapshot — theREPORT_ACTIONS_<id>key is still empty), it builds anoptimisticReportpayload that unconditionally includes areportNamefield, falling back toCONST.REPORT.DEFAULT_REPORT_NAME(literally the string"Chat Report") whenever the value read fromallReportsis missing. The optimistic merge then writes that value intoONYXKEYS.COLLECTION.REPORT_<id>.reportName.App/src/libs/actions/Report/index.ts
Lines 1275 to 1314 in f855ba5
The
DEFAULT_REPORT_NAMEconstant that this fallback resolves to:App/src/CONST/index.ts
Lines 1729 to 1733 in f855ba5
Putting it together: when the user opens a report from the Reports page, search rows are typically backed by a
SNAPSHOT_*Onyx key, so the globalONYXKEYS.COLLECTION.REPORT_<id>entry is either absent or has an empty/stalereportName. The?? CONST.REPORT.DEFAULT_REPORT_NAMEfallback therefore kicks in and the optimistic merge writesreportName: "Chat Report"to the report. BecausereportAttributesis derived from the report collection, it immediately recomputes;computeReportNamereturnsreport.reportName(now"Chat Report") for the expense report, and the header re-renders with that value. A few hundred milliseconds later, theOpenReportAPI response arrives, replacesreport.reportNamewith the server-resolved custom title, and the header reverts. The end-user sees a visible flicker from the custom title →"Chat Report"→ custom title.What changes do you think we should make in order to solve the problem?
The optimistic update should never downgrade an already-known report name to the fallback
"Chat Report"string. The fallback only exists to seed a placeholder when the report is being newly created (theisCreatingNewReportbranch a few lines below already handles that case explicitly withOnyx.METHOD.SET). For the plain "open an existing report" path, the optimistic merge should either:reportNameentirely so the merge does not touch the field.This way, if Onyx already has a real
reportNamefor the report, it is preserved verbatim; if it does not, no"Chat Report"placeholder is injected and the header simply waits one render cycle for the API response — which is far less jarring than flashing the wrong title.App/src/libs/actions/Report/index.ts
Lines 1275 to 1314 in f855ba5
Behavior changes after this fix:
reportNameis already in Onyx (the normal case from the Reports page / Search row): the optimistic merge re-writes the same value, soreportAttributesdoes not flip and the header keeps showing the custom title throughout the transition.reportNameis not yet in Onyx (e.g. arriving from a deep link before any snapshot has loaded the report): nothing is written toreport.reportNameat all; the header shows whatever fallbackcomputeReportNamealready produces (typically an empty string or a chat-thread-derived name), and the real title appears as soon as theOpenReportresponse lands. No"Chat Report"placeholder is ever shown.isCreatingNewReport === true): unaffected — that branch a few lines below explicitly callsOnyx.METHOD.SETwithreportName: CONST.REPORT.DEFAULT_REPORT_NAMEplusnewReportObject, which is the legitimate use of the placeholder for not-yet-persisted reports.fix: prevent custom report title flicker to "Chat Report" when clicki…
pranjal2410719 commentedon Apr 17, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When opening a report from the Reports page, the report title briefly changes from the correct custom title to "Chat Report" before reverting back. This creates a visible UI flicker and inconsistent user experience during navigation.
What is the root cause of that problem?
The issue is caused by an optimistic Onyx update inside
openReport.When
reportActionsExist(reportID)is false, the optimistic update sets:60 remaining items
melvin-bot commentedon May 21, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon May 22, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon May 25, 2026
Payment Summary
Contributor: @abbasifaizan70 paid $250 via Upwork
Contributor+: @thesahindia due $250 via NewDot
@abbasifaizan70 can you please accept the job below? Please reply here and tag me once you have.
If you're not sent an offer in Upwork when you're assigned to an issue, and an Upwork job exists, please submit a proposal.
https://www.upwork.com/jobs/~022058998122999943661
^ Test case created. Thx
abbasifaizan70 commentedon May 25, 2026
@mallenexpensify offer accepted and submitted for payment approval. Thanks
mallenexpensify commentedon May 25, 2026
@abbasifaizan70 paid, summary updated above. Thx.
garrettmknight commentedon Aug 7, 2026
$250 approved for @thesahindia
mallenexpensify commentedon Aug 7, 2026
Payment summary updated, I forgot to tag @thesahindia earlier