From dc7b489374a7ee4b1117cede2fa3b56eebbc58d9 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Tue, 27 Jan 2026 16:53:57 -0600 Subject: [PATCH] feat(platform): disable onboarding redirects and add $5 signup bonus - Disable automatic onboarding redirects by making shouldShowOnboarding() return false - Users now land directly on /copilot after signup/login - Add VISIT_COPILOT onboarding step with 500 credit ($5) reward - Complete VISIT_COPILOT step automatically when user visits /copilot - Checklist/wallet remains functional, reward is granted invisibly OPEN-2967 Co-Authored-By: Claude Opus 4.5 --- .../backend/backend/data/onboarding.py | 4 ++++ .../migration.sql | 14 ++++++++++++++ autogpt_platform/backend/schema.prisma | 1 + .../src/app/(platform)/copilot/useCopilotPage.ts | 7 +++++++ autogpt_platform/frontend/src/app/api/helpers.ts | 11 +++-------- autogpt_platform/frontend/src/app/api/openapi.json | 2 ++ .../frontend/src/lib/autogpt-server-api/types.ts | 1 + 7 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 autogpt_platform/backend/migrations/20260127211502_add_visit_copilot_onboarding_step/migration.sql diff --git a/autogpt_platform/backend/backend/data/onboarding.py b/autogpt_platform/backend/backend/data/onboarding.py index 6a842d1022..4af8e8dffd 100644 --- a/autogpt_platform/backend/backend/data/onboarding.py +++ b/autogpt_platform/backend/backend/data/onboarding.py @@ -41,6 +41,7 @@ FrontendOnboardingStep = Literal[ OnboardingStep.AGENT_NEW_RUN, OnboardingStep.AGENT_INPUT, OnboardingStep.CONGRATS, + OnboardingStep.VISIT_COPILOT, OnboardingStep.MARKETPLACE_VISIT, OnboardingStep.BUILDER_OPEN, ] @@ -122,6 +123,9 @@ async def update_user_onboarding(user_id: str, data: UserOnboardingUpdate): async def _reward_user(user_id: str, onboarding: UserOnboarding, step: OnboardingStep): reward = 0 match step: + # Welcome bonus for visiting copilot ($5 = 500 credits) + case OnboardingStep.VISIT_COPILOT: + reward = 500 # Reward user when they clicked New Run during onboarding # This is because they need credits before scheduling a run (next step) # This is seen as a reward for the GET_RESULTS step in the wallet diff --git a/autogpt_platform/backend/migrations/20260127211502_add_visit_copilot_onboarding_step/migration.sql b/autogpt_platform/backend/migrations/20260127211502_add_visit_copilot_onboarding_step/migration.sql new file mode 100644 index 0000000000..7ea789d165 --- /dev/null +++ b/autogpt_platform/backend/migrations/20260127211502_add_visit_copilot_onboarding_step/migration.sql @@ -0,0 +1,14 @@ +/* + Warnings: + + - You are about to drop the column `search` on the `StoreListingVersion` table. All the data in the column will be lost. + +*/ +-- AlterEnum +ALTER TYPE "OnboardingStep" ADD VALUE 'VISIT_COPILOT'; + +-- DropIndex +DROP INDEX "UnifiedContentEmbedding_search_idx"; + +-- AlterTable +ALTER TABLE "StoreListingVersion" DROP COLUMN "search"; diff --git a/autogpt_platform/backend/schema.prisma b/autogpt_platform/backend/schema.prisma index de94600820..2c52528e3f 100644 --- a/autogpt_platform/backend/schema.prisma +++ b/autogpt_platform/backend/schema.prisma @@ -81,6 +81,7 @@ enum OnboardingStep { AGENT_INPUT CONGRATS // First Wins + VISIT_COPILOT GET_RESULTS MARKETPLACE_VISIT MARKETPLACE_ADD_AGENT diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotPage.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotPage.ts index 8cf4599a12..f418da490b 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotPage.ts +++ b/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotPage.ts @@ -5,6 +5,7 @@ import { import { useToast } from "@/components/molecules/Toast/use-toast"; import { getHomepageRoute } from "@/lib/constants"; import { useSupabase } from "@/lib/supabase/hooks/useSupabase"; +import { useOnboarding } from "@/providers/onboarding/onboarding-provider"; import { Flag, type FlagValues, @@ -74,9 +75,15 @@ export function useCopilotPage() { const queryClient = useQueryClient(); const { user, isLoggedIn, isUserLoading } = useSupabase(); const { toast } = useToast(); + const { completeStep } = useOnboarding(); const setIsStreaming = useCopilotStore((s) => s.setIsStreaming); + // Complete VISIT_COPILOT onboarding step to grant $5 welcome bonus + useEffect(() => { + completeStep("VISIT_COPILOT"); + }, [completeStep]); + const isChatEnabled = useGetFlag(Flag.CHAT); const flags = useFlags(); const homepageRoute = getHomepageRoute(isChatEnabled); diff --git a/autogpt_platform/frontend/src/app/api/helpers.ts b/autogpt_platform/frontend/src/app/api/helpers.ts index e9a708ba4c..d690473721 100644 --- a/autogpt_platform/frontend/src/app/api/helpers.ts +++ b/autogpt_platform/frontend/src/app/api/helpers.ts @@ -1,8 +1,4 @@ import type { InfiniteData } from "@tanstack/react-query"; -import { - getV1IsOnboardingEnabled, - getV1OnboardingState, -} from "./__generated__/endpoints/onboarding/onboarding"; import { Pagination } from "./__generated__/models/pagination"; export type OKData = @@ -176,8 +172,7 @@ export async function resolveResponse< } export async function shouldShowOnboarding() { - const isEnabled = await resolveResponse(getV1IsOnboardingEnabled()); - const onboarding = await resolveResponse(getV1OnboardingState()); - const isCompleted = onboarding.completedSteps.includes("CONGRATS"); - return isEnabled && !isCompleted; + // OPEN-2967: Disable onboarding redirects - users land on /copilot directly + // The checklist/wallet remains functional as it reads from onboarding state independently + return false; } diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.json index b4e2bc80bd..d1ecd91702 100644 --- a/autogpt_platform/frontend/src/app/api/openapi.json +++ b/autogpt_platform/frontend/src/app/api/openapi.json @@ -4594,6 +4594,7 @@ "AGENT_NEW_RUN", "AGENT_INPUT", "CONGRATS", + "VISIT_COPILOT", "MARKETPLACE_VISIT", "BUILDER_OPEN" ], @@ -8754,6 +8755,7 @@ "AGENT_NEW_RUN", "AGENT_INPUT", "CONGRATS", + "VISIT_COPILOT", "GET_RESULTS", "MARKETPLACE_VISIT", "MARKETPLACE_ADD_AGENT", diff --git a/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts b/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts index 82c03bc9f1..2d583d2062 100644 --- a/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts +++ b/autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts @@ -1003,6 +1003,7 @@ export type OnboardingStep = | "AGENT_INPUT" | "CONGRATS" // First Wins + | "VISIT_COPILOT" | "GET_RESULTS" | "MARKETPLACE_VISIT" | "MARKETPLACE_ADD_AGENT"