From 2d40687fd9124abed63fa6804194aa8cd90dc167 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Tue, 10 Mar 2026 08:22:21 -0400 Subject: [PATCH] feat: wire PrepareSessionModal entry point in Flow Library Add "Prepare session" button (clipboard icon) to grid, list, and table views for procedural/maintenance flows. Clicking fetches tree intake fields and account members, then opens PrepareSessionModal. Co-Authored-By: Claude Opus 4.6 --- .../src/components/library/TreeGridView.tsx | 18 +++++++- .../src/components/library/TreeListView.tsx | 18 +++++++- .../src/components/library/TreeTableView.tsx | 18 +++++++- frontend/src/pages/TreeLibraryPage.tsx | 44 ++++++++++++++++++- 4 files changed, 94 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/library/TreeGridView.tsx b/frontend/src/components/library/TreeGridView.tsx index 2792c905..1973b6ee 100644 --- a/frontend/src/components/library/TreeGridView.tsx +++ b/frontend/src/components/library/TreeGridView.tsx @@ -1,5 +1,5 @@ import { Link } from 'react-router-dom' -import { Pencil, Globe, Lock, Trash2, GitBranch, FileText, Wrench, Star, Download } from 'lucide-react' +import { Pencil, Globe, Lock, Trash2, GitBranch, FileText, Wrench, Star, Download, ClipboardList } from 'lucide-react' import type { TreeListItem } from '@/types' import { TagBadges } from '@/components/common/TagBadges' import { StaggerList } from '@/components/common/StaggerList' @@ -10,6 +10,7 @@ import { getTreeEditorPath } from '@/lib/routing' interface TreeGridViewProps { trees: TreeListItem[] onStartSession: (treeId: string, treeType?: string) => void + onPrepareSession?: (tree: TreeListItem) => void onTagClick: (tag: string) => void onFolderCreated: (parentId?: string | null) => void onDeleteTree: (tree: TreeListItem) => void @@ -23,6 +24,7 @@ interface TreeGridViewProps { export function TreeGridView({ trees, onStartSession, + onPrepareSession, onTagClick, onDeleteTree, onForkTree, @@ -169,6 +171,20 @@ export function TreeGridView({ )} + {onPrepareSession && tree.tree_type !== 'troubleshooting' && ( + + )} )} + {onPrepareSession && tree.tree_type !== 'troubleshooting' && ( + + )} )} + {onPrepareSession && tree.tree_type !== 'troubleshooting' && ( + + )}