From b304d7a0d4b327611c880dff86268acceeb5de26 Mon Sep 17 00:00:00 2001 From: Jono Kemball Date: Fri, 17 Apr 2026 10:26:12 +1200 Subject: [PATCH 1/6] Fix mobile composer touch behavior - Use coarse-pointer detection to switch Enter handling - Increase composer text size on mobile - Surface sidebar actions on touch devices --- .../src/components/ComposerPromptEditor.tsx | 4 ++-- apps/web/src/components/Sidebar.tsx | 4 ++-- apps/web/src/components/chat/ChatComposer.tsx | 18 +++++++++++++++--- apps/web/src/hooks/useMediaQuery.ts | 5 +++++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/ComposerPromptEditor.tsx b/apps/web/src/components/ComposerPromptEditor.tsx index 8113099638e..a57edf35677 100644 --- a/apps/web/src/components/ComposerPromptEditor.tsx +++ b/apps/web/src/components/ComposerPromptEditor.tsx @@ -1624,7 +1624,7 @@ function ComposerPromptEditorInner({ contentEditable={ 0 ? null : ( -
+
{placeholder}
) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 9939833a951..cbd9110ae97 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -1941,7 +1941,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec ? "Remote project" : "Available in multiple environments" } - className="pointer-events-none absolute top-1 right-1.5 inline-flex size-5 items-center justify-center rounded-md text-muted-foreground/50 transition-opacity duration-150 group-hover/project-header:opacity-0 group-focus-within/project-header:opacity-0" + className="pointer-events-none absolute top-1 right-1.5 inline-flex size-5 items-center justify-center rounded-md text-muted-foreground/50 transition-opacity duration-150 pointer-coarse:opacity-0 group-hover/project-header:opacity-0 group-focus-within/project-header:opacity-0" /> } > @@ -1955,7 +1955,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec +
- ) : null} + )}
{composerMenuOpen && !isComposerApprovalState && ( @@ -1801,7 +1901,8 @@ export const ChatComposer = memo(
)} - {!isComposerApprovalState && + {!isComposerCollapsedMobile && + !isComposerApprovalState && pendingUserInputs.length === 0 && composerImages.length > 0 && (
@@ -1904,7 +2005,7 @@ export const ChatComposer = memo(
{/* Bottom toolbar */} - {activePendingApproval ? ( + {isComposerCollapsedMobile ? null : activePendingApproval ? (
e.preventDefault()} disabled={ pendingAction.isResponding || (pendingAction.isLastQuestion ? !pendingAction.isComplete : !pendingAction.canAdvance) @@ -128,6 +129,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ type="submit" size="sm" className={cn("rounded-full", compact ? "h-9 px-3 sm:h-8" : "h-9 px-4 sm:h-8")} + onPointerDown={(e) => e.preventDefault()} disabled={isSendBusy || isConnecting} > {isConnecting || isSendBusy ? "Sending..." : "Refine"} @@ -141,6 +143,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ type="submit" size="sm" className="h-9 rounded-l-full rounded-r-none px-4 sm:h-8" + onPointerDown={(e) => e.preventDefault()} disabled={isSendBusy || isConnecting} > {isConnecting || isSendBusy ? "Sending..." : "Implement"} @@ -176,6 +179,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({