From 95415e2999dfa30c8026403e07b56a02d3e865fe Mon Sep 17 00:00:00 2001 From: Dotta Date: Thu, 2 Jul 2026 00:01:49 +0000 Subject: [PATCH] Fix assistant chat preset composer hint --- ui/src/components/AssistantChat.test.tsx | 22 +++++++++++++++++++++- ui/src/components/AssistantChat.tsx | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) 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(