diff --git a/.changeset/fn-6092-promote-button.md b/.changeset/fn-6092-promote-button.md new file mode 100644 index 0000000000..e8c4797bff --- /dev/null +++ b/.changeset/fn-6092-promote-button.md @@ -0,0 +1,5 @@ +--- +"@runfusion/fusion": patch +--- + +Right-align the task-card promote action at the end of the card action row. diff --git a/packages/dashboard/app/components/TaskCard.css b/packages/dashboard/app/components/TaskCard.css index 61518837ec..5afe995f06 100644 --- a/packages/dashboard/app/components/TaskCard.css +++ b/packages/dashboard/app/components/TaskCard.css @@ -800,6 +800,7 @@ gap: var(--space-xs); flex-shrink: 0; padding: var(--space-xs) var(--space-sm); + margin-left: auto; height: var(--card-chip-height); min-height: var(--card-chip-height); white-space: nowrap; diff --git a/packages/dashboard/app/components/__tests__/TaskCard.test.tsx b/packages/dashboard/app/components/__tests__/TaskCard.test.tsx index 09ae7eea16..5ed7e9a56d 100644 --- a/packages/dashboard/app/components/__tests__/TaskCard.test.tsx +++ b/packages/dashboard/app/components/__tests__/TaskCard.test.tsx @@ -4366,6 +4366,27 @@ describe("TaskCard mission badge", () => { } }); + it("right-aligns the promote action inside the card action row", () => { + const onPromote = vi.fn().mockResolvedValue(undefined); + const css = loadAllAppCssBaseOnly(); + + render( + , + ); + + const promoteButton = screen.getByTestId("card-promote-FN-781"); + const actionRow = promoteButton.closest(".card-action-row"); + + expect(actionRow).not.toBeNull(); + expect(actionRow?.contains(promoteButton)).toBe(true); + expect(css).toMatch(/\.card-promote-action\s*\{[^}]*margin-left:\s*auto;[^}]*\}/); + }); + it("calls onPromote without opening the card when promote is clicked", () => { const onPromote = vi.fn().mockResolvedValue(undefined); const onOpenDetail = vi.fn();