From 050de16aa2fe1d82f27cc73d9694f9b0bf8aad68 Mon Sep 17 00:00:00 2001 From: viettranx Date: Thu, 12 Mar 2026 10:30:05 +0700 Subject: [PATCH] feat(setup): add skip setup option with localStorage persistence Users can skip the entire setup wizard via a link below the title. Sets localStorage flag so refresh won't re-show the wizard. --- .../pages/setup/hooks/use-bootstrap-status.ts | 4 ++++ ui/web/src/pages/setup/setup-layout.tsx | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ui/web/src/pages/setup/hooks/use-bootstrap-status.ts b/ui/web/src/pages/setup/hooks/use-bootstrap-status.ts index 599e3747..ac8ac1ba 100644 --- a/ui/web/src/pages/setup/hooks/use-bootstrap-status.ts +++ b/ui/web/src/pages/setup/hooks/use-bootstrap-status.ts @@ -22,6 +22,10 @@ export function useBootstrapStatus() { (p.api_key === "***" || p.provider_type === "claude_cli" || p.provider_type === "chatgpt_oauth" || p.provider_type === "ollama")); const hasAgent = agents.length > 0; + // Allow skipping setup entirely via localStorage + const skipped = localStorage.getItem("setup_skipped") === "1"; + if (skipped) return { needsSetup: false, currentStep: "complete" as SetupStep }; + if (!hasProvider) return { needsSetup: true, currentStep: 1 as SetupStep }; if (!hasAgent) return { needsSetup: true, currentStep: 2 as SetupStep }; return { needsSetup: false, currentStep: "complete" as SetupStep }; diff --git a/ui/web/src/pages/setup/setup-layout.tsx b/ui/web/src/pages/setup/setup-layout.tsx index 1fa147d6..63dd0abb 100644 --- a/ui/web/src/pages/setup/setup-layout.tsx +++ b/ui/web/src/pages/setup/setup-layout.tsx @@ -1,7 +1,16 @@ +import { useNavigate } from "react-router"; import { useTranslation } from "react-i18next"; +import { ROUTES } from "@/lib/constants"; export function SetupLayout({ children }: { children: React.ReactNode }) { const { t } = useTranslation("setup"); + const navigate = useNavigate(); + + const handleSkipSetup = () => { + localStorage.setItem("setup_skipped", "1"); + navigate(ROUTES.OVERVIEW, { replace: true }); + }; + return (
@@ -10,6 +19,13 @@ export function SetupLayout({ children }: { children: React.ReactNode }) {

{t("layout.subtitle", "Let's get your gateway up and running")}

+
{children}