From 52525688253975dbefb504a88d398097d4de93af Mon Sep 17 00:00:00 2001 From: dotta Date: Wed, 18 Mar 2026 07:09:10 -0500 Subject: [PATCH] Refine instructions tab: remove header/border, draggable panel, move Advanced below MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove "Instructions Bundle" header and border wrapper - Move "Advanced" collapsible section below the file browser / editor grid - Make the file browser column width draggable (180px–500px range) - Advanced section now uses a wider 3-column grid layout Co-Authored-By: Paperclip --- ui/src/pages/AgentDetail.tsx | 304 +++++++++++++++++++---------------- 1 file changed, 161 insertions(+), 143 deletions(-) diff --git a/ui/src/pages/AgentDetail.tsx b/ui/src/pages/AgentDetail.tsx index 49c7e2bd..22823e99 100644 --- a/ui/src/pages/AgentDetail.tsx +++ b/ui/src/pages/AgentDetail.tsx @@ -1509,6 +1509,8 @@ function PromptsTab({ } | null>(null); const [newFilePath, setNewFilePath] = useState(""); const [expandedDirs, setExpandedDirs] = useState>(new Set()); + const [filePanelWidth, setFilePanelWidth] = useState(260); + const containerRef = useRef(null); const [awaitingRefresh, setAwaitingRefresh] = useState(false); const lastFileVersionRef = useRef(null); @@ -1716,6 +1718,27 @@ function PromptsTab({ } : null); }, [bundle, isDirty, onCancelActionChange]); + const handleSeparatorDrag = useCallback((event: React.MouseEvent) => { + event.preventDefault(); + const startX = event.clientX; + const startWidth = filePanelWidth; + const onMouseMove = (moveEvent: MouseEvent) => { + const delta = moveEvent.clientX - startX; + const next = Math.max(180, Math.min(500, startWidth + delta)); + setFilePanelWidth(next); + }; + const onMouseUp = () => { + document.removeEventListener("mousemove", onMouseMove); + document.removeEventListener("mouseup", onMouseUp); + document.body.style.cursor = ""; + document.body.style.userSelect = ""; + }; + document.addEventListener("mousemove", onMouseMove); + document.addEventListener("mouseup", onMouseUp); + document.body.style.cursor = "col-resize"; + document.body.style.userSelect = "none"; + }, [filePanelWidth]); + if (!isLocal) { return (
@@ -1732,29 +1755,18 @@ function PromptsTab({ return (
-
-
-
-

Instructions Bundle

-

- Configure your agent's behavior with instructions -

-
-
- {bundle?.files.length ?? 0} files -
+ {(bundle?.warnings ?? []).length > 0 && ( +
+ {(bundle?.warnings ?? []).map((warning) => ( +
+ {warning} +
+ ))}
+ )} - {(bundle?.warnings ?? []).map((warning) => ( -
- {warning} -
- ))} - -
- -
-
+
+

Files

- -
- -
- - -
- - -
-
+ {/* Draggable separator */} +
+ +

{selectedOrEntryFile}

@@ -2004,6 +1901,127 @@ function PromptsTab({ )}
+ + + + + Advanced + + + + +
+ + +
+
+
+
); }