From 4dcce63bce2f5176b839c6975ba4f23cce60dedc Mon Sep 17 00:00:00 2001 From: Andrew Beal Date: Tue, 4 Nov 2025 22:51:22 +0000 Subject: [PATCH] fix: improve mobile UI layout and interaction handling - Add mobile-specific height constraints for input buttons - Fix message alignment to left for better readability - Change click to mousedown for better mobile responsiveness - Adjust top bar grid columns for mobile layout - Update view type identifier to 'ai-agent-main-view' - Standardize quote style to double quotes across config files --- Components/ChatArea.svelte | 2 + Components/ChatInput.svelte | 16 ++++++++ Components/ChatSearchResults.svelte | 34 ++++++++------- Components/TopBar.svelte | 8 ++++ Components/UserInstruction.svelte | 6 ++- Views/MainView.ts | 2 +- esbuild.config.mjs | 2 - styles.css | 4 +- vitest.config.ts | 64 ++++++++++++++--------------- 9 files changed, 85 insertions(+), 53 deletions(-) diff --git a/Components/ChatArea.svelte b/Components/ChatArea.svelte index ba96b86..4331616 100644 --- a/Components/ChatArea.svelte +++ b/Components/ChatArea.svelte @@ -228,6 +228,7 @@ .message-container { display: flex; + text-align: left; margin: 0; } @@ -270,6 +271,7 @@ } .streaming-content { + justify-content: left; min-height: 1em; /* Ensure the element exists for binding */ } diff --git a/Components/ChatInput.svelte b/Components/ChatInput.svelte index e945e05..87a911e 100644 --- a/Components/ChatInput.svelte +++ b/Components/ChatInput.svelte @@ -347,6 +347,10 @@ transition-duration: 0.5s; } + :global(.is-mobile) #user-instruction-button { + max-height: 2rem; + } + #user-instruction-button.instruction-active { box-shadow: 0px 0px 4px 1px var(--color-accent); } @@ -374,6 +378,10 @@ white-space: pre-wrap; } + :global(.is-mobile) #input-field { + align-content: end; + } + #input-field:focus { border-color: var(--color-accent); box-shadow: 0px 0px 4px 1px var(--color-accent); @@ -416,6 +424,10 @@ transition-duration: 0.5s; } + :global(.is-mobile) #edit-mode-button { + max-height: 2rem; + } + #submit-button { grid-row: 3; grid-column: 8; @@ -427,6 +439,10 @@ background-color: var(--interactive-accent); } + :global(.is-mobile) #submit-button { + max-height: 2rem; + } + #submit-button:not(:disabled):hover { cursor: pointer; background-color: var(--interactive-accent-hover); diff --git a/Components/ChatSearchResults.svelte b/Components/ChatSearchResults.svelte index f58eb20..5334168 100644 --- a/Components/ChatSearchResults.svelte +++ b/Components/ChatSearchResults.svelte @@ -1,11 +1,11 @@