diff --git a/frontend/src/pages/TreeLibraryPage.tsx b/frontend/src/pages/TreeLibraryPage.tsx index dd054aff..50f5e2ac 100644 --- a/frontend/src/pages/TreeLibraryPage.tsx +++ b/frontend/src/pages/TreeLibraryPage.tsx @@ -47,14 +47,14 @@ export function TreeLibraryPage() { const [isLoading, setIsLoading] = useState(true) // Read type filter from URL query params (e.g. /trees?type=procedural) const urlType = searchParams.get('type') - const [typeFilter, setTypeFilter] = useState<'all' | 'troubleshooting' | 'procedural' | 'maintenance'>( - urlType === 'troubleshooting' || urlType === 'procedural' || urlType === 'maintenance' ? urlType : 'all' + const [typeFilter, setTypeFilter] = useState<'all' | 'troubleshooting' | 'procedural'>( + urlType === 'troubleshooting' || urlType === 'procedural' ? urlType : 'all' ) // Sync filters when URL changes (e.g. clicking sidebar categories/tags or nav sub-items) useEffect(() => { const t = searchParams.get('type') - if (t === 'troubleshooting' || t === 'procedural' || t === 'maintenance') { + if (t === 'troubleshooting' || t === 'procedural') { setTypeFilter(t) } else { setTypeFilter('all') @@ -292,16 +292,14 @@ export function TreeLibraryPage() {

- {typeFilter === 'procedural' ? 'Projects' : typeFilter === 'troubleshooting' ? 'Troubleshooting Flows' : typeFilter === 'maintenance' ? 'Maintenance Flows' : 'Flow Library'} + {typeFilter === 'procedural' ? 'Projects' : typeFilter === 'troubleshooting' ? 'Troubleshooting Flows' : 'Flow Library'}

{typeFilter === 'procedural' ? 'Step-by-step projects and runbooks' : typeFilter === 'troubleshooting' ? 'Branching decision flows for troubleshooting' - : typeFilter === 'maintenance' - ? 'Scheduled maintenance procedures run across targets' - : 'Browse and start troubleshooting flows and projects'} + : 'Browse and start troubleshooting flows and projects'}

{canCreateTrees && ( @@ -376,7 +374,7 @@ export function TreeLibraryPage() { : 'text-muted-foreground hover:text-foreground' )} > - {t === 'all' ? 'All' : t === 'troubleshooting' ? 'Troubleshooting' : t === 'procedural' ? 'Projects' : 'Maintenance'} + {t === 'all' ? 'All' : t === 'troubleshooting' ? 'Troubleshooting' : 'Projects'} ))}