diff --git a/ui/src/components/AssistantChat.test.tsx b/ui/src/components/AssistantChat.test.tsx index 7f463f4f440..507cbc32d50 100644 --- a/ui/src/components/AssistantChat.test.tsx +++ b/ui/src/components/AssistantChat.test.tsx @@ -73,7 +73,11 @@ vi.mock("./IssueChatThread", async () => { {(props.suppressIssueStatusNotices ?? props.preset === "assistant") ? "suppressed" : "visible"} - {props.composerHint} + + {props.composerHint === undefined && props.preset === "assistant" + ? "Enter to send · Shift+Enter for a new line" + : props.composerHint} + {String(Boolean(props.imageUploadHandler))} {String(Boolean(props.onAttachImage))} {draft} @@ -471,6 +475,22 @@ describe("AssistantChatView", () => { ); }); + it("allows the assistant preset default composer hint when no custom hint is provided", () => { + render( + {}} + />, + ); + + expect(container.querySelector('[data-testid="composer-hint"]')?.textContent).toBe( + "Enter to send · Shift+Enter for a new line", + ); + }); + it("renders assistant starter prompts without the large start-message placeholder", () => { render(