From 4fa264c3adb6f33d9b3c4738c04af5a8eb450179 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Thu, 16 Jul 2026 13:47:56 +0000 Subject: [PATCH 1/3] Bump getUrlWithBackToParam seatbelt allowance to 106 PR #95637 added a new getUrlWithBackToParam usage in ROUTES.ts, exceeding the allowed seatbelt count of 105 and failing ESLint on main. Co-authored-by: Cursor --- config/eslint/eslint.seatbelt.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/eslint/eslint.seatbelt.tsv b/config/eslint/eslint.seatbelt.tsv index 57ef24cbee1d..36c7abb4212e 100644 --- a/config/eslint/eslint.seatbelt.tsv +++ b/config/eslint/eslint.seatbelt.tsv @@ -65,7 +65,7 @@ "../../src/Expensify.tsx" "react-hooks/set-state-in-effect" 1 "../../src/GlobalModals.tsx" "no-restricted-syntax" 2 "../../src/ONYXKEYS.ts" "no-restricted-syntax" 2 -"../../src/ROUTES.ts" "@typescript-eslint/no-deprecated/getUrlWithBackToParam" 105 +"../../src/ROUTES.ts" "@typescript-eslint/no-deprecated/getUrlWithBackToParam" 106 "../../src/ROUTES.ts" "@typescript-eslint/no-unsafe-type-assertion" 3 "../../src/TIMEZONES.ts" "@typescript-eslint/no-unsafe-type-assertion" 1 "../../src/components/AccountingConnectionConfirmationModal.tsx" "@typescript-eslint/no-deprecated/ConfirmModal" 1 From a2a72fb7721684689e29dc20f718583072778e9e Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Thu, 16 Jul 2026 13:55:20 +0000 Subject: [PATCH 2/3] Fix personalDetailsList reference in buildAddMembersToWorkspaceOnyxData Derive doesPersonalDetailExistByAccountID from newPersonalDetailsOnyxData after the personal details list param was removed, and update PolicyMemberTest to use the new function signature. Co-authored-by: Cursor --- src/libs/actions/Policy/Member.ts | 13 ++++++++++++- tests/actions/PolicyMemberTest.ts | 9 ++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/Policy/Member.ts b/src/libs/actions/Policy/Member.ts index 55d2880fe2f6..b5f121ac12da 100644 --- a/src/libs/actions/Policy/Member.ts +++ b/src/libs/actions/Policy/Member.ts @@ -836,8 +836,19 @@ function buildAddMembersToWorkspaceOnyxData( const announceRoomChat = optimisticAnnounceChat.announceChatData; const doesPersonalDetailExistByAccountID: Record = {}; + const newPersonalDetailAccountIDs = new Set(); + for (const update of newPersonalDetailsOnyxData.optimisticData ?? []) { + if (update.key !== ONYXKEYS.PERSONAL_DETAILS_LIST) { + continue; + } + + for (const accountID of Object.keys(update.value ?? {})) { + newPersonalDetailAccountIDs.add(Number(accountID)); + } + } + for (const accountID of accountIDs) { - doesPersonalDetailExistByAccountID[accountID] = !!personalDetailsList?.[accountID]; + doesPersonalDetailExistByAccountID[accountID] = !newPersonalDetailAccountIDs.has(accountID); } // create onyx data for policy expense chats for each new member diff --git a/tests/actions/PolicyMemberTest.ts b/tests/actions/PolicyMemberTest.ts index 3e6fe7352c28..b68a0198a646 100644 --- a/tests/actions/PolicyMemberTest.ts +++ b/tests/actions/PolicyMemberTest.ts @@ -1,4 +1,5 @@ import DateUtils from '@libs/DateUtils'; +import {getPersonalDetailsOnyxDataForOptimisticUsers} from '@libs/PersonalDetailsUtils'; import CONST from '@src/CONST'; import OnyxUpdateManager from '@src/libs/actions/OnyxUpdateManager'; @@ -404,7 +405,7 @@ describe('actions/PolicyMember', () => { await mockFetch?.resume?.(); }); - it('uses the explicit personal details list to decide new-member success-data participants instead of the deprecated copy', () => { + it('uses new personal details onyx data to decide new-member success-data participants instead of the deprecated copy', () => { const policyID = '1'; const policy = {...createRandomPolicy(Number(policyID))}; @@ -413,16 +414,14 @@ describe('actions/PolicyMember', () => { const absentMemberEmail = 'absent@example.com'; const absentMemberAccountID = 8765; - // The personal details list knows the "present" member but not the "absent" one. - const personalDetailsList = {[presentMemberAccountID]: {accountID: presentMemberAccountID, login: presentMemberEmail}}; + const newPersonalDetailsOnyxData = getPersonalDetailsOnyxDataForOptimisticUsers([absentMemberEmail], [absentMemberAccountID], TestHelper.formatPhoneNumber); const {membersChats} = Member.buildAddMembersToWorkspaceOnyxData( {[presentMemberEmail]: presentMemberAccountID, [absentMemberEmail]: absentMemberAccountID}, + newPersonalDetailsOnyxData, policy, [], CONST.POLICY.ROLE.USER, - TestHelper.formatPhoneNumber, - personalDetailsList, currentUser, undefined, ); From c7d0c5baa3eb32eaf014411896060620a6db815c Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Thu, 16 Jul 2026 14:07:15 +0000 Subject: [PATCH 3/3] Add missing PersonalDetailsList import in Policy.ts Fixes typecheck failure after personalDetailsList was added to SetWorkspaceApprovalModeAdditionalData without restoring the type import. Co-authored-by: Cursor --- src/libs/actions/Policy/Policy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index f0c873762257..534a770394b1 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -117,6 +117,7 @@ import type { InvitedEmailsToAccountIDs, LastPaymentMethod, LastPaymentMethodType, + PersonalDetailsList, Policy, PolicyCategories, PolicyCategory,