From 58d7f5947727052abaa736f2c3cce8a77dc7139f Mon Sep 17 00:00:00 2001 From: dotta Date: Wed, 18 Mar 2026 14:21:21 -0500 Subject: [PATCH] Fix file tree clicks and redesign add-file UI on instructions tab - Add onClick handler to file row div in PackageFileTree so clicks anywhere on the row select the file (not just the inner button) - Replace "Add" button with compact "+" icon that reveals an inline input with Create/Cancel actions - Hide file name input until "+" is clicked to reduce visual clutter - Validate new file paths: reject ".." path traversal segments - Change placeholder from "docs/TOOLS.md" to "TOOLS.md" Co-Authored-By: Paperclip --- ui/src/components/PackageFileTree.tsx | 1 + ui/src/pages/AgentDetail.tsx | 83 +++++++++++++++++++-------- 2 files changed, 61 insertions(+), 23 deletions(-) diff --git a/ui/src/components/PackageFileTree.tsx b/ui/src/components/PackageFileTree.tsx index 76fbb04c..a99327e6 100644 --- a/ui/src/components/PackageFileTree.tsx +++ b/ui/src/components/PackageFileTree.tsx @@ -286,6 +286,7 @@ export function PackageFileTree({ style={{ paddingInlineStart: `${TREE_BASE_INDENT + depth * TREE_STEP_INDENT - 8}px`, }} + onClick={() => onSelectFile(node.path)} > {showCheckboxes && (