From 20bec57bccbede4a11d6ef1583252502edf63484 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Tue, 10 Feb 2026 19:39:15 -0500 Subject: [PATCH] fix: add missing delete button to table and list tree views The onDeleteTree prop was accepted but never used in TreeTableView and TreeListView. Now both views show a trash icon (permission-gated) matching the existing grid view behavior. Co-Authored-By: Claude Opus 4.6 --- .../src/components/library/TreeListView.tsx | 39 +++++++++++++------ .../src/components/library/TreeTableView.tsx | 39 +++++++++++++------ 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/library/TreeListView.tsx b/frontend/src/components/library/TreeListView.tsx index 0916843f..5ecc154a 100644 --- a/frontend/src/components/library/TreeListView.tsx +++ b/frontend/src/components/library/TreeListView.tsx @@ -1,5 +1,5 @@ import { Link } from 'react-router-dom' -import { Pencil, Globe, Lock, GitBranch, FileText } from 'lucide-react' +import { Pencil, Globe, Lock, GitBranch, FileText, Trash2 } from 'lucide-react' import type { TreeListItem } from '@/types' import { TagBadges } from '@/components/common/TagBadges' import { AddToFolderMenu } from './AddToFolderMenu' @@ -19,6 +19,7 @@ export function TreeListView({ trees, onStartSession, onTagClick, + onDeleteTree, onFolderCreated, onForkTree, }: TreeListViewProps) { @@ -94,17 +95,31 @@ export function TreeListView({ )} {canEditTree({ author_id: tree.author_id, account_id: tree.account_id }) && ( - - - + <> + + + + + )} + )}