Revert "fix(dashboard): stop mobile send-button double-fire that aborted chats"

This reverts commit 394b1a655a.
This commit is contained in:
gsxdsm
2026-05-06 20:02:02 -07:00
parent beb0a1a189
commit ca047a714a
4 changed files with 0 additions and 57 deletions

View File

@@ -1998,15 +1998,6 @@ export function ChatView({ projectId, addToast }: ChatViewProps) {
if (typeof window === "undefined" || window.innerWidth > 768) return;
event.preventDefault();
if (event.pointerType && event.pointerType !== "mouse") {
// On mobile, both onPointerDown and onTouchStart fire
// for a quick tap. Without this guard handleSend runs
// twice — the second call closes the first's stream
// (useChat.ts: streamRef.current.close()) and the
// server-side beginGeneration aborts the in-flight
// generation, leaving the chat with no output. A
// long-press doesn't fire both events the same way,
// which is why holding the button "fixes" sending.
if (handledMobileSendRef.current) return;
handledMobileSendRef.current = true;
markPreserveComposerFocus();
focusComposerInput();
@@ -2019,7 +2010,6 @@ export function ChatView({ projectId, addToast }: ChatViewProps) {
onTouchStart={(event) => {
if (typeof window === "undefined" || window.innerWidth > 768) return;
event.preventDefault();
if (handledMobileSendRef.current) return;
handledMobileSendRef.current = true;
markPreserveComposerFocus();
focusComposerInput();