From bbf8999404f1e3fdd351dc23795ea11ce94cb350 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Mon, 18 May 2026 18:13:41 -0700 Subject: [PATCH] Remove signals step to improve conversion --- .../onboarding/components/CliInstallStep.tsx | 4 +- .../onboarding/components/OnboardingFlow.tsx | 20 +-- .../onboarding/components/SignalsStep.tsx | 158 ------------------ .../onboarding/hooks/usePrefetchSignalData.ts | 55 ------ .../src/renderer/features/onboarding/types.ts | 4 +- 5 files changed, 4 insertions(+), 237 deletions(-) delete mode 100644 apps/code/src/renderer/features/onboarding/components/SignalsStep.tsx delete mode 100644 apps/code/src/renderer/features/onboarding/hooks/usePrefetchSignalData.ts diff --git a/apps/code/src/renderer/features/onboarding/components/CliInstallStep.tsx b/apps/code/src/renderer/features/onboarding/components/CliInstallStep.tsx index 7c3cd4a17..4e47ed664 100644 --- a/apps/code/src/renderer/features/onboarding/components/CliInstallStep.tsx +++ b/apps/code/src/renderer/features/onboarding/components/CliInstallStep.tsx @@ -338,12 +338,12 @@ export function CliInstallStep({ onNext, onBack }: CliInstallStepProps) { {allReady ? ( ) : ( )} diff --git a/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx b/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx index 8c7fb2ca9..41f81170a 100644 --- a/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx +++ b/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx @@ -10,12 +10,10 @@ import { AnimatePresence, LayoutGroup, motion } from "framer-motion"; import { useHotkeys } from "react-hotkeys-hook"; import { useOnboardingFlow } from "../hooks/useOnboardingFlow"; -import { usePrefetchSignalData } from "../hooks/usePrefetchSignalData"; import { CliInstallStep } from "./CliInstallStep"; import { GitIntegrationStep } from "./GitIntegrationStep"; import { InviteCodeStep } from "./InviteCodeStep"; import { ProjectSelectStep } from "./ProjectSelectStep"; -import { SignalsStep } from "./SignalsStep"; import { StepIndicator } from "./StepIndicator"; import { WelcomeScreen } from "./WelcomeScreen"; @@ -53,7 +51,6 @@ export function OnboardingFlow() { const isAuthenticated = useAuthStateValue( (state) => state.status === "authenticated", ); - usePrefetchSignalData(); useHotkeys("right", next, { enableOnFormTags: false }, [next]); useHotkeys("left", back, { enableOnFormTags: false }, [back]); @@ -185,22 +182,7 @@ export function OnboardingFlow() { transition={{ duration: 0.3 }} className="min-h-0 w-full flex-1" > - - - )} - - {currentStep === "signals" && ( - - + )} diff --git a/apps/code/src/renderer/features/onboarding/components/SignalsStep.tsx b/apps/code/src/renderer/features/onboarding/components/SignalsStep.tsx deleted file mode 100644 index 5ae2f3ea1..000000000 --- a/apps/code/src/renderer/features/onboarding/components/SignalsStep.tsx +++ /dev/null @@ -1,158 +0,0 @@ -import { DataSourceSetup } from "@features/inbox/components/DataSourceSetup"; -import { SignalSourceToggles } from "@features/inbox/components/SignalSourceToggles"; -import { useSignalSourceManager } from "@features/inbox/hooks/useSignalSourceManager"; -import { useMeQuery } from "@hooks/useMeQuery"; -import { ArrowLeft, ArrowRight } from "@phosphor-icons/react"; -import { Button, Flex, Text } from "@radix-ui/themes"; -import detectiveHog from "@renderer/assets/images/hedgehogs/detective-hog.png"; -import { useQueryClient } from "@tanstack/react-query"; -import { motion } from "framer-motion"; -import { OnboardingHogTip } from "./OnboardingHogTip"; -import { StepActions } from "./StepActions"; - -interface SignalsStepProps { - onNext: () => void; - onBack: () => void; -} - -export function SignalsStep({ onNext, onBack }: SignalsStepProps) { - const queryClient = useQueryClient(); - const { - displayValues, - sourceStates, - setupSource, - isLoading, - handleToggle, - handleSetup, - handleSetupComplete, - handleSetupCancel, - evaluationsUrl, - } = useSignalSourceManager(); - const { data: me } = useMeQuery(); - const isStaff = me?.is_staff ?? false; - - const anyEnabled = - displayValues.session_replay || - displayValues.error_tracking || - displayValues.github || - displayValues.linear || - displayValues.zendesk; - - const handleContinue = async (): Promise => { - if (anyEnabled) { - await queryClient.invalidateQueries({ - queryKey: ["inbox", "signal-reports"], - }); - } - onNext(); - }; - - return ( - - - - - {/* Header + content */} - - - - - Set up your Signals Inbox - - - Choose which sources to monitor for this project. Signals - will analyze activity and prioritize what needs attention. - - - - - - {setupSource ? ( - void handleSetupComplete()} - onCancel={handleSetupCancel} - /> - ) : ( - - void handleToggle(source, enabled) - } - disabled={isLoading} - sourceStates={sourceStates} - onSetup={handleSetup} - evaluationsUrl={isStaff ? evaluationsUrl : undefined} - /> - )} - - - - {/* Hog tip */} - - - - - - - {anyEnabled ? ( - - ) : ( - - )} - - - - ); -} diff --git a/apps/code/src/renderer/features/onboarding/hooks/usePrefetchSignalData.ts b/apps/code/src/renderer/features/onboarding/hooks/usePrefetchSignalData.ts deleted file mode 100644 index 84c7f11ab..000000000 --- a/apps/code/src/renderer/features/onboarding/hooks/usePrefetchSignalData.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { useOptionalAuthenticatedClient } from "@features/auth/hooks/authClient"; -import { useAuthStateValue } from "@features/auth/hooks/authQueries"; -import { useQueryClient } from "@tanstack/react-query"; -import { useEffect } from "react"; - -/** - * Prefetches onboarding step data so GitHub and Signals steps load instantly. - * Call this early in the onboarding flow (e.g. in OnboardingFlow component). - */ -export function usePrefetchSignalData(): void { - const client = useOptionalAuthenticatedClient(); - const projectId = useAuthStateValue((state) => state.projectId); - const queryClient = useQueryClient(); - - useEffect(() => { - if (!client || !projectId) return; - - queryClient.prefetchQuery({ - queryKey: ["integrations", projectId], - queryFn: () => client.getIntegrationsForProject(projectId), - staleTime: 60_000, - }); - - queryClient.prefetchQuery({ - queryKey: ["signals", "source-configs", projectId], - queryFn: () => client.listSignalSourceConfigs(projectId), - staleTime: 30_000, - }); - - queryClient.prefetchQuery({ - queryKey: ["external-data-sources", projectId], - queryFn: () => client.listExternalDataSources(projectId), - staleTime: 60_000, - }); - - queryClient.prefetchQuery({ - queryKey: ["integrations", "list"], - queryFn: async () => { - const integrations = await client.getIntegrations("github"); - const ghIntegration = ( - integrations as { id: number; kind: string }[] - ).find((i) => i.kind === "github"); - if (ghIntegration) { - queryClient.prefetchQuery({ - queryKey: ["integrations", "repositories", ghIntegration.id], - queryFn: () => client.getGithubRepositories(ghIntegration.id), - staleTime: 60_000, - }); - } - return integrations; - }, - staleTime: 60_000, - }); - }, [client, projectId, queryClient]); -} diff --git a/apps/code/src/renderer/features/onboarding/types.ts b/apps/code/src/renderer/features/onboarding/types.ts index de3eef5b0..ef03bd3fc 100644 --- a/apps/code/src/renderer/features/onboarding/types.ts +++ b/apps/code/src/renderer/features/onboarding/types.ts @@ -3,8 +3,7 @@ export type OnboardingStep = | "project-select" | "invite-code" | "github" - | "install-cli" - | "signals"; + | "install-cli"; export const ONBOARDING_STEPS: OnboardingStep[] = [ "welcome", @@ -12,5 +11,4 @@ export const ONBOARDING_STEPS: OnboardingStep[] = [ "invite-code", "github", "install-cli", - "signals", ];