You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web - Onboarding - Two Expensify logos appear on the modal #86258
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #85556 - "Preserve deep-linked report route during onboarding guard redirect" by @bernhardoj (Medium-High confidence) Related Issues: None
Recommendation: REVERT
This PR modified the navigation stack handling for guard redirects. The change causes the onboarding modal to be layered on top of the SignInModal instead of replacing it, resulting in both modals being visible simultaneously and showing duplicate Expensify logos.
Labels: Keeping DeployBlockerCash (this is a frontend/App bug blocking the mobile deploy)
Detailed Analysis
Evidence
PR #85556 was merged on March 23, 2026 and is included in the staging deploy checklist for v9.3.43-0. The issue is reproducible on staging but not in production, confirming it was introduced in this release.
The PR modified src/libs/Navigation/AppNavigator/createRootStackNavigator/RootStackRouter.ts to preserve existing fullscreen routes when a navigation guard triggers a REDIRECT to onboarding. Before this PR, redirecting to onboarding would reset the navigation state to [Home, OnboardingModalNavigator]. After this PR (lines 105-111), if there is an existing route in the stack, it appends the onboarding modal on top: [...state.routes, redirectRoute].
Verification
The affected flow:
User signs in as a new account on staging
SignInModal is shown with ExpensifyWordmark (from SignInPageContent component)
After authentication completes, the OnboardingGuard fires a REDIRECT
Result: Both SignInModal and OnboardingWorkEmail are in the navigation stack
When user reaches the work email step and switches to dark mode, both modals try to render their content, causing two Expensify logos to appear
The timing issue is exacerbated by the SignInModal code (lines 34-53) which waits for openApp() to complete before dismissing. With PR #85556, the OnboardingGuard can fire and modify the stack before Navigation.dismissModal() is called, resulting in both modals being present.
Root Cause
The navigation stack preservation logic in PR #85556 does not account for the case where the "existing route" is actually the SignInModal itself, which should be dismissed before showing onboarding. The code at line 105 checks state.routes.some((route) => isFullScreenName(route.name)) - if SignInModal is considered a fullscreen route, it gets preserved when it should be replaced.
The dark mode theme switch likely triggers a re-render that makes both logos visible at once, explaining why the bug manifests specifically when switching themes during onboarding.
Please re-state the problem that we are trying to solve in this issue.
When a new user signs in on staging and goes through onboarding, two Expensify logos appear on the modal. Additionally, when switching from light to dark mode during the work email step, the Expensify logo is hard to read because it bleeds through the overlay with hardcoded colors that don't adapt to the theme.
What is the root cause of that problem?
PR #85556 ("Preserve deep-linked report route during onboarding guard redirect"), merged March 23, changed the REDIRECT handler in RootStackRouter.ts to preserve existing routes when a fullscreen route is already in the stack.
consthasExistingFullScreenRoute=state.routes.some((route)=>isFullScreenName(route.name));constroutes=hasExistingFullScreenRoute&&redirectRoute
? [...state.routes,redirectRoute]// <-- preserves ALL routes, including modals
: redirectState.routes;
During new-user sign-in flow, the navigation stack is: [Home/ReportsSplitNavigator, RightModalNavigator(SignInModal)]. When the OnboardingGuard fires a REDIRECT to onboarding:
hasExistingFullScreenRoute is true (Home is a fullscreen route per isNavigatorName.ts:6)
The spread [...state.routes, redirectRoute] preserves all existing routes, including RightModalNavigator containing SignInModal
Final stack becomes: [Home, RightModalNavigator(SignInModal), OnboardingModalNavigator]
SignInModal renders SignInPageContent which includes ExpensifyWordmark (SignInPageContent.tsx:33)
The onboarding overlay is only 72% opaque (variables.ts:126), so the SignInModal's ExpensifyWordmark logo bleeds through
BUG 1 (dark mode): The ExpensifyWordmark SVGs use hardcoded colors (e.g., #03d47c green, #e7ece9 light gray) that don't adapt to the theme. When visible through the overlay in dark mode, the light-colored portions of the logo clash with the dark background.
BUG 2 (two logos): The onboarding content is displayed on top of the overlay, while the preserved SignInModal's ExpensifyWordmark is visible behind it through the semi-transparent overlay — resulting in two logos.
What changes do you think we should make in order to solve the problem?
In the REDIRECT handler in RootStackRouter.ts, when preserving existing routes, filter out non-fullscreen routes (modals) so they don't persist behind the redirect target:
At RootStackRouter.ts:111, change the route preservation logic to only keep fullscreen routes:
// Before (preserves everything including modals):constroutes=hasExistingFullScreenRoute&&redirectRoute ? [...state.routes,redirectRoute] : redirectState.routes;// After (only preserves fullscreen routes):constfilteredRoutes=state.routes.filter((route)=>isFullScreenName(route.name));constroutes=hasExistingFullScreenRoute&&redirectRoute ? [...filteredRoutes,redirectRoute] : redirectState.routes;
This preserves the original intent of PR #85556 (keeping deep-linked report routes for post-onboarding return) while properly discarding modal navigators that should not persist behind the redirect overlay.
What alternative solutions did you explore? (Optional)
An alternative would be to have SignInModal dismiss itself before the OnboardingGuard fires by adjusting the timing in SignInModal.tsx:44-51. However, this is fragile because it depends on execution order of promises and guard evaluation, which is a race condition. Fixing the route preservation logic is more robust since it correctly scopes which routes should be preserved regardless of timing.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
This issue has not been updated in over 15 days. @marcochavezf, @bernhardoj eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Mar 24, 2026
Triggered auto assignment to @Gonals (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Mar 24, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Mar 24, 2026
💬 A slack conversation has been started in #expensify-open-source
OSBotify commentedon Mar 24, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #85556 - "Preserve deep-linked report route during onboarding guard redirect" by @bernhardoj (Medium-High confidence)
Related Issues: None
Recommendation: REVERT
This PR modified the navigation stack handling for guard redirects. The change causes the onboarding modal to be layered on top of the SignInModal instead of replacing it, resulting in both modals being visible simultaneously and showing duplicate Expensify logos.
Labels: Keeping DeployBlockerCash (this is a frontend/App bug blocking the mobile deploy)
Detailed Analysis
Evidence
PR #85556 was merged on March 23, 2026 and is included in the staging deploy checklist for v9.3.43-0. The issue is reproducible on staging but not in production, confirming it was introduced in this release.
The PR modified
src/libs/Navigation/AppNavigator/createRootStackNavigator/RootStackRouter.tsto preserve existing fullscreen routes when a navigation guard triggers a REDIRECT to onboarding. Before this PR, redirecting to onboarding would reset the navigation state to[Home, OnboardingModalNavigator]. After this PR (lines 105-111), if there is an existing route in the stack, it appends the onboarding modal on top:[...state.routes, redirectRoute].Verification
The affected flow:
The timing issue is exacerbated by the SignInModal code (lines 34-53) which waits for
openApp()to complete before dismissing. With PR #85556, the OnboardingGuard can fire and modify the stack beforeNavigation.dismissModal()is called, resulting in both modals being present.Root Cause
The navigation stack preservation logic in PR #85556 does not account for the case where the "existing route" is actually the SignInModal itself, which should be dismissed before showing onboarding. The code at line 105 checks
state.routes.some((route) => isFullScreenName(route.name))- if SignInModal is considered a fullscreen route, it gets preserved when it should be replaced.The dark mode theme switch likely triggers a re-render that makes both logos visible at once, explaining why the bug manifests specifically when switching themes during onboarding.
MelvinBot commentedon Mar 24, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a new user signs in on staging and goes through onboarding, two Expensify logos appear on the modal. Additionally, when switching from light to dark mode during the work email step, the Expensify logo is hard to read because it bleeds through the overlay with hardcoded colors that don't adapt to the theme.
What is the root cause of that problem?
PR #85556 ("Preserve deep-linked report route during onboarding guard redirect"), merged March 23, changed the
REDIRECThandler inRootStackRouter.tsto preserve existing routes when a fullscreen route is already in the stack.The problem is at
RootStackRouter.ts:105-111:During new-user sign-in flow, the navigation stack is:
[Home/ReportsSplitNavigator, RightModalNavigator(SignInModal)]. When the OnboardingGuard fires a REDIRECT to onboarding:hasExistingFullScreenRouteistrue(Home is a fullscreen route perisNavigatorName.ts:6)[...state.routes, redirectRoute]preserves all existing routes, includingRightModalNavigatorcontainingSignInModal[Home, RightModalNavigator(SignInModal), OnboardingModalNavigator]SignInModalrendersSignInPageContentwhich includesExpensifyWordmark(SignInPageContent.tsx:33)variables.ts:126), so the SignInModal'sExpensifyWordmarklogo bleeds throughBUG 1 (dark mode): The
ExpensifyWordmarkSVGs use hardcoded colors (e.g.,#03d47cgreen,#e7ece9light gray) that don't adapt to the theme. When visible through the overlay in dark mode, the light-colored portions of the logo clash with the dark background.BUG 2 (two logos): The onboarding content is displayed on top of the overlay, while the preserved
SignInModal'sExpensifyWordmarkis visible behind it through the semi-transparent overlay — resulting in two logos.What changes do you think we should make in order to solve the problem?
In the
REDIRECThandler inRootStackRouter.ts, when preserving existing routes, filter out non-fullscreen routes (modals) so they don't persist behind the redirect target:At
RootStackRouter.ts:111, change the route preservation logic to only keep fullscreen routes:This preserves the original intent of PR #85556 (keeping deep-linked report routes for post-onboarding return) while properly discarding modal navigators that should not persist behind the redirect overlay.
What alternative solutions did you explore? (Optional)
An alternative would be to have
SignInModaldismiss itself before the OnboardingGuard fires by adjusting the timing inSignInModal.tsx:44-51. However, this is fragile because it depends on execution order of promises and guard evaluation, which is a race condition. Fixing the route preservation logic is more robust since it correctly scopes which routes should be preserved regardless of timing.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.Gonals commentedon Mar 24, 2026
This seems like a very corner flow, so we may not need to block on it. Thoughts, @grgia?
bernhardoj commentedon Mar 25, 2026
@Gonals Tested on
mainand staging, but I can't repro it. There is no Expensify logo on the onboarding modal at all.w.mp4
w2.mp4
11 remaining items
melvin-bot commentedon Apr 8, 2026
@bernhardoj Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Apr 10, 2026
@bernhardoj Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Apr 14, 2026
@bernhardoj 10 days overdue. Is anyone even seeing these? Hello?
melvin-bot commentedon Apr 16, 2026
@bernhardoj 12 days overdue now... This issue's end is nigh!
melvin-bot commentedon Apr 20, 2026
This issue has not been updated in over 14 days. @marcochavezf, @bernhardoj eroding to Weekly issue.
melvin-bot commentedon May 13, 2026
This issue has not been updated in over 15 days. @marcochavezf, @bernhardoj eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
marcochavezf commentedon Jun 30, 2026
Catching up from OOO
melvin-bot commentedon Jul 9, 2026
@marcochavezf, @bernhardoj, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.