diff --git a/ui/src/components/NewIssueDialog.test.tsx b/ui/src/components/NewIssueDialog.test.tsx index cf5fe5227a..b103b7eedd 100644 --- a/ui/src/components/NewIssueDialog.test.tsx +++ b/ui/src/components/NewIssueDialog.test.tsx @@ -797,6 +797,29 @@ describe("NewIssueDialog", () => { act(() => root.unmount()); }); + it("shows the create-task loading state only in the submit button", async () => { + mockIssuesApi.create.mockReturnValue(new Promise(() => undefined)); + dialogState.newIssueDefaults = { title: "Pending task" }; + + const { root } = renderDialog(container); + await flush(); + + const submitButton = Array.from(container.querySelectorAll("button")) + .find((button) => button.textContent?.includes("Create Task")); + expect(submitButton).not.toBeUndefined(); + + await act(async () => { + submitButton!.dispatchEvent(new MouseEvent("click", { bubbles: true })); + }); + await flush(); + + expect(submitButton?.textContent).toContain("Creating..."); + expect(submitButton?.getAttribute("aria-busy")).toBe("true"); + expect(container.textContent).not.toContain("Creating issue"); + + act(() => root.unmount()); + }); + it("submits Chinese, Japanese, and Hindi issue text without normalization", async () => { const title = "验证中文任务"; const description = [ diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx index 43a33acd9d..cfe630b871 100644 --- a/ui/src/components/NewIssueDialog.tsx +++ b/ui/src/components/NewIssueDialog.tsx @@ -2242,7 +2242,7 @@ export function NewIssueDialog() { > - Low-trust review agent. It can only act inside its assigned review boundary; issue, project, or run policy defines the concrete scope. + Low-trust review agent. It can only act inside its assigned review boundary; task, project, or run policy defines the concrete scope. ) : null} @@ -2259,16 +2259,11 @@ export function NewIssueDialog() { Discard Draft
-
- {createIssue.isPending ? ( - - - Creating issue... - - ) : createIssue.isError ? ( + {createIssue.isError ? ( +
{createIssueErrorMessage} - ) : null} -
+
+ ) : null}