From e0be55ddf3188e710e55d955ca6d6f6846d5e484 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sun, 23 Aug 2026 22:16:15 +0000 Subject: [PATCH] fix(ci): preserve table paste success contract Refs: #4832 --- apps/desktop/src/components/objects/ObjectBrowser.vue | 2 +- .../src/components/objects/ObjectBrowserClipboard.spec.ts | 2 +- apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/components/objects/ObjectBrowser.vue b/apps/desktop/src/components/objects/ObjectBrowser.vue index 3388a31dc3..f1294969f7 100644 --- a/apps/desktop/src/components/objects/ObjectBrowser.vue +++ b/apps/desktop/src/components/objects/ObjectBrowser.vue @@ -2357,7 +2357,7 @@ async function confirmPasteTable() { return; } const pasteFeedback = tablePasteFeedback(successCount, pasteFailCount, firstPasteError); - if (pasteFeedback.failedCount === 0) { + if (pasteFailCount === 0) { if (connectionStore.treeClipboard === clipboardAtPasteStart) { connectionStore.treeClipboard = null; } diff --git a/apps/desktop/src/components/objects/ObjectBrowserClipboard.spec.ts b/apps/desktop/src/components/objects/ObjectBrowserClipboard.spec.ts index cc9287b050..b1c028e614 100644 --- a/apps/desktop/src/components/objects/ObjectBrowserClipboard.spec.ts +++ b/apps/desktop/src/components/objects/ObjectBrowserClipboard.spec.ts @@ -23,7 +23,7 @@ describe("ObjectBrowser table clipboard context menu", () => { it("consumes only the clipboard used by a fully successful paste", () => { expect(objectBrowserSource).toMatch( - /async function confirmPasteTable\(\)[\s\S]*?const clipboardAtPasteStart = connectionStore\.treeClipboard[\s\S]*?const pasteFeedback = tablePasteFeedback\(successCount, pasteFailCount, firstPasteError\)[\s\S]*?if \(pasteFeedback\.failedCount === 0\)[\s\S]*?connectionStore\.treeClipboard === clipboardAtPasteStart[\s\S]*?connectionStore\.treeClipboard = null/, + /async function confirmPasteTable\(\)[\s\S]*?const clipboardAtPasteStart = connectionStore\.treeClipboard[\s\S]*?const pasteFeedback = tablePasteFeedback\(successCount, pasteFailCount, firstPasteError\)[\s\S]*?if \(pasteFailCount === 0\)[\s\S]*?connectionStore\.treeClipboard === clipboardAtPasteStart[\s\S]*?connectionStore\.treeClipboard = null/, ); }); diff --git a/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue b/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue index ca9d9b62b1..4d7ce6833a 100644 --- a/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue +++ b/apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue @@ -3938,7 +3938,7 @@ async function confirmPasteTable() { return; } const pasteFeedback = tablePasteFeedback(successCount, pasteFailCount, firstPasteError); - if (pasteFeedback.failedCount === 0) { + if (pasteFailCount === 0) { if (connectionStore.treeClipboard === clipboardAtPasteStart) { connectionStore.treeClipboard = null; }