aboutsummaryrefslogtreecommitdiff
path: root/apps/web/components/new/header.tsx
diff options
context:
space:
mode:
authorMaheshtheDev <[email protected]>2026-01-25 01:04:15 +0000
committerMaheshtheDev <[email protected]>2026-01-25 01:04:15 +0000
commit6834bc687609ec28aff0280df367f5bec6d0e275 (patch)
tree6dac32e6551cb2ea580df784decadad9aebd91c8 /apps/web/components/new/header.tsx
parentfeat: added advanced analytics events (#702) (diff)
downloadsupermemory-6834bc687609ec28aff0280df367f5bec6d0e275.tar.xz
supermemory-6834bc687609ec28aff0280df367f5bec6d0e275.zip
feat: onboarding config, reset onboarding, xai agentic migration (#701)01-24-feat_onboarding_config_reset_onboarding_xai_agentic_migration
- Created a new `useOrgOnboarding` hook that uses `org.metadata.isOnboarded` to track onboarding state - Updated the home page to conditionally use either the old localStorage-based onboarding or the new DB-backed onboarding based on feature flag - Added a "Restart Onboarding" option in the user dropdown menu - Improved the onboarding chat sidebar with per-link loading indicators - Enhanced the X/Twitter research API to better handle different URL formats - Updated the integrations step to use the new onboarding completion method - Added `updateOrgMetadata` function to the auth context for easier metadata updates
Diffstat (limited to 'apps/web/components/new/header.tsx')
-rw-r--r--apps/web/components/new/header.tsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/web/components/new/header.tsx b/apps/web/components/new/header.tsx
index 9691f733..4275e5f8 100644
--- a/apps/web/components/new/header.tsx
+++ b/apps/web/components/new/header.tsx
@@ -15,6 +15,7 @@ import {
HelpCircle,
MenuIcon,
MessageCircleIcon,
+ RotateCcw,
} from "lucide-react"
import { Button } from "@ui/components/button"
import { cn } from "@lib/utils"
@@ -34,6 +35,7 @@ import { useRouter } from "next/navigation"
import Link from "next/link"
import { SpaceSelector } from "./space-selector"
import { useIsMobile } from "@hooks/use-mobile"
+import { useOrgOnboarding } from "@hooks/use-org-onboarding"
interface HeaderProps {
onAddMemory?: () => void
@@ -53,6 +55,12 @@ export function Header({
const { switchProject } = useProjectMutations()
const router = useRouter()
const isMobile = useIsMobile()
+ const { resetOrgOnboarded } = useOrgOnboarding()
+
+ const handleTryOnboarding = () => {
+ resetOrgOnboarded()
+ router.push("/new/onboarding?step=input&flow=welcome")
+ }
const displayName =
user?.displayUsername ||
@@ -316,6 +324,13 @@ export function Header({
<Settings className="h-4 w-4 text-[#737373]" />
Settings
</DropdownMenuItem>
+ <DropdownMenuItem
+ onClick={handleTryOnboarding}
+ className="px-3 py-2.5 rounded-md hover:bg-[#293952]/40 cursor-pointer text-white text-sm font-medium gap-2"
+ >
+ <RotateCcw className="h-4 w-4 text-[#737373]" />
+ Restart Onboarding
+ </DropdownMenuItem>
<DropdownMenuSeparator className="bg-[#2E3033]" />
<DropdownMenuItem
asChild