From a14985a36cd83d50ac52d8430630df64b9f61876 Mon Sep 17 00:00:00 2001 From: Justin Persaud Date: Wed, 4 Feb 2026 11:53:21 -0500 Subject: [PATCH 1/3] Revert Onyx changes --- src/libs/ReportUtils.ts | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 42cb2fb631e8a..e53387d0b4d03 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1015,7 +1015,7 @@ getEnvironment().then((env) => { const parsedReportActionMessageCache: Record = {}; let conciergeReportIDOnyxConnect: OnyxEntry; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.CONCIERGE_REPORT_ID, callback: (value) => { conciergeReportIDOnyxConnect = value; @@ -1023,7 +1023,7 @@ Onyx.connectWithoutView({ }); const defaultAvatarBuildingIconTestID = 'SvgDefaultAvatarBuilding Icon'; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.SESSION, callback: (value) => { // When signed out, val is undefined @@ -1041,7 +1041,7 @@ Onyx.connectWithoutView({ let allPersonalDetails: OnyxEntry; let allPersonalDetailLogins: string[]; let currentUserPersonalDetails: OnyxEntry; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.PERSONAL_DETAILS_LIST, callback: (value) => { if (currentUserAccountID) { @@ -1053,21 +1053,21 @@ Onyx.connectWithoutView({ }); let allReportsDraft: OnyxCollection; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_DRAFT, waitForCollectionCallback: true, callback: (value) => (allReportsDraft = value), }); let allPolicies: OnyxCollection; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY, waitForCollectionCallback: true, callback: (value) => (allPolicies = value), }); let allPolicyDrafts: OnyxCollection; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY_DRAFTS, waitForCollectionCallback: true, callback: (value) => (allPolicyDrafts = value), @@ -1075,7 +1075,7 @@ Onyx.connectWithoutView({ let allReports: OnyxCollection; let reportsByPolicyID: ReportByPolicyMap; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT, waitForCollectionCallback: true, callback: (value) => { @@ -1111,20 +1111,20 @@ Onyx.connectWithoutView({ }); let allBetas: OnyxEntry; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.BETAS, callback: (value) => (allBetas = value), }); let betaConfiguration: OnyxEntry = {}; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.BETA_CONFIGURATION, callback: (value) => (betaConfiguration = value ?? {}), }); let allTransactions: OnyxCollection = {}; let reportsTransactions: Record = {}; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.TRANSACTION, waitForCollectionCallback: true, callback: (value) => { @@ -1150,7 +1150,7 @@ Onyx.connectWithoutView({ }); let allReportActions: OnyxCollection; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, waitForCollectionCallback: true, callback: (actions) => { @@ -1163,7 +1163,7 @@ Onyx.connectWithoutView({ let allReportMetadata: OnyxCollection; const allReportMetadataKeyValue: Record = {}; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_METADATA, waitForCollectionCallback: true, callback: (value) => { @@ -1184,7 +1184,7 @@ Onyx.connectWithoutView({ }); let allReportNameValuePair: OnyxCollection; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS, waitForCollectionCallback: true, callback: (value) => { @@ -1196,7 +1196,7 @@ Onyx.connectWithoutView({ }); let allReportsViolations: OnyxCollection; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_VIOLATIONS, waitForCollectionCallback: true, callback: (value) => { @@ -1208,13 +1208,13 @@ Onyx.connectWithoutView({ }); let onboarding: OnyxEntry; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.NVP_ONBOARDING, callback: (value) => (onboarding = value), }); let delegateEmail = ''; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.ACCOUNT, callback: (value) => { delegateEmail = value?.delegatedAccess?.delegate ?? ''; @@ -1222,7 +1222,7 @@ Onyx.connectWithoutView({ }); let reportAttributesDerivedValue: ReportAttributesDerivedValue['reports']; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, callback: (value) => { reportAttributesDerivedValue = value?.reports ?? {}; @@ -1230,7 +1230,7 @@ Onyx.connectWithoutView({ }); let cachedSelfDMReportID: OnyxEntry; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.SELF_DM_REPORT_ID, callback: (value) => (cachedSelfDMReportID = value), }); @@ -1238,7 +1238,7 @@ Onyx.connectWithoutView({ let hiddenTranslation = ''; let unavailableTranslation = ''; -Onyx.connectWithoutView({ +Onyx.connect({ key: ONYXKEYS.ARE_TRANSLATIONS_LOADING, initWithStoredValues: false, callback: (value) => { @@ -2266,7 +2266,7 @@ function getMostRecentlyVisitedReport(reports: Array>, reportM /** * This function is used to find the last accessed report and we don't need to subscribe the data in the UI. - * So please use `Onyx.connectWithoutView()` to get the necessary data when we remove the `Onyx.connect()` + * So please use `Onyx.connect()` to get the necessary data when we remove the `Onyx.connect()` */ function findLastAccessedReport(ignoreDomainRooms: boolean, openOnAdminRoom = false, policyID?: string, excludeReportID?: string): OnyxEntry { // If it's the user's first time using New Expensify, then they could either have: From 89b98970507a10d4431b357b41b0ff9b05e515cd Mon Sep 17 00:00:00 2001 From: Justin Persaud Date: Wed, 4 Feb 2026 12:29:32 -0500 Subject: [PATCH 2/3] Increase ESLint max-warnings to account for Onyx.connect reverts Adding 19 to the max-warnings limit (399 -> 418) to accommodate the reverted Onyx.connectWithoutView() calls back to Onyx.connect(). Co-authored-by: Cursor --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc12cf6cd966a..c6ef21e66129f 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand", "perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure", "typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc", - "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=399 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=418 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto", "lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh", "check-lazy-loading": "ts-node scripts/checkLazyLoading.ts", "lint-watch": "npx eslint-watch --watch --changed", From 8cbc7b9073b292d3a44d136ef681ea2f31f20c8a Mon Sep 17 00:00:00 2001 From: Justin Persaud Date: Thu, 5 Feb 2026 15:29:26 -0500 Subject: [PATCH 3/3] Revert unintended comment change in findLastAccessedReport The JSDoc comment for findLastAccessedReport was mistakenly modified during a copy/paste. Reverting to original which correctly references Onyx.connectWithoutView(). Co-authored-by: Cursor --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index e53387d0b4d03..6b0c4db611519 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -2266,7 +2266,7 @@ function getMostRecentlyVisitedReport(reports: Array>, reportM /** * This function is used to find the last accessed report and we don't need to subscribe the data in the UI. - * So please use `Onyx.connect()` to get the necessary data when we remove the `Onyx.connect()` + * So please use `Onyx.connectWithoutView()` to get the necessary data when we remove the `Onyx.connect()` */ function findLastAccessedReport(ignoreDomainRooms: boolean, openOnAdminRoom = false, policyID?: string, excludeReportID?: string): OnyxEntry { // If it's the user's first time using New Expensify, then they could either have: