π OpenHands: AI-Driven Development
Fix issue #7826: [Bug]: Chat input box is too small (#7827)
OpenHands77e2416defc5
diff --git a/frontend/__tests__/components/chat/chat-input.test.tsx b/frontend/__tests__/components/chat/chat-input.test.tsxindex f3248371e3..299609aada 100644--- a/frontend/__tests__/components/chat/chat-input.test.tsx+++ b/frontend/__tests__/components/chat/chat-input.test.tsx@@ -217,6 +217,17 @@ describe("ChatInput", () => {expect(onImagePaste).toHaveBeenCalledWith([file]);});+ it("should use the default maxRows value", () => {+ // We can't directly test the maxRows prop as it's not exposed in the DOM+ // Instead, we'll verify the component renders with the default props+ render(<ChatInput onSubmit={onSubmitMock} />);+ const textarea = screen.getByRole("textbox");+ expect(textarea).toBeInTheDocument();++ // The actual verification of maxRows=16 is handled internally by the TextareaAutosize component+ // and affects how many rows the textarea can expand to+ });+it("should not submit when Enter is pressed during IME composition", async () => {const user = userEvent.setup();render(<ChatInput onSubmit={onSubmitMock} />);diff --git a/frontend/src/components/features/chat/chat-input.tsx b/frontend/src/components/features/chat/chat-input.tsxindex fbf3aff7aa..d3964a184f 100644--- a/frontend/src/components/features/chat/chat-input.tsx+++ b/frontend/src/components/features/chat/chat-input.tsx@@ -29,7 +29,7 @@ export function ChatInput({disabled,showButton = true,value,- maxRows = 4,+ maxRows = 16,onSubmit,onStop,onChange,