From 2d02167be1b6a73e900f4f16f30b0bc4b87a169f Mon Sep 17 00:00:00 2001
From: krishna2323 <belivethatkg@gmail.com>
Date: Wed, 13 Aug 2025 23:10:18 +0530
Subject: [PATCH 1/2] Move "Switch to Expensify Classic" to "Troubleshooting"
 to make it less prominent to users.

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
---
 .../RELATIONS/SETTINGS_TO_RHP.ts              |  5 +---
 .../linkingConfig/RELATIONS/SIDEBAR_TO_RHP.ts |  9 +------
 src/pages/settings/InitialSettingsPage.tsx    | 27 +------------------
 .../Troubleshoot/TroubleshootPage.tsx         | 26 +++++++++++++++++-
 4 files changed, 28 insertions(+), 39 deletions(-)

diff --git a/src/libs/Navigation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts b/src/libs/Navigation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts
index bb6d34928efc..de8d34d29961 100755
--- a/src/libs/Navigation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts
+++ b/src/libs/Navigation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts
@@ -22,9 +22,6 @@ const SETTINGS_TO_RHP: Partial<Record<keyof SettingsSplitNavigatorParamList, str
         SCREENS.SETTINGS.PROFILE.ADDRESS,
         SCREENS.SETTINGS.PROFILE.ADDRESS_COUNTRY,
         SCREENS.SETTINGS.SHARE_CODE,
-        SCREENS.SETTINGS.EXIT_SURVEY.REASON,
-        SCREENS.SETTINGS.EXIT_SURVEY.RESPONSE,
-        SCREENS.SETTINGS.EXIT_SURVEY.CONFIRM,
     ],
     [SCREENS.SETTINGS.PREFERENCES.ROOT]: [
         SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE,
@@ -63,7 +60,7 @@ const SETTINGS_TO_RHP: Partial<Record<keyof SettingsSplitNavigatorParamList, str
     ],
     [SCREENS.SETTINGS.ABOUT]: [SCREENS.SETTINGS.APP_DOWNLOAD_LINKS],
     [SCREENS.SETTINGS.SAVE_THE_WORLD]: [SCREENS.I_KNOW_A_TEACHER, SCREENS.INTRO_SCHOOL_PRINCIPAL, SCREENS.I_AM_A_TEACHER],
