From ebede74ca0855c127fcb50e69ee1bb2690414ecc Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 10 May 2026 12:02:51 +0200 Subject: [PATCH] =?UTF-8?q?fix(documents):=20FolderActionsMenu=20=E2=80=94?= =?UTF-8?q?=20disable=20on=20pending=20+=20skip=20no-op=20rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass loading={deleteMutation.isPending} to ConfirmationDialog so a second tap on Delete doesn't dispatch a concurrent DELETE. Also disable the rename Save button when the name hasn't changed, so an accidental click doesn't fire a no-op PATCH and a misleading "Folder renamed" toast. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/documents/folder-actions-menu.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/documents/folder-actions-menu.tsx b/src/components/documents/folder-actions-menu.tsx index bdbf593e..0f537448 100644 --- a/src/components/documents/folder-actions-menu.tsx +++ b/src/components/documents/folder-actions-menu.tsx @@ -104,6 +104,7 @@ export function FolderActionsMenu({ selectedFolderId, onAfterDelete }: FolderAct title="Delete folder?" description="Subfolders and documents inside will move up to the parent. The folder itself is removed." confirmLabel="Delete folder" + loading={deleteMutation.isPending} onConfirm={async () => { try { await deleteMutation.mutateAsync(selectedFolderId as string); @@ -181,7 +182,9 @@ export function FolderActionsMenu({ selectedFolderId, onAfterDelete }: FolderAct Cancel