From 8de3b4d03348c45225aa0c5228740f60b55a42e9 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 27 Jul 2026 17:32:52 +0800 Subject: [PATCH] fix: prevent the agent build draft UI from flashing during apply (#39642) --- .../configure/__tests__/page.spec.tsx | 91 ++++++++++++++++++- .../use-agent-configure-build-draft.ts | 25 +++-- 2 files changed, 105 insertions(+), 11 deletions(-) diff --git a/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx b/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx index 4c971ea3cdb..08152cbd89e 100644 --- a/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx +++ b/web/features/agent-v2/agent-detail/configure/__tests__/page.spec.tsx @@ -356,12 +356,14 @@ vi.mock('../components/orchestrate/build-draft-bar', () => ({ changeSummary?: unknown changesCount: number disabled?: boolean + isApplying?: boolean onApply: () => void onDiscard: () => void }) => (
{`changes:${props.changesCount}`} -