From ce98d0ebab3b4125b8877ef4a40c719d1d534727 Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 2 Jun 2026 09:29:17 +0200 Subject: [PATCH 1/8] remove last usages of ReportUtils.getReportName, Remove getSearchReportName --- src/libs/ReportUtils.ts | 237 +------------------------------------- src/libs/SearchUIUtils.ts | 22 ++-- 2 files changed, 11 insertions(+), 248 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index cf1522b3f9f4..1b31087186f1 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -82,8 +82,8 @@ import type {PendingChatMember} from '@src/types/onyx/ReportMetadata'; import type {OnyxData} from '@src/types/onyx/Request'; import type {Comment, TransactionChanges, WaypointCollection} from '@src/types/onyx/Transaction'; import type {FileObject} from '@src/types/utils/Attachment'; -import {isEmptyObject, isEmptyValueObject} from '@src/types/utils/EmptyObject'; import type {EmptyObject} from '@src/types/utils/EmptyObject'; +import {isEmptyObject, isEmptyValueObject} from '@src/types/utils/EmptyObject'; import type IconAsset from '@src/types/utils/IconAsset'; import {getBankAccountFromID} from './actions/BankAccounts'; import {unholdRequest} from './actions/IOU/Hold'; @@ -98,12 +98,12 @@ import { import {canApproveIOU, canIOUBePaid, canSubmitReport, getBadgeFromIOUReport, getIOUReportActionWithBadge} from './actions/IOU/ReportWorkflow'; import {createDraftWorkspace} from './actions/Policy/Policy'; import hasCreditBankAccount from './actions/ReimbursementAccount/hasCreditBankAccount'; -import {openUnreportedExpense} from './actions/Report'; import type {GuidedSetupData, TaskForParameters} from './actions/Report'; +import {openUnreportedExpense} from './actions/Report'; import {isAnonymousUser as isAnonymousUserSession} from './actions/Session'; import {removeDraftTransactionsByIDs} from './actions/TransactionEdit'; -import {getOnboardingMessages} from './actions/Welcome/OnboardingFlow'; import type {OnboardingCompanySize, OnboardingMessage, OnboardingPurpose, OnboardingTaskLinks} from './actions/Welcome/OnboardingFlow'; +import {getOnboardingMessages} from './actions/Welcome/OnboardingFlow'; import type {AddCommentOrAttachmentParams} from './API/parameters'; import {convertToDisplayString} from './CurrencyUtils'; import DateUtils from './DateUtils'; @@ -171,6 +171,7 @@ import { isSubmitAndClose, shouldShowPolicy, } from './PolicyUtils'; +import type {LastVisibleMessage} from './ReportActionsUtils'; import { formatLastMessageText, getActionableJoinRequestPendingReportAction, @@ -232,14 +233,12 @@ import { isWhisperAction, wasActionTakenByCurrentUser, } from './ReportActionsUtils'; -import type {LastVisibleMessage} from './ReportActionsUtils'; // This cycle import is safe because ReportNameUtils was extracted from ReportUtils to separate report name computation logic. // The functions imported here are pure utility functions that don't create initialization-time dependencies. // ReportNameUtils imports helper functions from ReportUtils, and ReportUtils imports name generation functions from ReportNameUtils. // eslint-disable-next-line import/no-cycle import { buildReportNameFromParticipantNames, - // eslint-disable-next-line no-restricted-imports -- We plan to refactor this file to remove dependency on computeReportName computeReportName, computeReportNameBasedOnReportAction, generateArchivedReportName, @@ -5789,232 +5788,6 @@ function parseReportActionHtmlToText(reportAction: OnyxEntry, repo return textMessage; } -/** - * Get the title for a report. - * @deprecated Moved to src/libs/ReportNameUtils.ts. - */ -function getReportName(reportNameInformation: GetReportNameParams): string { - const {report, policy, parentReportActionParam, personalDetails, invoiceReceiverPolicy, reportAttributes, transactions, isReportArchived, reports, conciergeReportID} = - reportNameInformation; - // Check if we can use report name in derived values - only when we have report but no other params - const canUseDerivedValue = - report && policy === undefined && parentReportActionParam === undefined && personalDetails === undefined && invoiceReceiverPolicy === undefined && isReportArchived === undefined; - const attributes = reportAttributes ?? reportAttributesDerivedValue; - const derivedNameExists = report && !!attributes?.[report.reportID]?.reportName; - if (canUseDerivedValue && derivedNameExists) { - return attributes[report.reportID].reportName; - } - - let formattedName: string | undefined; - let parentReportAction: OnyxEntry; - const parentReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID}`]; - if (parentReportActionParam) { - parentReportAction = parentReportActionParam; - } else { - parentReportAction = isThread(report) ? allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report?.parentReportID}`]?.[report.parentReportActionID] : undefined; - } - const parentReportActionMessage = getReportActionMessageReportUtils(parentReportAction); - const isArchivedNonExpense = isArchivedNonExpenseReport(report, isReportArchived); - - const reportPolicy = policy ?? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]; - - const parentReportActionBasedName = computeReportNameBasedOnReportAction( - translateLocal, - formatPhoneNumberPhoneUtils, - parentReportAction, - report, - reportPolicy, - parentReport, - personalDetails as PersonalDetailsList, - attributes, - ); - - if (parentReportActionBasedName) { - return parentReportActionBasedName; - } - - if (isActionOfType(parentReportAction, CONST.REPORT.ACTIONS.TYPE.CREATED_REPORT_FOR_UNAPPROVED_TRANSACTIONS)) { - const {originalID} = getOriginalMessage(parentReportAction) ?? {}; - const originalReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${originalID}`]; - const reportName = getReportName({report: originalReport}); - return getCreatedReportForUnapprovedTransactionsMessage(originalID, reportName, !!parentReportAction.isOriginalReportDeleted, translateLocal); - } - - if (isTaskReport(report)) { - const taskName = report?.reportName ?? ''; - return Parser.isHTML(taskName) ? Parser.htmlToText(taskName).trim() : taskName.trim(); - } - - if (isChatThread(report)) { - if (!isEmptyObject(parentReportAction) && isTransactionThread(parentReportAction)) { - formattedName = getTransactionReportName({translate: translateLocal, reportAction: parentReportAction, transactions, reports}); - - if (isArchivedNonExpense) { - formattedName = generateArchivedReportName(formattedName); - } - return formatReportLastMessageText(formattedName); - } - - if (parentReportActionMessage?.isDeletedParentAction) { - return translateLocal('parentReportAction.deletedMessage'); - } - - const isAttachment = isReportActionAttachment(!isEmptyObject(parentReportAction) ? parentReportAction : undefined); - const reportActionMessage = parseReportActionHtmlToText(parentReportAction, report?.parentReportID, conciergeReportID, report?.reportID).replaceAll(/(\n+|\r\n|\n|\r)/gm, ' '); - if (isAttachment && reportActionMessage) { - return `[${translateLocal('common.attachment')}]`; - } - if ( - parentReportActionMessage?.moderationDecision?.decision === CONST.MODERATION.MODERATOR_DECISION_PENDING_HIDE || - parentReportActionMessage?.moderationDecision?.decision === CONST.MODERATION.MODERATOR_DECISION_HIDDEN || - parentReportActionMessage?.moderationDecision?.decision === CONST.MODERATION.MODERATOR_DECISION_PENDING_REMOVE - ) { - return translateLocal('parentReportAction.hiddenMessage'); - } - if (isAdminRoom(report) || isUserCreatedPolicyRoom(report)) { - return getAdminRoomInvitedParticipants(translateLocal, parentReportAction, reportActionMessage); - } - - if (reportActionMessage && isArchivedNonExpense) { - return generateArchivedReportName(reportActionMessage); - } - if (!isEmptyObject(parentReportAction) && isModifiedExpenseAction(parentReportAction)) { - const movedFromReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${getMovedReportID(parentReportAction, CONST.REPORT.MOVE_TYPE.FROM)}`]; - const movedToReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${getMovedReportID(parentReportAction, CONST.REPORT.MOVE_TYPE.TO)}`]; - const modifiedMessageWithHTML = getForReportAction({ - translate: translateLocal, - reportAction: parentReportAction, - policy, - movedFromReport, - movedToReport, - // Temporarily retrieves current user email from getCurrentUserEmail, since getReportName is deprecated and no longer requires this parameter to be passed explicitly. - currentUserLogin: getCurrentUserEmail() ?? '', - }); - // Strip HTML tags for plain text display in report last message - const modifiedMessage = Parser.htmlToText(modifiedMessageWithHTML); - return formatReportLastMessageText(modifiedMessage); - } - if (isTripRoom(report) && report?.reportName !== CONST.REPORT.DEFAULT_REPORT_NAME) { - return report?.reportName ?? ''; - } - return reportActionMessage; - } - - if (isClosedExpenseReportWithNoExpenses(report, transactions)) { - return translateLocal('parentReportAction.deletedReport'); - } - - if (isGroupChat(report)) { - return getGroupChatName(formatPhoneNumberPhoneUtils, undefined, true, report) ?? ''; - } - - if (isChatRoom(report)) { - formattedName = report?.reportName; - } - - if (isPolicyExpenseChat(report)) { - formattedName = getPolicyExpenseChatName({report, personalDetailsList: personalDetails}); - } - - if (isMoneyRequestReport(report)) { - formattedName = getMoneyRequestReportName({report, policy}); - } - - if (isInvoiceReport(report)) { - formattedName = getInvoiceReportName(report, policy, invoiceReceiverPolicy); - } - - if (isInvoiceRoom(report)) { - const invoiceReceiverPolicyID = report?.invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.BUSINESS ? report?.invoiceReceiver?.policyID : undefined; - formattedName = getInvoicesChatName({ - report, - // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 - receiverPolicy: invoiceReceiverPolicy ?? getPolicy(invoiceReceiverPolicyID), - personalDetails, - policy, - currentUserAccountID: deprecatedCurrentUserAccountID, - }); - } - - if (isSelfDM(report)) { - formattedName = getDisplayNameForParticipant({ - accountID: deprecatedCurrentUserAccountID, - shouldAddCurrentUserPostfix: true, - personalDetailsData: personalDetails, - formatPhoneNumber: formatPhoneNumberPhoneUtils, - }); - } - - if (isConciergeChatReport(report, conciergeReportID)) { - formattedName = CONST.CONCIERGE_DISPLAY_NAME; - } - - if (formattedName) { - return formatReportLastMessageText(isArchivedNonExpense ? generateArchivedReportName(formattedName) : formattedName); - } - - // Not a room or PolicyExpenseChat, generate title from first 5 other participants - formattedName = buildReportNameFromParticipantNames({report, personalDetailsList: personalDetails, currentUserAccountID: deprecatedCurrentUserAccountID}); - - const finalName = formattedName || (report?.reportName ?? ''); - - return isArchivedNonExpense ? generateArchivedReportName(finalName) : finalName; -} - -/** - * @deprecated Moved to src/libs/ReportNameUtils.ts. - * Use ReportNameUtils.computeReportName(...) in search contexts instead. - * @param props - */ -function getSearchReportName(props: GetReportNameParams): string { - const {report, policy} = props; - if (isChatThread(report) && policy?.name) { - // Traverse up the parent chain to find the first expense report - // If found, return the expense report name instead of workspace name - let currentParent = getParentReport(report); - const visitedReportIDs = new Set(); - - while (currentParent) { - if (!currentParent.reportID) { - break; - } - if (visitedReportIDs.has(currentParent.reportID)) { - break; - } - visitedReportIDs.add(currentParent.reportID); - - if (isExpenseReport(currentParent)) { - return getReportName({ - report: currentParent, - policy, - parentReportActionParam: props.parentReportActionParam, - personalDetails: props.personalDetails, - invoiceReceiverPolicy: props.invoiceReceiverPolicy, - transactions: props.transactions, - isReportArchived: props.isReportArchived, - reports: props.reports, - }); - } - - // Continue traversing up the parent chain - currentParent = getParentReport(currentParent); - } - - return policy.name; - } - // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - return getReportName({ - report, - policy, - parentReportActionParam: props.parentReportActionParam, - personalDetails: props.personalDetails, - invoiceReceiverPolicy: props.invoiceReceiverPolicy, - transactions: props.transactions, - isReportArchived: props.isReportArchived, - reports: props.reports, - }); -} - /** * Get the payee name given a report. */ @@ -13374,8 +13147,6 @@ export { getReportFieldKey, getReportFieldMaps, getReportIDFromLink, - // This will be fixed as follow up https://github.com/Expensify/App/pull/75357 - getSearchReportName, getReportTransactions, getReportNotificationPreference, getReportOfflinePendingActionAndErrors, diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index f8f3afe98b52..638137d94e2c 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -143,7 +143,6 @@ import { getPolicyName, getReportOrDraftReport, getReportStatusTranslation, - getSearchReportName, hasHeldExpenses, hasInvoiceReports, hasOnlyNonReimbursableTransactions, @@ -2612,17 +2611,13 @@ function createAndOpenSearchTransactionThread({ * * Do not use directly, use only via `getSections()` facade. */ -function getReportActionsSections(data: OnyxTypes.SearchResults['data'], visibleReportActionsData?: OnyxTypes.VisibleReportActionsDerivedValue): [ReportActionListItemType[], number] { +function getReportActionsSections( + data: OnyxTypes.SearchResults['data'], + visibleReportActionsData?: OnyxTypes.VisibleReportActionsDerivedValue, + reportAttributesDerivedValue?: OnyxTypes.ReportAttributesDerivedValue['reports'], +): [ReportActionListItemType[], number] { const reportActionItems: ReportActionListItemType[] = []; - const transactions = Object.keys(data) - .filter(isTransactionEntry) - .map((key) => data[key]); - - const reports = Object.keys(data) - .filter(isReportEntry) - .map((key) => data[key]); - let n = 0; for (const key in data) { @@ -2640,12 +2635,9 @@ function getReportActionsSections(data: OnyxTypes.SearchResults['data'], visible data[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`] ?? data[`${ONYXKEYS.COLLECTION.REPORT}${reportAction.reportID}`] ?? {}; - const policy = data[`${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`] ?? {}; const originalMessage = isMoneyRequestAction(reportAction) ? getOriginalMessage(reportAction) : undefined; const isSendingMoney = isMoneyRequestAction(reportAction) && originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.PAY && originalMessage?.IOUDetails; const isReportArchived = isArchivedReport(data[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`]); - const invoiceReceiverPolicy: OnyxTypes.Policy | undefined = - report?.invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.BUSINESS ? data[`${ONYXKEYS.COLLECTION.POLICY}${report.invoiceReceiver.policyID}`] : undefined; if ( !reportID || !isReportActionVisible(reportAction, reportID, canUserPerformWriteAction(report, isReportArchived), visibleReportActionsData) || @@ -2663,7 +2655,7 @@ function getReportActionsSections(data: OnyxTypes.SearchResults['data'], visible ...reportAction, reportID, from, - reportName: getSearchReportName({report, policy, personalDetails: data.personalDetailsList, transactions, invoiceReceiverPolicy, reports, isReportArchived}), + reportName: getReportName(report, reportAttributesDerivedValue), formattedFrom: from?.displayName ?? from?.login ?? '', date: reportAction.created, keyForList: reportAction.reportActionID, @@ -3545,7 +3537,7 @@ function getSections({ optimisticTransactionID, }: GetSectionsParams): GetSectionsResult { if (type === CONST.SEARCH.DATA_TYPES.CHAT) { - return [...getReportActionsSections(data, visibleReportActionsData), false]; + return [...getReportActionsSections(data, visibleReportActionsData, reportAttributesDerivedValue), false]; } if (type === CONST.SEARCH.DATA_TYPES.TASK) { return [...getTaskSections(data, formatPhoneNumber, conciergeReportID, archivedReportsIDList, reportAttributesDerivedValue), false]; From 65b60ef94997d48d984f23f18cdec451e4187e9f Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 2 Jun 2026 09:54:41 +0200 Subject: [PATCH 2/8] clean unused funcs and params --- src/libs/ReportUtils.ts | 87 ----------------------------------------- 1 file changed, 87 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 1b31087186f1..ded59f78b06f 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -67,7 +67,6 @@ import type {OriginalMessageExportedToIntegration} from '@src/types/onyx/OldDotA import type Onboarding from '@src/types/onyx/Onboarding'; import type {ErrorFields, Errors, Icon, PendingAction} from '@src/types/onyx/OnyxCommon'; import type { - OriginalMessageChangeLog, OriginalMessageChangePolicy, OriginalMessageExportIntegration, OriginalMessageModifiedExpense, @@ -118,8 +117,6 @@ import {formatPhoneNumber as formatPhoneNumberPhoneUtils} from './LocalePhoneNum import {translateLocal} from './Localize'; import Log from './Log'; import {isEmailPublicDomain} from './LoginUtils'; -// eslint-disable-next-line import/no-cycle -import {getForReportAction, getMovedReportID} from './ModifiedExpenseMessage'; import createDynamicRoute from './Navigation/helpers/dynamicRoutesUtils/createDynamicRoute'; import getReportURLForCurrentContext from './Navigation/helpers/getReportURLForCurrentContext'; import getStateFromPath from './Navigation/helpers/getStateFromPath'; @@ -128,7 +125,6 @@ import isSearchTopmostFullScreenRoute from './Navigation/helpers/isSearchTopmost import {linkingConfig} from './Navigation/linkingConfig'; import Navigation, {navigationRef} from './Navigation/Navigation'; import type {MoneyRequestNavigatorParamList, ReportsSplitNavigatorParamList} from './Navigation/types'; -import {getCurrentUserEmail} from './Network/NetworkStore'; import {getDBTimeWithSkew} from './NetworkState'; import {rand64} from './NumberUtils'; import Parser from './Parser'; @@ -138,10 +134,8 @@ import Permissions from './Permissions'; import { getAccountIDsByLogins, getDisplayNameOrDefault, - getEffectiveDisplayName, getLoginsByAccountIDs, getPersonalDetailByEmail, - getPersonalDetailsByIDs, getShortMentionIfFound, } from './PersonalDetailsUtils'; import { @@ -176,7 +170,6 @@ import { formatLastMessageText, getActionableJoinRequestPendingReportAction, getAllReportActions, - getCreatedReportForUnapprovedTransactionsMessage, getIOUActionForTransactionID, getIOUReportIDFromReportActionPreview, getLastVisibleAction, @@ -209,20 +202,16 @@ import { isExportIntegrationAction, isForwardedAction, isIntegrationMessageAction, - isModifiedExpenseAction, isMoneyRequestAction, isMovedAction, isOlderReportAction, isPendingRemove, - isPolicyChangeLogAction, isReimbursementQueuedAction, isReopenedAction, - isReportActionAttachment, isReportActionVisible, isReportPreviewAction, isRetractedAction, isReversedTransaction, - isRoomChangeLogAction, isSentMoneyReportAction, isSplitBillAction as isSplitBillReportAction, isSubmittedAction, @@ -238,16 +227,10 @@ import { // ReportNameUtils imports helper functions from ReportUtils, and ReportUtils imports name generation functions from ReportNameUtils. // eslint-disable-next-line import/no-cycle import { - buildReportNameFromParticipantNames, computeReportName, - computeReportNameBasedOnReportAction, - generateArchivedReportName, getGroupChatName, getInvoicePayerName, getInvoiceReportName, - getInvoicesChatName, - getMoneyRequestReportName, - getPolicyExpenseChatName, getReportName as getReportNameFromNameUtils, } from './ReportNameUtils'; import type {ArchivedReportsIDSet} from './SearchUIUtils'; @@ -969,22 +952,6 @@ type GetPolicyNameParams = { reports?: Report[]; }; -type GetReportNameParams = { - report: OnyxEntry; - policy?: OnyxEntry; - parentReportActionParam?: OnyxInputOrEntry; - personalDetails?: Partial; - invoiceReceiverPolicy?: OnyxEntry; - /** Report attributes used to return a precomputed report name */ - reportAttributes?: ReportAttributesDerivedValue['reports']; - transactions?: Transaction[]; - reports?: Report[]; - isReportArchived?: boolean; - // TODO: Make this required when https://github.com/Expensify/App/issues/66411 is done - /** Used to identify the Concierge chat so its name can be set to the Concierge display name */ - conciergeReportID?: string; -}; - type GetReportStatusParams = { stateNum?: number; statusNum?: number; @@ -5688,60 +5655,6 @@ function getModifiedExpenseOriginalMessage( return originalMessage; } -/** - * Check if original message is an object and can be used as a ChangeLog type - * @param originalMessage - */ -function isChangeLogObject(originalMessage?: OriginalMessageChangeLog): OriginalMessageChangeLog | undefined { - if (originalMessage && typeof originalMessage === 'object') { - return originalMessage; - } - return undefined; -} - -/** - * Build invited usernames for admin chat threads - * @param parentReportAction - * @param parentReportActionMessage - */ -function getAdminRoomInvitedParticipants(translate: LocalizedTranslate, parentReportAction: OnyxEntry, parentReportActionMessage: string) { - if (isEmptyObject(parentReportAction)) { - return parentReportActionMessage || translate('parentReportAction.deletedMessage'); - } - if (!getOriginalMessage(parentReportAction)) { - return parentReportActionMessage || translate('parentReportAction.deletedMessage'); - } - if (!isPolicyChangeLogAction(parentReportAction) && !isRoomChangeLogAction(parentReportAction)) { - return parentReportActionMessage || translate('parentReportAction.deletedMessage'); - } - - const originalMessage = isChangeLogObject(getOriginalMessage(parentReportAction) as OriginalMessageChangeLog); - const personalDetails = getPersonalDetailsByIDs({accountIDs: originalMessage?.targetAccountIDs ?? [], currentUserAccountID: 0}); - - const participants = personalDetails.map((personalDetail) => { - const name = getEffectiveDisplayName(formatPhoneNumberPhoneUtils, personalDetail); - if (name && name?.length > 0) { - return name; - } - return translate('common.hidden'); - }); - const users = participants.length > 1 ? participants.join(` ${translate('common.and')} `) : participants.at(0); - if (!users) { - return parentReportActionMessage; - } - const actionType = parentReportAction.actionName; - const isInviteAction = actionType === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM || actionType === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM; - - const verbKey = isInviteAction ? 'workspace.invite.invited' : 'workspace.invite.removed'; - const prepositionKey = isInviteAction ? 'workspace.invite.to' : 'workspace.invite.from'; - const verb = translate(verbKey); - const preposition = translate(prepositionKey); - - const roomName = originalMessage?.roomName ?? ''; - - return roomName ? `${verb} ${users} ${preposition} ${roomName}` : `${verb} ${users}`; -} - /** * Parse html of reportAction into text */ From 022aa48427d5d4071039156a3f318e3f492cb922 Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 2 Jun 2026 10:20:27 +0200 Subject: [PATCH 3/8] remove usage of computeReportName from ReportUtils.ts. Refactor of getReportPreviewMessage --- src/libs/OptionsListUtils/index.ts | 7 +--- src/libs/ReportUtils.ts | 37 ++++++------------- src/libs/actions/Policy/Policy.ts | 2 +- src/libs/actions/Report/index.ts | 3 +- .../report/ContextMenu/ContextMenuActions.tsx | 3 +- tests/perf-test/ReportUtils.perf-test.ts | 2 +- tests/unit/OptionsListUtilsTest.tsx | 2 +- tests/unit/ReportUtilsTest.ts | 25 +++++++------ tests/unit/SidebarUtilsTest.ts | 4 +- 9 files changed, 34 insertions(+), 51 deletions(-) diff --git a/src/libs/OptionsListUtils/index.ts b/src/libs/OptionsListUtils/index.ts index 38c5b708669d..d48a9ad28b58 100644 --- a/src/libs/OptionsListUtils/index.ts +++ b/src/libs/OptionsListUtils/index.ts @@ -657,7 +657,6 @@ function getLastMessageTextForReport({ reportAttributesDerived, policyTags, currentUserLogin, - conciergeReportID, // eslint-disable-next-line @typescript-eslint/no-deprecated sortedActions = deprecatedAllSortedReportActions, }: { @@ -739,7 +738,7 @@ function getLastMessageTextForReport({ } } } else if (isMoneyRequestAction(lastReportAction)) { - const properSchemaForMoneyRequestMessage = getReportPreviewMessage(report, conciergeReportID, lastReportAction, true, false, null, true); + const properSchemaForMoneyRequestMessage = getReportPreviewMessage(report, lastReportAction, true, false, null, true); lastMessageTextFromReport = formatReportLastMessageText(Parser.htmlToText(properSchemaForMoneyRequestMessage)); } else if (isReportPreviewAction(lastReportAction)) { const iouReport = getReportOrDraftReport(getIOUReportIDFromReportActionPreview(lastReportAction)); @@ -758,7 +757,6 @@ function getLastMessageTextForReport({ } else { const reportPreviewMessage = getReportPreviewMessage( !isEmptyObject(iouReport) ? iouReport : null, - conciergeReportID, lastIOUMoneyReportAction ?? lastReportAction, true, reportUtilsIsChatReport(report), @@ -1012,8 +1010,7 @@ function getLastMessageTextForReport({ lastMessageTextFromReport = lastVisibleMessage?.lastMessageText; } else if (!isCreatedAction(lastReportAction)) { lastMessageTextFromReport = - formatReportLastMessageText(Parser.htmlToText(getReportPreviewMessage(report, conciergeReportID, lastReportAction, true, false, null, true))) || - lastVisibleMessage?.lastMessageText; + formatReportLastMessageText(Parser.htmlToText(getReportPreviewMessage(report, lastReportAction, true, false, null, true))) || lastVisibleMessage?.lastMessageText; } } else if (report?.transactionCount === 0) { lastMessageTextFromReport = translate('report.noActivityYet'); diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index ded59f78b06f..df8df3dc2967 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -131,13 +131,7 @@ import Parser from './Parser'; import {getParsedMessageWithShortMentions} from './ParsingUtils'; import {getBankAccountLastFourDigits} from './PaymentUtils'; import Permissions from './Permissions'; -import { - getAccountIDsByLogins, - getDisplayNameOrDefault, - getLoginsByAccountIDs, - getPersonalDetailByEmail, - getShortMentionIfFound, -} from './PersonalDetailsUtils'; +import {getAccountIDsByLogins, getDisplayNameOrDefault, getLoginsByAccountIDs, getPersonalDetailByEmail, getShortMentionIfFound} from './PersonalDetailsUtils'; import { canSendInvoiceFromWorkspace, getActivePolicies, @@ -226,13 +220,7 @@ import { // The functions imported here are pure utility functions that don't create initialization-time dependencies. // ReportNameUtils imports helper functions from ReportUtils, and ReportUtils imports name generation functions from ReportNameUtils. // eslint-disable-next-line import/no-cycle -import { - computeReportName, - getGroupChatName, - getInvoicePayerName, - getInvoiceReportName, - getReportName as getReportNameFromNameUtils, -} from './ReportNameUtils'; +import {getGroupChatName, getInvoicePayerName, getInvoiceReportName, getReportName} from './ReportNameUtils'; import type {ArchivedReportsIDSet} from './SearchUIUtils'; import {shouldRestrictUserBillableActions} from './SubscriptionUtils'; import {isTaskCompleted} from './TaskUtils'; @@ -5341,7 +5329,6 @@ function getTransactionReportName({ */ function getReportPreviewMessage( reportOrID: OnyxInputOrEntry | string, - conciergeReportID: string | undefined, iouReportAction: OnyxInputOrEntry = null, shouldConsiderScanningReceiptOrPendingRoute = false, isPreviewMessageForParentChatReport = false, @@ -5349,12 +5336,13 @@ function getReportPreviewMessage( isForListPreview = false, originalReportAction: OnyxInputOrEntry = iouReportAction, isCopyAction = false, + reportAttributes?: ReportAttributesDerivedValue['reports'], ): string { const report = typeof reportOrID === 'string' ? getReport(reportOrID, deprecatedAllReports) : reportOrID; const reportActionMessage = getReportActionHtml(iouReportAction); if (isCopyAction) { if (report) { - return computeReportName({report, currentUserLogin: '', conciergeReportID}) || (originalReportAction?.childReportName ?? ''); + return getReportName(report, reportAttributes ?? reportAttributesDerivedValue) || (originalReportAction?.childReportName ?? ''); } return originalReportAction?.childReportName ?? ''; } @@ -5680,7 +5668,7 @@ function parseReportActionHtmlToText(reportAction: OnyxEntry, repo const reportIDToName: Record = {}; for (const match of matches) { if (match[1] !== childReportID) { - reportIDToName[match[1]] = getReportNameFromNameUtils(getReportOrDraftReport(match[1]), reportAttributesDerivedValue) ?? ''; + reportIDToName[match[1]] = getReportName(getReportOrDraftReport(match[1]), reportAttributesDerivedValue) ?? ''; } } @@ -5848,7 +5836,7 @@ function getParentNavigationSubtitle( } return { - reportName: getReportNameFromNameUtils(parentReport, reportAttributes ?? reportAttributesDerivedValue), + reportName: getReportName(parentReport, reportAttributes ?? reportAttributesDerivedValue), workspaceName: getPolicyName({report: parentReport, policy, returnEmptyIfNotFound: true}), }; } @@ -6630,7 +6618,7 @@ function getMovedTransactionMessage(translate: LocalizedTranslate, action: Repor const report = fromReport ?? toReport; - const reportName = Parser.htmlToText(getReportNameFromNameUtils(report, reportAttributes) ?? report?.reportName ?? ''); + const reportName = Parser.htmlToText(getReportName(report, reportAttributes) ?? report?.reportName ?? ''); const reportUrl = getReportURLForCurrentContext(report?.reportID); if (typeof fromReportID === 'undefined') { return reportName ? translate('iou.movedTransactionTo', reportUrl, reportName) : translate('iou.movedTransactionToAnotherReport'); @@ -6644,7 +6632,7 @@ function getUnreportedTransactionMessage(translate: LocalizedTranslate, action: const fromReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${fromReportID}`]; - const reportName = Parser.htmlToText(getReportNameFromNameUtils(fromReport, reportAttributes) ?? fromReport?.reportName ?? ''); + const reportName = Parser.htmlToText(getReportName(fromReport, reportAttributes) ?? fromReport?.reportName ?? ''); let reportUrl = getReportURLForCurrentContext(fromReportID); @@ -7218,7 +7206,7 @@ function buildOptimisticReportPreview( delegateAccountIDParam: number | undefined = undefined, ): ReportAction { const hasReceipt = hasReceiptTransactionUtils(transaction); - const message = getReportPreviewMessage(iouReport, conciergeReportID); + const message = getReportPreviewMessage(iouReport); const created = DateUtils.getDBTime(); const reportActorAccountID = (isInvoiceReport(iouReport) || isExpenseReport(iouReport) ? iouReport?.ownerAccountID : iouReport?.managerID) ?? -1; // Falls back to module-level delegateEmail (from Onyx.connect) for callers not yet migrated; will be removed in https://github.com/Expensify/App/issues/66425 @@ -7409,8 +7397,7 @@ function updateReportPreview( } } - // TODO: We'll pass the conciergeReportID in the next PR. Ref: https://github.com/Expensify/App/issues/66411 - const message = getReportPreviewMessage(iouReport, undefined, reportPreviewAction); + const message = getReportPreviewMessage(iouReport, reportPreviewAction); const originalMessage = getOriginalMessage(reportPreviewAction); return { ...reportPreviewAction, @@ -12390,10 +12377,10 @@ function getChatListItemReportName(action: ReportAction & {reportName?: string}, } if (report?.reportID) { - return getReportNameFromNameUtils(getReport(report?.reportID, deprecatedAllReports), reportAttributesDerivedValue); + return getReportName(getReport(report?.reportID, deprecatedAllReports), reportAttributesDerivedValue); } - return getReportNameFromNameUtils(report, reportAttributesDerivedValue); + return getReportName(report, reportAttributesDerivedValue); } /** diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 911096b2adb1..f6b5e29b2b55 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -4541,7 +4541,7 @@ function createWorkspaceFromIOUPayment( message: [ { type: CONST.REPORT.MESSAGE.TYPE.TEXT, - text: ReportUtils.getReportPreviewMessage(expenseReport, conciergeReportID, null, false, false, newWorkspace), + text: ReportUtils.getReportPreviewMessage(expenseReport, null, false, false, newWorkspace), }, ], created: DateUtils.getDBTime(), diff --git a/src/libs/actions/Report/index.ts b/src/libs/actions/Report/index.ts index 297fee12b394..8010be07d4df 100644 --- a/src/libs/actions/Report/index.ts +++ b/src/libs/actions/Report/index.ts @@ -3968,8 +3968,7 @@ function buildNewReportOptimisticData( pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, }; - // TODO: We'll pass the conciergeReportID in the next PR. Ref: https://github.com/Expensify/App/issues/66411 - const message = getReportPreviewMessage(optimisticReportData, undefined); + const message = getReportPreviewMessage(optimisticReportData); const createReportActionMessage = [ { html: message, diff --git a/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx b/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx index 100aa94f2ede..c23a3bf19f00 100644 --- a/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx @@ -848,7 +848,6 @@ const ContextMenuActions: ContextMenuAction[] = [ harvestReportOriginalID, currentUserPersonalDetails, bankAccountList, - conciergeReportID, reportAttributes, originalReportOfUnapprovedTransaction, }, @@ -862,7 +861,7 @@ const ContextMenuActions: ContextMenuAction[] = [ const content = selection || messageHtml; if (isReportPreviewAction) { const iouReportID = getIOUReportIDFromReportActionPreview(reportAction); - const displayMessage = getReportPreviewMessage(iouReportID, conciergeReportID, reportAction, undefined, undefined, undefined, undefined, undefined, true); + const displayMessage = getReportPreviewMessage(iouReportID, reportAction, undefined, undefined, undefined, undefined, undefined, true, reportAttributes); Clipboard.setString(displayMessage); } else if (isTaskActionReportActionsUtils(reportAction)) { const {text, html} = getTaskReportActionMessage(translate, reportAction); diff --git a/tests/perf-test/ReportUtils.perf-test.ts b/tests/perf-test/ReportUtils.perf-test.ts index 435173b3e545..55fb12f03697 100644 --- a/tests/perf-test/ReportUtils.perf-test.ts +++ b/tests/perf-test/ReportUtils.perf-test.ts @@ -145,7 +145,7 @@ describe('ReportUtils', () => { const isPreviewMessageForParentChatReport = true; await waitForBatchedUpdates(); - await measureFunction(() => getReportPreviewMessage(report, undefined, reportAction, shouldConsiderReceiptBeingScanned, isPreviewMessageForParentChatReport, policy)); + await measureFunction(() => getReportPreviewMessage(report, reportAction, shouldConsiderReceiptBeingScanned, isPreviewMessageForParentChatReport, policy)); }); test('[ReportUtils] getReportName on 1k participants', async () => { diff --git a/tests/unit/OptionsListUtilsTest.tsx b/tests/unit/OptionsListUtilsTest.tsx index 8a2f8d55cc13..80b7b0ebf654 100644 --- a/tests/unit/OptionsListUtilsTest.tsx +++ b/tests/unit/OptionsListUtilsTest.tsx @@ -4071,7 +4071,7 @@ describe('OptionsListUtils', () => { [iouAction.reportActionID]: iouAction, }); await Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`, transaction); - const reportPreviewMessage = getReportPreviewMessage(iouReport, undefined, iouAction, true, false, null, true, reportPreviewAction); + const reportPreviewMessage = getReportPreviewMessage(iouReport, iouAction, true, false, null, true, reportPreviewAction); const formattedMessage = formatReportLastMessageText(Parser.htmlToText(reportPreviewMessage)); expect(formattedMessage).toBe('$1.00 for A A A'); }); diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index 8cf8f2cc0b29..3a6eb3f0e84a 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -182,6 +182,7 @@ import type { Report, ReportAction, ReportActions, + ReportAttributesDerivedValue, ReportMetadata, ReportNameValuePairs, Transaction, @@ -14381,7 +14382,7 @@ describe('ReportUtils', () => { }; // When we call getReportPreviewMessage - const result = getReportPreviewMessage(report, undefined, reportAction, false, false, undefined, false, reportAction); + const result = getReportPreviewMessage(report, reportAction, false, false, undefined, false, reportAction); // Then it should return the childReportName instead of "payer owes $0" expect(result).toBe('Expense Report 2025-01-15'); @@ -14401,7 +14402,7 @@ describe('ReportUtils', () => { }; // When we call getReportPreviewMessage - const result = getReportPreviewMessage(report, undefined, reportAction, false, false, undefined, false, reportAction); + const result = getReportPreviewMessage(report, reportAction, false, false, undefined, false, reportAction); // Then it should return the message from the report action (not the childReportName) expect(result).toBe('payer owes $100'); @@ -14417,28 +14418,28 @@ describe('ReportUtils', () => { }; // When we call getReportPreviewMessage with isCopyAction = true - const result = getReportPreviewMessage(report, undefined, reportAction, false, false, undefined, false, reportAction, true); + const result = getReportPreviewMessage(report, reportAction, false, false, undefined, false, reportAction, true); // Then it should return the childReportName instead of "payer owes $0" expect(result).toBe('Expense Report 2025-01-15'); }); - it('should pass conciergeReportID through to computeReportName when isCopyAction is true', async () => { + it('should use the report name from the reportAttributes param when isCopyAction is true', async () => { const report = LHNTestUtils.getFakeReport(); + report.reportName = 'Stale Report Name'; const reportAction: ReportAction = { ...LHNTestUtils.getFakeReportAction(), actionName: CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW, - childReportName: 'Expense Report', + childReportName: 'Child Report Name', childMoneyRequestCount: 0, }; + const reportAttributes = { + [report.reportID]: {reportName: 'Computed Report Name'}, + } as ReportAttributesDerivedValue['reports']; - // When called with conciergeReportID undefined, the function should not throw - const result1 = getReportPreviewMessage(report, undefined, reportAction, false, false, undefined, false, reportAction, true); - expect(typeof result1).toBe('string'); - - // When called with a specific conciergeReportID, the function should not throw - const result2 = getReportPreviewMessage(report, '12345', reportAction, false, false, undefined, false, reportAction, true); - expect(typeof result2).toBe('string'); + // When called with reportAttributes that provide a report name, it should be preferred over the report's own name + const result = getReportPreviewMessage(report, reportAction, false, false, undefined, false, reportAction, true, reportAttributes); + expect(result).toBe('Computed Report Name'); }); }); diff --git a/tests/unit/SidebarUtilsTest.ts b/tests/unit/SidebarUtilsTest.ts index 058c41917496..c1af8d360c4f 100644 --- a/tests/unit/SidebarUtilsTest.ts +++ b/tests/unit/SidebarUtilsTest.ts @@ -3235,7 +3235,7 @@ describe('SidebarUtils', () => { currentUserLogin: CURRENT_USER_LOGIN, }); - const reportPreviewMessage = getReportPreviewMessage(iouReport, undefined, iouAction, true, true, null, true, lastReportPreviewAction); + const reportPreviewMessage = getReportPreviewMessage(iouReport, iouAction, true, true, null, true, lastReportPreviewAction); expect(result?.alternateText).toBe(`${getLastActorDisplayName({accountID: managerID}, managerID)}: ${reportPreviewMessage}`); }); @@ -3337,7 +3337,7 @@ describe('SidebarUtils', () => { currentUserLogin: CURRENT_USER_LOGIN, }); - const reportPreviewMessage = getReportPreviewMessage(iouReport, undefined, iouAction, true, true, null, true, lastReportPreviewAction); + const reportPreviewMessage = getReportPreviewMessage(iouReport, iouAction, true, true, null, true, lastReportPreviewAction); expect(result?.alternateText).toBe(reportPreviewMessage); }); }); From c67f290c3f5436e9dd60b8fd18417053e3fc5341 Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 2 Jun 2026 12:38:45 +0200 Subject: [PATCH 4/8] fix knip CI error --- src/libs/ReportActionsUtils.ts | 6 ------ src/libs/ReportNameUtils.ts | 2 -- 2 files changed, 8 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 4c0c4f901228..439ec0d4d341 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -698,10 +698,6 @@ function isRejectedAction(reportAction: OnyxInputOrEntry): boolean return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.REJECTED) || isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.REJECTED_TO_SUBMITTER); } -function isRoomChangeLogAction(reportAction: OnyxEntry): reportAction is ReportAction> { - return reportAction?.actionName ? ROOM_CHANGE_LOG_ARRAY.has(reportAction.actionName) : false; -} - function isInviteOrRemovedAction( reportAction: OnyxInputOrEntry, ): reportAction is ReportAction> { @@ -4660,7 +4656,6 @@ export { isPayAction, isPendingRemove, getModerationFlagState, - isPolicyChangeLogAction, isReimbursementDeQueuedOrCanceledAction, isReimbursementQueuedAction, isRenamedAction, @@ -4668,7 +4663,6 @@ export { isReportPreviewAction, isReversedTransaction, getMentionedAccountIDsFromAction, - isRoomChangeLogAction, isSentMoneyReportAction, isSplitBillAction, isTaskAction, diff --git a/src/libs/ReportNameUtils.ts b/src/libs/ReportNameUtils.ts index e533b73e3099..997bcd54b961 100644 --- a/src/libs/ReportNameUtils.ts +++ b/src/libs/ReportNameUtils.ts @@ -1054,7 +1054,6 @@ function getReportName(report?: Report, reportAttributesDerivedValue?: ReportAtt export { computeReportName, getReportName, - generateArchivedReportName, getInvoiceReportName, getMoneyRequestReportName, buildReportNameFromParticipantNames, @@ -1062,5 +1061,4 @@ export { getGroupChatName, getPolicyExpenseChatName, getInvoicesChatName, - computeReportNameBasedOnReportAction, }; From b338daaccaca02c6f5ae59d4afa417f4d942bbcd Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 2 Jun 2026 12:54:35 +0200 Subject: [PATCH 5/8] fix knip CI error --- src/libs/ReportActionsUtils.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 439ec0d4d341..656853378d40 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -174,8 +174,6 @@ const QBO_EXPENSES_URL = 'https://qbo.intuit.com/app/expenses'; const POLICY_CHANGE_LOG_ARRAY = new Set(Object.values(CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG)); -const ROOM_CHANGE_LOG_ARRAY = new Set(Object.values(CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG)); - const MEMBER_CHANGE_ARRAY = new Set([ CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM, CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.REMOVE_FROM_ROOM, From 9f54969e23f8e91c23716c1951f59465cccd3f9f Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 9 Jun 2026 16:18:45 +0200 Subject: [PATCH 6/8] Avoid unsafe type assertion in reportAttributes test --- tests/unit/ReportUtilsTest.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index c234e6c04ea1..9f5482c6b948 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -14404,9 +14404,9 @@ describe('ReportUtils', () => { childReportName: 'Child Report Name', childMoneyRequestCount: 0, }; - const reportAttributes = { + const reportAttributes: ReportAttributesDerivedValue['reports'] = { [report.reportID]: {reportName: 'Computed Report Name'}, - } as ReportAttributesDerivedValue['reports']; + }; // When called with reportAttributes that provide a report name, it should be preferred over the report's own name const result = getReportPreviewMessage({ From ca1ee37a65ab92bab3dc0815736e112edfb241e6 Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 9 Jun 2026 16:26:11 +0200 Subject: [PATCH 7/8] Provide full ReportAttributes in test fixture --- tests/unit/ReportUtilsTest.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index 9f5482c6b948..28d58c208b9b 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -14405,7 +14405,13 @@ describe('ReportUtils', () => { childMoneyRequestCount: 0, }; const reportAttributes: ReportAttributesDerivedValue['reports'] = { - [report.reportID]: {reportName: 'Computed Report Name'}, + [report.reportID]: { + reportName: 'Computed Report Name', + isEmpty: false, + brickRoadStatus: undefined, + requiresAttention: false, + reportErrors: {}, + }, }; // When called with reportAttributes that provide a report name, it should be preferred over the report's own name From 56e604b9c23fa714864c44cefc3885d06bee97a9 Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Tue, 9 Jun 2026 18:08:20 +0200 Subject: [PATCH 8/8] fix eslint --- src/libs/ModifiedExpenseMessage.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/ModifiedExpenseMessage.ts b/src/libs/ModifiedExpenseMessage.ts index e962a2b98673..61d0b20ebf17 100644 --- a/src/libs/ModifiedExpenseMessage.ts +++ b/src/libs/ModifiedExpenseMessage.ts @@ -22,7 +22,6 @@ import {getOriginalMessage, isModifiedExpenseAction} from './ReportActionsUtils' // ReportNameUtils imports helper functions from ReportUtils, and ReportUtils imports name generation functions from ReportNameUtils. // eslint-disable-next-line import/no-cycle import {buildReportNameFromParticipantNames, getPolicyExpenseChatName, getReportName} from './ReportNameUtils'; -// eslint-disable-next-line import/no-cycle import {getPolicyName, getRootParentReport, isPolicyExpenseChat, isSelfDM} from './ReportUtils'; import {getFormattedAttendees, getTagArrayFromName} from './TransactionUtils'; import {isInvalidMerchantValue} from './ValidationUtils';