From 42c8c85fd5eb1634439366053a19ed41e94f3ed8 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Wed, 18 Feb 2026 12:13:59 -0500 Subject: [PATCH] feat: replace Show Drafts checkbox with Drafts tab in Flow Library - Remove the out-of-place checkbox; add 'Drafts' as a tab alongside All | Troubleshooting | Projects | Maintenance - Drafts tab sets showDrafts=true + typeFilter='all' so the API filter still works correctly via include_drafts - Move SortDropdown to the right side next to ViewToggle, so both secondary controls are grouped together Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/TreeLibraryPage.tsx | 43 ++++++++++++++------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/frontend/src/pages/TreeLibraryPage.tsx b/frontend/src/pages/TreeLibraryPage.tsx index ff73f9d9..3a2c1610 100644 --- a/frontend/src/pages/TreeLibraryPage.tsx +++ b/frontend/src/pages/TreeLibraryPage.tsx @@ -326,35 +326,40 @@ export function TreeLibraryPage() { {/* View Controls */}
-
-
- {(['all', 'troubleshooting', 'procedural', 'maintenance'] as const).map((t) => ( + {/* Type filter tabs — includes Drafts as a first-class filter */} +
+ {(['all', 'troubleshooting', 'procedural', 'maintenance', 'drafts'] as const).map((t) => { + const isActive = t === 'drafts' ? showDrafts && typeFilter === 'all' : !showDrafts && typeFilter === t + return ( - ))} -
- - + ) + })} +
+ + {/* Right controls: sort + view toggle */} +
+ +
-