-    [SCREENS.SETTINGS.TROUBLESHOOT]: [SCREENS.SETTINGS.CONSOLE],
+    [SCREENS.SETTINGS.TROUBLESHOOT]: [SCREENS.SETTINGS.CONSOLE, SCREENS.SETTINGS.EXIT_SURVEY.REASON, SCREENS.SETTINGS.EXIT_SURVEY.RESPONSE, SCREENS.SETTINGS.EXIT_SURVEY.CONFIRM],
     [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: [
         SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD,
         SCREENS.SETTINGS.SUBSCRIPTION.SIZE,
diff --git a/src/libs/Navigation/linkingConfig/RELATIONS/SIDEBAR_TO_RHP.ts b/src/libs/Navigation/linkingConfig/RELATIONS/SIDEBAR_TO_RHP.ts
index 4deffa6fd876..559f38a6afad 100644
--- a/src/libs/Navigation/linkingConfig/RELATIONS/SIDEBAR_TO_RHP.ts
+++ b/src/libs/Navigation/linkingConfig/RELATIONS/SIDEBAR_TO_RHP.ts
@@ -6,14 +6,7 @@ import SCREENS from '@src/SCREENS';
  * This means that going back from RHP will take the user directly to the sidebar. On wide layout the default central screen will be used to fill the space.
  */
 const SIDEBAR_TO_RHP: Partial<Record<SplitNavigatorSidebarScreen, string[]>> = {
-    [SCREENS.SETTINGS.ROOT]: [
-        SCREENS.SETTINGS.SHARE_CODE,
-        SCREENS.SETTINGS.PROFILE.STATUS,
-        SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE,
-        SCREENS.SETTINGS.EXIT_SURVEY.REASON,
-        SCREENS.SETTINGS.EXIT_SURVEY.RESPONSE,
-        SCREENS.SETTINGS.EXIT_SURVEY.CONFIRM,
-    ],
+    [SCREENS.SETTINGS.ROOT]: [SCREENS.SETTINGS.SHARE_CODE, SCREENS.SETTINGS.PROFILE.STATUS, SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE],
 };
 
 export default SIDEBAR_TO_RHP;
diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx
index 1a86a00b5d68..66bbd04898df 100755
--- a/src/pages/settings/InitialSettingsPage.tsx
+++ b/src/pages/settings/InitialSettingsPage.tsx
@@ -29,7 +29,6 @@ import useSingleExecution from '@hooks/useSingleExecution';
 import useSubscriptionPlan from '@hooks/useSubscriptionPlan';
 import useTheme from '@hooks/useTheme';
 import useThemeStyles from '@hooks/useThemeStyles';
-import {resetExitSurveyForm} from '@libs/actions/ExitSurvey';
 import {checkIfFeedConnectionIsBroken} from '@libs/CardUtils';
 import {convertToDisplayString} from '@libs/CurrencyUtils';
 import useIsSidebarRouteActive from '@libs/Navigation/helpers/useIsSidebarRouteActive';
@@ -40,12 +39,10 @@ import type SETTINGS_TO_RHP from '@navigation/linkingConfig/RELATIONS/SETTINGS_T
 import {showContextMenu} from '@pages/home/report/ContextMenu/ReportActionContextMenu';
 import variables from '@styles/variables';
 import {confirmReadyToOpenApp} from '@userActions/App';
-import closeReactNativeApp from '@userActions/HybridApp';
 import {openExternalLink} from '@userActions/Link';
 import {hasPaymentMethodError} from '@userActions/PaymentMethods';
 import {isSupportAuthToken, signOutAndRedirectToSignIn} from '@userActions/Session';
 import {openInitialSettingsPage} from '@userActions/Wallet';
-import CONFIG from '@src/CONFIG';
 import CONST from '@src/CONST';
 import type {TranslationPaths} from '@src/languages/types';
 import NAVIGATORS from '@src/NAVIGATORS';
@@ -90,7 +87,6 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
     const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST, {canBeMissing: true});
     const [privatePersonalDetails] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS, {canBeMissing: true});
     const [vacationDelegate] = useOnyx(ONYXKEYS.NVP_PRIVATE_VACATION_DELEGATE, {canBeMissing: true});
-    const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {canBeMissing: true});
     const [allCards] = useOnyx(ONYXKEYS.CARD_LIST, {canBeMissing: true});
     const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true});
     const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
@@ -122,8 +118,6 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
 
     const [shouldShowSignoutConfirmModal, setShouldShowSignoutConfirmModal] = useState(false);
 
-    const shouldOpenSurveyReasonPage = tryNewDot?.classicRedirect?.dismissed === false;
-
     useEffect(() => {
         openInitialSettingsPage();
         confirmReadyToOpenApp();
@@ -246,25 +240,6 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
                         openExternalLink(CONST.WHATS_NEW_URL);
                     },
                 },
-                {
-                    translationKey: 'exitSurvey.goToExpensifyClassic',
-                    icon: Expensicons.ExpensifyLogoNew,
-                    ...(CONFIG.IS_HYBRID_APP
-                        ? {
-                              action: () => closeReactNativeApp({shouldSignOut: false, shouldSetNVP: true}),
-                          }
-                        : {
-                              action() {
-                                  resetExitSurveyForm(() => {
-                                      if (shouldOpenSurveyReasonPage) {
-                                          Navigation.navigate(ROUTES.SETTINGS_EXIT_SURVEY_REASON.route);
-                                          return;
-                                      }
-                                      Navigation.navigate(ROUTES.SETTINGS_EXIT_SURVEY_CONFIRM.route);
-                                  });
-                              },
-                          }),
-                },
                 {
                     translationKey: 'initialSettingsPage.about',
                     icon: Expensicons.Info,
@@ -292,7 +267,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
                 },
             ],
         };
