Repository navigation
fix: paid via workspace rules message does not show Concierge as actor - #78349
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@dominictb Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| @@ -742,20 +815,21 @@ function canActionsBeGrouped(currentAction?: ReportAction, adjacentAction?: Repo | |||
| return false; | |||
There was a problem hiding this comment.
❌ PERF-2 (docs)
The getReportActionActorAccountID function is being called before multiple early return checks in canActionsBeGrouped. This function performs expensive operations including:
- Switch statement evaluation
- Calling
getOriginalMessage(reportAction) - Calling
isPolicyExpenseChat(report)for REPORT_PREVIEW actions - Calling
isHarvestCreatedExpenseReport(...)for CREATED actions - Accessing the
allReportNameValuePaircollection
These calls happen before simple property checks (lines 722-743) that could return early:
- Time comparison check (line 722)
actionNameproperty checks (lines 726, 731)delegateAccountIDproperty check (line 736)isReportPreviewActionchecks (line 741)
Suggested fix: Move the getReportActionActorAccountID calls to after all early return checks, or make them conditional:
if (isSubmittedAction(currentAction) || isSubmittedAndClosedAction(currentAction)) {
const currentActionAdminAccountID = currentAction.adminAccountID;
const adjacentActionActorAccountID = getReportActionActorAccountID(adjacentAction, undefined, undefined);
return typeof currentActionAdminAccountID === 'number'
? currentActionAdminAccountID === adjacentActionActorAccountID
: (getReportActionActorAccountID(currentAction, undefined, undefined) === adjacentActionActorAccountID);
}
if (isSubmittedAction(adjacentAction) || isSubmittedAndClosedAction(adjacentAction)) {
const currentActionActorAccountID = getReportActionActorAccountID(currentAction, undefined, undefined);
return typeof adjacentAction.adminAccountID === 'number'
? currentActionActorAccountID === adjacentAction.adminAccountID
: currentActionActorAccountID === getReportActionActorAccountID(adjacentAction, undefined, undefined);
}
return getReportActionActorAccountID(currentAction, undefined, undefined) === getReportActionActorAccountID(adjacentAction, undefined, undefined);There was a problem hiding this comment.
False statement. We'll reuse these IDs multiple times. Also there aren't any early returns here.
Reviewer Checklist
Screenshots/Videos |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.2.92-0 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.92-1 🚀
|
fix: paid via workspace rules message does not show Concierge as actor





Explanation of Change
fix: paid via workspace rules message does not show Concierge as actor
Fixed Issues
$ #77163
PROPOSAL: #77163 (comment)
Tests
Precondition:
paid via workspace rules messageshows Concierge as actorOffline tests
None
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari