fix(FN-xxx): send quick chat message on first mobile tap

This commit is contained in:
gsxdsm
2026-05-01 06:48:13 -07:00
parent ecabab86ed
commit 72dffe4f33
3 changed files with 38 additions and 0 deletions

View File

@@ -2138,6 +2138,29 @@ describe("QuickChatFAB", () => {
});
});
it("sends on first touch tap on mobile without requiring a second tap", async () => {
mockMobileVisualViewport({
innerHeight: 800,
vvHeight: 800,
});
render(<QuickChatFAB addToast={addToast} open={true} onOpenChange={vi.fn()} projectId="proj-123" />);
const input = await screen.findByTestId("quick-chat-input");
await waitFor(() => {
expect(input).not.toBeDisabled();
});
fireEvent.change(input, { target: { value: "send from touch" } });
const sendButton = screen.getByTestId("quick-chat-send");
fireEvent.touchStart(sendButton);
await waitFor(() => {
expect(mockStreamChatResponse).toHaveBeenCalledTimes(1);
});
});
it("does not subscribe to keyboard tracking while panel is closed", async () => {
const { mockVV } = mockMobileVisualViewport({
innerHeight: 800,