-    }, [styles.pt4, shouldOpenSurveyReasonPage, signOut]);
+    }, [styles.pt4, signOut]);
 
     /**
      * Return JSX.Element with menu items
diff --git a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
index db4e2d80c293..9311fa65fc20 100644
--- a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
+++ b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
@@ -24,10 +24,13 @@ import useOnyx from '@hooks/useOnyx';
 import useResponsiveLayout from '@hooks/useResponsiveLayout';
 import useThemeStyles from '@hooks/useThemeStyles';
 import useWaitForNavigation from '@hooks/useWaitForNavigation';
+import {resetExitSurveyForm} from '@libs/actions/ExitSurvey';
+import closeReactNativeApp from '@libs/actions/HybridApp';
 import {setShouldMaskOnyxState} from '@libs/actions/MaskOnyx';
 import ExportOnyxState from '@libs/ExportOnyxState';
 import Navigation from '@libs/Navigation/Navigation';
 import {clearOnyxAndResetApp} from '@userActions/App';
+import CONFIG from '@src/CONFIG';
 import type {TranslationPaths} from '@src/languages/types';
 import ONYXKEYS from '@src/ONYXKEYS';
 import ROUTES from '@src/ROUTES';
@@ -51,6 +54,8 @@ function TroubleshootPage() {
     const [shouldStoreLogs] = useOnyx(ONYXKEYS.SHOULD_STORE_LOGS, {canBeMissing: true});
     const [shouldMaskOnyxState = true] = useOnyx(ONYXKEYS.SHOULD_MASK_ONYX_STATE, {canBeMissing: true});
     const {resetOptions} = useOptionsList({shouldInitialize: false});
+    const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {canBeMissing: true});
+    const shouldOpenSurveyReasonPage = tryNewDot?.classicRedirect?.dismissed === false;
 
     const exportOnyxState = useCallback(() => {
         ExportOnyxState.readFromOnyxDatabase().then((value: Record<string, unknown>) => {
@@ -67,6 +72,25 @@ function TroubleshootPage() {
         };
 
         const baseMenuItems: BaseMenuItem[] = [
+            {
+                translationKey: 'exitSurvey.goToExpensifyClassic',
+                icon: Expensicons.ExpensifyLogoNew,
+                ...(CONFIG.IS_HYBRID_APP
+                    ? {
+                          action: () => closeReactNativeApp({shouldSignOut: false, shouldSetNVP: true}),
+                      }
+                    : {
+                          action() {
+                              resetExitSurveyForm(() => {
+                                  if (shouldOpenSurveyReasonPage) {
+                                      Navigation.navigate(ROUTES.SETTINGS_EXIT_SURVEY_REASON.route);
+                                      return;
+                                  }
+                                  Navigation.navigate(ROUTES.SETTINGS_EXIT_SURVEY_CONFIRM.route);
+                              });
+                          },
+                      }),
+            },
             {
                 translationKey: 'initialSettingsPage.troubleshoot.clearCacheAndRestart',
                 icon: Expensicons.RotateLeft,
@@ -92,7 +116,7 @@ function TroubleshootPage() {
                 wrapperStyle: [styles.sectionMenuItemTopDescription],
             }))
             .reverse();
-    }, [waitForNavigate, exportOnyxState, shouldStoreLogs, translate, styles.sectionMenuItemTopDescription]);
+    }, [waitForNavigate, exportOnyxState, shouldStoreLogs, translate, styles.sectionMenuItemTopDescription, shouldOpenSurveyReasonPage]);
 
     return (
         <ScreenWrapper

From 72902bd620c3bc30f0c998d58cb24c425eaa8ee2 Mon Sep 17 00:00:00 2001
From: krishna2323 <belivethatkg@gmail.com>
Date: Tue, 19 Aug 2025 22:13:14 +0530
Subject: [PATCH 2/2] add missing const.

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
---
 src/pages/settings/Troubleshoot/TroubleshootPage.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
index 133940a34bf9..a0c64a1fc5d0 100644
--- a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
+++ b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
@@ -55,7 +55,8 @@ function TroubleshootPage() {
     const [shouldStoreLogs] = useOnyx(ONYXKEYS.SHOULD_STORE_LOGS, {canBeMissing: true});
     const [shouldMaskOnyxState = true] = useOnyx(ONYXKEYS.SHOULD_MASK_ONYX_STATE, {canBeMissing: true});
     const {resetOptions} = useOptionsList({shouldInitialize: false});
-    const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {canBeMissing: true});    
+    const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {canBeMissing: true});
+    const shouldOpenSurveyReasonPage = tryNewDot?.classicRedirect?.dismissed === false;
     const {setShouldResetSearchQuery} = useSearchContext();
     const exportOnyxState = useCallback(() => {
         ExportOnyxState.readFromOnyxDatabase().then((value: Record<string, unknown>) => {
