diff --git a/frontend/src/components/common/CreateFlowDropdown.tsx b/frontend/src/components/common/CreateFlowDropdown.tsx
index 18f0fc2e..40ac7288 100644
--- a/frontend/src/components/common/CreateFlowDropdown.tsx
+++ b/frontend/src/components/common/CreateFlowDropdown.tsx
@@ -1,11 +1,10 @@
import { useState } from 'react'
-import { Link } from 'react-router-dom'
+import { Link, useNavigate } from 'react-router-dom'
import { Plus, ChevronDown, Sparkles, FolderTree, ListOrdered, Wrench } from 'lucide-react'
import { cn } from '@/lib/utils'
interface CreateFlowDropdownProps {
aiEnabled: boolean
- onOpenAIBuilder: () => void
className?: string
/** Button label — defaults to "Create Flow" */
label?: string
@@ -13,11 +12,11 @@ interface CreateFlowDropdownProps {
export function CreateFlowDropdown({
aiEnabled,
- onOpenAIBuilder,
className,
label = 'Create Flow',
}: CreateFlowDropdownProps) {
const [showMenu, setShowMenu] = useState(false)
+ const navigate = useNavigate()
return (
@@ -32,59 +31,79 @@ export function CreateFlowDropdown({
{showMenu && (
<>
setShowMenu(false)} />
-
+
+ {/* Troubleshooting */}
setShowMenu(false)}
className="flex items-center gap-3 rounded-md px-3 py-2.5 text-sm text-foreground hover:bg-accent"
>
-
+
Troubleshooting Tree
Branching decision flow
+ {aiEnabled && (
+
+ )}
+
+
+
+ {/* Procedural */}
setShowMenu(false)}
className="flex items-center gap-3 rounded-md px-3 py-2.5 text-sm text-foreground hover:bg-accent"
>
-
+
Procedural Flow
Step-by-step procedure
+ {aiEnabled && (
+
+ )}
+
+
+
+ {/* Maintenance */}
setShowMenu(false)}
className="flex items-center gap-3 rounded-md px-3 py-2.5 text-sm text-foreground hover:bg-accent"
>
-
+
Maintenance Flow
Scheduled multi-target tasks
- {aiEnabled && (
- <>
-
-
- >
- )}
>
)}
diff --git a/frontend/src/pages/QuickStartPage.tsx b/frontend/src/pages/QuickStartPage.tsx
index deb86fee..999ae934 100644
--- a/frontend/src/pages/QuickStartPage.tsx
+++ b/frontend/src/pages/QuickStartPage.tsx
@@ -17,7 +17,7 @@ import { TreeGridView } from '@/components/library/TreeGridView'
import { TreeListView } from '@/components/library/TreeListView'
import { TreeTableView } from '@/components/library/TreeTableView'
import { ViewToggle } from '@/components/library/ViewToggle'
-import { AIFlowBuilderModal } from '@/components/ai-builder/AIFlowBuilderModal'
+
import { CreateFlowDropdown } from '@/components/common/CreateFlowDropdown'
import { cn } from '@/lib/utils'
import { toast } from '@/lib/toast'
@@ -67,7 +67,6 @@ export function QuickStartPage() {
const [showAllFavorites, setShowAllFavorites] = useState(false)
// AI Builder
- const [showAIBuilder, setShowAIBuilder] = useState(false)
const { aiEnabled } = useCachedQuota()
// Tab state
@@ -454,7 +453,7 @@ export function QuickStartPage() {
{activeTab === 'mine' && canCreateTrees && (
setShowAIBuilder(true)}
+
/>
)}
@@ -481,7 +480,7 @@ export function QuickStartPage() {
{activeTab === 'mine' && canCreateTrees && (
setShowAIBuilder(true)}
+
label="Create your first flow"
/>
)}
@@ -646,13 +645,6 @@ export function QuickStartPage() {
)}
- {/* AI Builder Modal */}
- {showAIBuilder && (
-
setShowAIBuilder(false)}
- />
- )}
)
}
diff --git a/frontend/src/pages/TreeLibraryPage.tsx b/frontend/src/pages/TreeLibraryPage.tsx
index 1cbc7014..8756764d 100644
--- a/frontend/src/pages/TreeLibraryPage.tsx
+++ b/frontend/src/pages/TreeLibraryPage.tsx
@@ -22,7 +22,6 @@ import { usePermissions } from '@/hooks/usePermissions'
import { useUserPreferencesStore } from '@/store/userPreferencesStore'
import { usePinnedFlowsStore } from '@/store/pinnedFlowsStore'
import { useCachedQuota } from '@/hooks/useCachedQuota'
-import { AIFlowBuilderModal } from '@/components/ai-builder/AIFlowBuilderModal'
import { CreateFlowDropdown } from '@/components/common/CreateFlowDropdown'
import { Spinner } from '@/components/common/Spinner'
import { EmptyState } from '@/components/common/EmptyState'
@@ -83,7 +82,7 @@ export function TreeLibraryPage() {
const [exportTarget, setExportTarget] = useState
(null)
// AI builder state
- const [showAIBuilder, setShowAIBuilder] = useState(false)
+
const { aiEnabled } = useCachedQuota()
// Pin store
@@ -286,7 +285,7 @@ export function TreeLibraryPage() {
{aiEnabled && (
setShowAIBuilder(true)}
+
label="Create New"
/>
@@ -588,13 +587,6 @@ export function TreeLibraryPage() {
isLoading={isDeleting}
/>
- {/* AI Builder Modal */}
- {showAIBuilder && (
- setShowAIBuilder(false)}
- />
- )}
{forkTarget && (