From 9608d1ce19a42d20e01241c1488f49bdf353cc92 Mon Sep 17 00:00:00 2001 From: OpenCode Assistant Date: Mon, 8 Dec 2025 05:15:33 +0000 Subject: [PATCH] Fix mobile layout button overflow in PromptInput Hide model selector and help dropdown on mobile when processing or when scroll-to-bottom button is visible to prevent button overflow on narrow screens. --- .../src/components/message/PromptInput.tsx | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/message/PromptInput.tsx b/frontend/src/components/message/PromptInput.tsx index 77d65c04..5c25c3df 100644 --- a/frontend/src/components/message/PromptInput.tsx +++ b/frontend/src/components/message/PromptInput.tsx @@ -7,6 +7,7 @@ import { useFileSearch } from '@/hooks/useFileSearch' import { useModelSelection } from '@/hooks/useModelSelection' import { useUserBash } from '@/stores/userBashStore' +import { useMobile } from '@/hooks/useMobile' import { ChevronDown } from 'lucide-react' import { CommandSuggestions } from '@/components/command/CommandSuggestions' @@ -449,6 +450,8 @@ export function PromptInput({ const { model: selectedModel, modelString } = useModelSelection(opcodeUrl, directory) const currentModel = modelString || '' + const isMobile = useMobile() + const hideSecondaryButtons = isMobile && (hasActiveStream || showScrollButton) useEffect(() => { const loadModelName = async () => { @@ -518,36 +521,40 @@ export function PromptInput({ > {isBashMode ? 'BASH' : currentMode.toUpperCase()} - - - - - - - - Keyboard Shortcuts - - - Cmd/Ctrl+Enter - Send message - - - @ - Mention files or agents - - - ! - Bash command mode - - - + {!hideSecondaryButtons && ( + + )} + {!hideSecondaryButtons && ( + + + + + + + Keyboard Shortcuts + + + Cmd/Ctrl+Enter - Send message + + + @ - Mention files or agents + + + ! - Bash command mode + + + + )}
{showScrollButton && (