From 16b5b6108fe38b4ba2d88baa4e68e5cf1e1f6c21 Mon Sep 17 00:00:00 2001 From: Zishan Mohd Date: Thu, 4 Dec 2025 14:05:50 -0300 Subject: [PATCH 1/2] add install PWA step in invites flow android --- src/app/(setup)/setup/page.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/(setup)/setup/page.tsx b/src/app/(setup)/setup/page.tsx index 9c64ff11c..d81025e4e 100644 --- a/src/app/(setup)/setup/page.tsx +++ b/src/app/(setup)/setup/page.tsx @@ -126,8 +126,16 @@ function SetupPageContent() { // If invite code is present, set the step to the signup screen if (determinedSetupInitialStepId && userInviteCode) { - const signupScreenIndex = steps.findIndex((s: ISetupStep) => s.screenId === 'signup') - dispatch(setupActions.setStep(signupScreenIndex + 1)) + // if user is on android and not in a standalone pwa, force them to install the PWA first + if (localDeviceType === 'android' && !isStandalonePWA) { + const androidInitialPwaInstallScreenIndex = steps.findIndex( + (s: ISetupStep) => s.screenId === 'android-initial-pwa-install' + ) + dispatch(setupActions.setStep(androidInitialPwaInstallScreenIndex + 1)) + } else { + const signupScreenIndex = steps.findIndex((s: ISetupStep) => s.screenId === 'signup') + dispatch(setupActions.setStep(signupScreenIndex + 1)) + } } else if (determinedSetupInitialStepId) { const initialStepIndex = steps.findIndex((s: ISetupStep) => s.screenId === determinedSetupInitialStepId) if (initialStepIndex !== -1) { From a1d5c9503f038afde18d5c1521e68ae61665fe75 Mon Sep 17 00:00:00 2001 From: Zishan Mohd Date: Thu, 4 Dec 2025 16:05:50 -0300 Subject: [PATCH 2/2] fix: force pwa flow --- src/components/Setup/Views/InstallPWA.tsx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/Setup/Views/InstallPWA.tsx b/src/components/Setup/Views/InstallPWA.tsx index c82699e4d..a8170c74a 100644 --- a/src/components/Setup/Views/InstallPWA.tsx +++ b/src/components/Setup/Views/InstallPWA.tsx @@ -4,13 +4,15 @@ import ErrorAlert from '@/components/Global/ErrorAlert' import { Icon } from '@/components/Global/Icons/Icon' import Modal from '@/components/Global/Modal' import QRCodeWrapper from '@/components/Global/QRCodeWrapper' -import { type BeforeInstallPromptEvent, type ScreenId } from '@/components/Setup/Setup.types' +import { type BeforeInstallPromptEvent, type ISetupStep, type ScreenId } from '@/components/Setup/Setup.types' import { useAuth } from '@/context/authContext' import { useSetupFlow } from '@/hooks/useSetupFlow' import { useRouter } from 'next/navigation' import { useCallback, useEffect, useState } from 'react' import { captureException } from '@sentry/nextjs' import { DeviceType } from '@/hooks/useGetDeviceType' +import { useAppDispatch, useSetupStore } from '@/redux/hooks' +import { setupActions } from '@/redux/slices/setup-slice' const StepTitle = ({ text }: { text: string }) =>

{text}

@@ -34,6 +36,7 @@ const InstallPWA = ({ }) => { const toast = useToast() const { handleNext, isLoading: isSetupFlowLoading } = useSetupFlow() + const { inviteCode, steps } = useSetupStore() const [showModal, setShowModal] = useState(false) const [installComplete, setInstallComplete] = useState(false) const [installCancelled, setInstallCancelled] = useState(false) @@ -42,6 +45,7 @@ const InstallPWA = ({ const [isBrave, setIsBrave] = useState(false) const { user } = useAuth() const { push } = useRouter() + const dispatch = useAppDispatch() useEffect(() => { if (installComplete) { @@ -215,7 +219,20 @@ const InstallPWA = ({

Could not initiate automatic installation.

Please try adding to Home Screen manually via your browser menu.

-