From 961a95c20f729051cf380b3c4755c611fd48e127 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Mon, 23 Mar 2026 04:48:23 +0000 Subject: [PATCH] fix: fully remove maintenance flow references from TreeLibraryPage Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/pages/TreeLibraryPage.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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'} ))}