From f08ab695865ae88f16bdccfa36f7830c95344ddb Mon Sep 17 00:00:00 2001 From: kenny lopez Date: Thu, 23 Jul 2026 11:04:25 -0700 Subject: [PATCH] Align catalog publish option with dialog footer --- .../agents/ui/AgentDefinitionDialogFooter.tsx | 34 +++++++++---------- desktop/tests/e2e/agents.spec.ts | 11 +++--- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/desktop/src/features/agents/ui/AgentDefinitionDialogFooter.tsx b/desktop/src/features/agents/ui/AgentDefinitionDialogFooter.tsx index 7d847bdc0..2c7adc741 100644 --- a/desktop/src/features/agents/ui/AgentDefinitionDialogFooter.tsx +++ b/desktop/src/features/agents/ui/AgentDefinitionDialogFooter.tsx @@ -35,6 +35,23 @@ export function AgentDefinitionDialogFooter({ {submitBlockReason}

) : null} + {showPublishUpdates ? ( + + ) : null}
@@ -58,23 +75,6 @@ export function AgentDefinitionDialogFooter({ ? "Uploading..." : submitLabel} - {showPublishUpdates ? ( - - ) : null}
); diff --git a/desktop/tests/e2e/agents.spec.ts b/desktop/tests/e2e/agents.spec.ts index ead8925fd..d84410d0a 100644 --- a/desktop/tests/e2e/agents.spec.ts +++ b/desktop/tests/e2e/agents.spec.ts @@ -1388,13 +1388,14 @@ This deliberately long fenced-code example must not establish the minimum width "data-state", "unchecked", ); - const [saveButtonBox, publishUpdatesCheckboxBox] = await Promise.all([ - editDialog.getByRole("button", { name: "Save changes" }).boundingBox(), + const [cancelButtonBox, publishUpdatesCheckboxBox] = await Promise.all([ + editDialog.getByRole("button", { name: "Cancel" }).boundingBox(), publishUpdatesCheckbox.boundingBox(), ]); - expect(publishUpdatesCheckboxBox?.x ?? 0).toBeGreaterThan( - (saveButtonBox?.x ?? 0) + (saveButtonBox?.width ?? 0), - ); + expect( + (publishUpdatesCheckboxBox?.x ?? 0) + + (publishUpdatesCheckboxBox?.width ?? 0), + ).toBeLessThan(cancelButtonBox?.x ?? 0); await editDialog.getByRole("button", { name: "Save changes" }).click(); await expect(editDialog).toHaveCount(0);