Merge current master into Slack form custody

Preserve the task composer layout fix. Its UI-only source changes do not
intersect the qualified server, Cloud, or local quiet-test paths.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '02bfe71a6bbd7c5676cb7e72778b361c5bc72765':
  fix(ui): keep new-task composer stable during submission (#20365)
This commit is contained in:
DottaandPaperclip committed 2026-11-09 16:00:56 -06:00
commit af414124f0
2 files changed
+12 -4

No files matched your search

+11 -3
View File
@@ -1503,22 +1503,30 @@ describe("NewIssueDialog", () => {
act(() => root.unmount());
});
it("shows the create-task loading state only in the submit button", async () => {
it.each([
{ name: "description only", defaults: { description: "Pending task" } },
{ name: "explicit title", defaults: { title: "Pending task" } },
{ name: "sub-task", defaults: { description: "Pending task", parentId: "parent-1", parentTitle: "Parent task" } },
])("keeps the composer layout stable while submitting a task with $name", async ({ defaults }) => {
mockIssuesApi.create.mockReturnValue(new Promise(() => undefined));
dialogState.newIssueDefaults = { title: "Pending task" };
dialogState.newIssueDefaults = defaults;
const { root } = renderDialog(container);
await flush();
const submitButton = Array.from(container.querySelectorAll("button"))
.find((button) => button.getAttribute("aria-label") === "Create task");
.find((button) => button.getAttribute("data-testid") === "task-chat-composer-send");
expect(submitButton).not.toBeUndefined();
const composer = container.querySelector(".paperclip-task-chat-composer")!;
const sections = Array.from(composer.children);
await act(async () => {
submitButton!.dispatchEvent(new MouseEvent("click", { bubbles: true }));
});
await flush();
expect(mockIssuesApi.create).toHaveBeenCalledTimes(1);
expect(Array.from(composer.children)).toEqual(sections);
expect(submitButton?.querySelector(".animate-spin")).not.toBeNull();
expect(submitButton?.getAttribute("aria-busy")).toBe("true");
expect(container.textContent).not.toContain("Creating issue");
+1 -1
View File
@@ -1467,7 +1467,7 @@ function AccountNewIssueDialog({ ignoreDefaults }: { ignoreDefaults: boolean })
runSettings: composerSettings,
onRunSettingsChange: setComposerSettings,
header:
hasTitle || isSubIssueMode || durableCreate.pending || resendError ? (
hasTitle || isSubIssueMode || (durableCreate.pending && durableCreate.status !== "sending") || resendError ? (
<div className="mb-3 flex flex-col gap-2 text-xs">
{durableCreate.pending && durableCreate.status !== "sending" ? (
<PendingSendNotice