From e6e9fc97217681bda5a8c6d88be9086f6e5e6f55 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 24 Sep 2026 06:08:48 +0200 Subject: [PATCH] fix: keep the composer's + and Integrations buttons visible at larger UI Scale on mobile (#30374) On a phone with UI Scale at 1.2x or higher, the model selector in the chat composer covers the Integrations button, so it cannot be seen or tapped. From 1.3x it covers the + button too, which leaves no way to attach files or open integrations. The model selector's width cap is rem based, so it grows with UI Scale, and the left button group could shrink to nothing, so the selector took the space first. The + and Integrations buttons now sit in a group that keeps its width, and only the toggled chips stay in the scrolling strip. When space runs out the model name truncates, and chips scroll as before. Measured in the real app at a 360px mobile viewport: before, Integrations is covered at 1.2x and both buttons at 1.3x and 1.5x; after, both are tappable at every scale, with the model name truncated (114px at 1.3x). Button positions at 1x and on desktop are unchanged to the pixel, with and without chips. Fixes #29989 --- src/lib/components/chat/MessageInput.svelte | 504 ++++++++++---------- 1 file changed, 251 insertions(+), 253 deletions(-) diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 5c5c67cca2..8d5107286e 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -2223,7 +2223,7 @@
-
+
- {/if} -
- {#if showWebSearchButton || showImageGenerationButton || showCodeInterpreterButton || showToolsButton || showSkillsButton || (toggleFilters && toggleFilters.length > 0)} - oauthRedirectHandler(tool, chatInputDraft)} - {onWebSearchToggle} - closeOnOutsideClick={integrationsMenuCloseOnOutsideClick} - onShowValves={(e) => { - const { type, id } = e; - selectedValvesType = type; - selectedValvesItemId = id; - showValvesModal = true; - integrationsMenuCloseOnOutsideClick = false; - }} - onClose={async () => { - await tick(); + oauthRedirectHandler(tool, chatInputDraft)} + {onWebSearchToggle} + closeOnOutsideClick={integrationsMenuCloseOnOutsideClick} + onShowValves={(e) => { + const { type, id } = e; + selectedValvesType = type; + selectedValvesItemId = id; + showValvesModal = true; + integrationsMenuCloseOnOutsideClick = false; + }} + onClose={async () => { + await tick(); - const chatInput = document.getElementById('chat-input'); - chatInput?.focus(); - }} + const chatInput = document.getElementById('chat-input'); + chatInput?.focus(); + }} + > + + + {/if} +
+ +
+ {#if selectedModelIds.length === 1 && $models.find((m) => m.id === selectedModelIds[0])?.has_user_valves} +
+ - + +
+ {/if} + +
+ {#if (selectedToolIds ?? []).length > 0} + + + {/if} - {#if selectedModelIds.length === 1 && $models.find((m) => m.id === selectedModelIds[0])?.has_user_valves} -
- - - -
+ {#if (selectedSkillIds ?? []).length > 0} + + + {/if} -
- {#if (selectedToolIds ?? []).length > 0} + {#each selectedFilterIds as filterId (filterId)} + {@const filter = toggleFilters.find((f) => f.id === filterId)} + {#if filter} - - - {/if} - - {#if (selectedSkillIds ?? []).length > 0} - - - - {/if} - - {#each selectedFilterIds as filterId (filterId)} - {@const filter = toggleFilters.find((f) => f.id === filterId)} - {#if filter} - - - - {/if} - {/each} - - {#if webSearchEnabled && showWebSearchButton} - - - - {/if} - - {#if imageGenerationEnabled && showImageGenerationButton} - - - - {/if} - - {#if codeInterpreterEnabled && showCodeInterpreterButton} - - - - {/if} - - {#each pendingOAuthTools as pendingTool (pendingTool.id)} - - {/each} - - - {#if showTerminalSelector} - {/if} -
+ {/each} + + {#if webSearchEnabled && showWebSearchButton} + + + + {/if} + + {#if imageGenerationEnabled && showImageGenerationButton} + + + + {/if} + + {#if codeInterpreterEnabled && showCodeInterpreterButton} + + + + {/if} + + {#each pendingOAuthTools as pendingTool (pendingTool.id)} + + + + {/each} + + + {#if showTerminalSelector} + + {/if}