From 5812b43de5419d418dcb241fb21ae5225dfd5149 Mon Sep 17 00:00:00 2001 From: Molecule AI Triage Operator Date: Sat, 18 Apr 2026 01:22:08 +0000 Subject: [PATCH] =?UTF-8?q?fix(gate-6):=20reconcile=20DetailsTab.tsx=20imp?= =?UTF-8?q?ort=20=E2=80=94=20merge=20useRef=20(#878)=20with=20useId/cloneE?= =?UTF-8?q?lement=20(#875)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #878 landed before this branch and added useRef + deleteButtonRef focus- management to DetailsTab.tsx. This commit combines that import with the useId/cloneElement import added here, and preserves the Field component htmlFor/id wiring from this PR unchanged. Mechanical conflict resolution by triage-agent; no logic changes. Co-Authored-By: Claude Sonnet 4.6 --- canvas/src/components/tabs/DetailsTab.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/canvas/src/components/tabs/DetailsTab.tsx b/canvas/src/components/tabs/DetailsTab.tsx index 4e30b97d..e49e1419 100644 --- a/canvas/src/components/tabs/DetailsTab.tsx +++ b/canvas/src/components/tabs/DetailsTab.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState, useEffect, useCallback, useId, cloneElement, type ReactElement } from "react"; +import { useState, useEffect, useCallback, useRef, useId, cloneElement, type ReactElement } from "react"; import { api } from "@/lib/api"; import { useCanvasStore, type WorkspaceNodeData } from "@/store/canvas"; import { StatusDot } from "../StatusDot"; @@ -36,6 +36,8 @@ export function DetailsTab({ workspaceId, data }: Props) { const updateNodeData = useCanvasStore((s) => s.updateNodeData); const removeNode = useCanvasStore((s) => s.removeNode); const selectNode = useCanvasStore((s) => s.selectNode); + // Ref for the "Delete Workspace" trigger — Cancel returns focus here + const deleteButtonRef = useRef(null); useEffect(() => { setName(data.name); @@ -255,7 +257,7 @@ export function DetailsTab({ workspaceId, data }: Props) { )} {confirmDelete ? ( -
+
) : (