From 02e4ed8d7ebc2ba6788952006204dd70914146b6 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 26 Feb 2026 11:51:50 -0800 Subject: [PATCH 1/4] Add SKIP_ONBOARDING env flag to bypass onboarding in dev When SKIP_ONBOARDING=true is set in .env, the OnboardingGuard allows navigation to proceed without redirecting to the onboarding flow. This is useful for automated browser testing (e.g., MelvinBot) where the agent needs to reach the main app view quickly without navigating through multiple onboarding screens. Defaults to false so normal development and production are unaffected. Made-with: Cursor --- .env.example | 1 + src/CONFIG.ts | 1 + src/libs/Navigation/guards/OnboardingGuard.ts | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 4a610eb4305fa..3097e6ea4907b 100644 --- a/.env.example +++ b/.env.example @@ -9,6 +9,7 @@ SECURE_NGROK_URL=https://secure-expensify-user.ngrok.io/ NGROK_URL=https://expensify-user.ngrok.io/ USE_NGROK=false USE_WEB_PROXY=false +SKIP_ONBOARDING=false USE_WDYR=false USE_REDUX_DEVTOOLS=false CAPTURE_METRICS=false diff --git a/src/CONFIG.ts b/src/CONFIG.ts index 67951f4cbfc28..9ea8bc659f986 100644 --- a/src/CONFIG.ts +++ b/src/CONFIG.ts @@ -132,6 +132,7 @@ export default { USE_REACT_STRICT_MODE_IN_DEV: false, ELECTRON_DISABLE_SECURITY_WARNINGS: 'true', IS_TEST_ENV: process.env.NODE_ENV === 'test', + SKIP_ONBOARDING: get(Config, 'SKIP_ONBOARDING', 'false') === 'true', // eslint-disable-next-line no-restricted-properties IS_HYBRID_APP: HybridAppModule.isHybridApp(), SENTRY_DSN: get(Config, 'SENTRY_DSN', 'https://7b463fb4d4402d342d1166d929a62f4e@o4510228013121536.ingest.us.sentry.io/4510228107427840'), diff --git a/src/libs/Navigation/guards/OnboardingGuard.ts b/src/libs/Navigation/guards/OnboardingGuard.ts index 4f84332f40e7e..181c91d157e81 100644 --- a/src/libs/Navigation/guards/OnboardingGuard.ts +++ b/src/libs/Navigation/guards/OnboardingGuard.ts @@ -171,7 +171,8 @@ const OnboardingGuard: NavigationGuard = { return {type: 'REDIRECT', route: ROUTES.HOME}; } - const shouldSkipOnboarding = context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember; + const shouldSkipOnboarding = + context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember || CONFIG.SKIP_ONBOARDING; if (shouldSkipOnboarding) { return {type: 'ALLOW'}; From 1d8cf02fa2cb2d0f747b364cad62e881cfee8462 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 26 Feb 2026 17:07:59 -0800 Subject: [PATCH 2/4] Add Bash permissions to App settings for MelvinBot subagent When the app-web-tester subagent runs inside the App directory, Claude Code loads App/.claude/settings.json which only allowed Playwright MCP tools. This caused every Bash command to be denied, including sed (to configure .env), ensureDevServer.sh, mkdir, ls, and even echo. Adding Bash patterns here allows the subagent to set up the dev environment and take screenshots. Made-with: Cursor --- .claude/settings.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.claude/settings.json b/.claude/settings.json index 4aedc14cbe118..9bd4ac0df6091 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -22,6 +22,28 @@ }, "permissions": { "allow": [ + "Bash(cd:*)", + "Bash(sed:*)", + "Bash(bash:*)", + "Bash(npm:*)", + "Bash(npx:*)", + "Bash(mkdir:*)", + "Bash(ls:*)", + "Bash(echo:*)", + "Bash(cat:*)", + "Bash(grep:*)", + "Bash(curl:*)", + "Bash(if curl:*)", + "Bash(git:*)", + "Bash(find:*)", + "Bash(head:*)", + "Bash(tail:*)", + "Bash(timeout:*)", + "Bash(sleep:*)", + "Bash(for:*)", + "Bash(while:*)", + "Bash(pwd)", + "Bash(which:*)", "mcp__playwright__browser_navigate", "mcp__playwright__browser_navigate_back", "mcp__playwright__browser_snapshot", From b93866b1b3895815047d99c375ae17d46a836e86 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 26 Feb 2026 17:17:06 -0800 Subject: [PATCH 3/4] Revert "Add Bash permissions to App settings for MelvinBot subagent" This reverts commit 1d8cf02fa2cb2d0f747b364cad62e881cfee8462. --- .claude/settings.json | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 9bd4ac0df6091..4aedc14cbe118 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -22,28 +22,6 @@ }, "permissions": { "allow": [ - "Bash(cd:*)", - "Bash(sed:*)", - "Bash(bash:*)", - "Bash(npm:*)", - "Bash(npx:*)", - "Bash(mkdir:*)", - "Bash(ls:*)", - "Bash(echo:*)", - "Bash(cat:*)", - "Bash(grep:*)", - "Bash(curl:*)", - "Bash(if curl:*)", - "Bash(git:*)", - "Bash(find:*)", - "Bash(head:*)", - "Bash(tail:*)", - "Bash(timeout:*)", - "Bash(sleep:*)", - "Bash(for:*)", - "Bash(while:*)", - "Bash(pwd)", - "Bash(which:*)", "mcp__playwright__browser_navigate", "mcp__playwright__browser_navigate_back", "mcp__playwright__browser_snapshot", From aa6967a19a5b5f2fc98fd000e0d53d5a9aea89bc Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Fri, 27 Feb 2026 09:49:05 -0800 Subject: [PATCH 4/4] make skip onboarding config the first check for efficiency --- src/libs/Navigation/guards/OnboardingGuard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/guards/OnboardingGuard.ts b/src/libs/Navigation/guards/OnboardingGuard.ts index 181c91d157e81..434342b4daeea 100644 --- a/src/libs/Navigation/guards/OnboardingGuard.ts +++ b/src/libs/Navigation/guards/OnboardingGuard.ts @@ -172,7 +172,7 @@ const OnboardingGuard: NavigationGuard = { } const shouldSkipOnboarding = - context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember || CONFIG.SKIP_ONBOARDING; + CONFIG.SKIP_ONBOARDING || context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember; if (shouldSkipOnboarding) { return {type: 'ALLOW'};