From cb1fa12a88a4bce76eab1dedcc7ff8e7a4016afe Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 13:56:44 +0000 Subject: [PATCH 1/3] feat: Implement comprehensive UI and functionality enhancements This commit addresses a batch of eight specific improvements across the application, enhancing mobile usability, search functionality, and overall user experience. Key changes include: - Enabled the mobile send button and connected it to the chat submission logic. - Removed map zoom controls and the header search icon on mobile viewports for a cleaner interface. - Improved the image attachment functionality by allowing text to be submitted alongside an image and fixing a UI obstruction on mobile. - Added animations to the suggestion pop-ups to make them feel more responsive. - Reduced the size of the QCX logo in the header. - Adjusted the suggestion trigger to activate after two words instead of three. - Reversed the order of Tavily search results to display the most relevant links first. - Updated relevant end-to-end tests to reflect these functional changes. --- components/chat-panel.tsx | 6 +++--- components/chat.tsx | 6 +++++- components/header.tsx | 7 +++---- components/map/mapbox-map.tsx | 4 +++- components/mobile-icons-bar.tsx | 5 +++-- components/search-related.tsx | 2 +- lib/agents/tools/search.tsx | 2 +- tests/map.spec.ts | 6 ++++++ tests/mobile.spec.ts | 4 ++-- 9 files changed, 27 insertions(+), 15 deletions(-) diff --git a/components/chat-panel.tsx b/components/chat-panel.tsx index f05b5bb4..da82e5c7 100644 --- a/components/chat-panel.tsx +++ b/components/chat-panel.tsx @@ -89,7 +89,7 @@ export const ChatPanel = forwardRef(({ messages, i const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() - if (!input && !selectedFile) { + if (!input.trim() && !selectedFile) { return } @@ -137,7 +137,7 @@ export const ChatPanel = forwardRef(({ messages, i } const wordCount = value.trim().split(/\s+/).filter(Boolean).length - if (wordCount < 3) { + if (wordCount < 2) { setSuggestions(null) return } @@ -195,7 +195,7 @@ export const ChatPanel = forwardRef(({ messages, i )} > {selectedFile && ( -
+
{selectedFile.name} diff --git a/components/chat.tsx b/components/chat.tsx index f9352b67..04e27ac6 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -41,6 +41,10 @@ export function Chat({ id }: ChatProps) { const handleAttachment = () => { chatPanelRef.current?.handleAttachmentClick(); }; + + const handleMobileSubmit = () => { + chatPanelRef.current?.submitForm(); + }; useEffect(() => { setShowEmptyScreen(messages.length === 0) @@ -106,7 +110,7 @@ export function Chat({ id }: ChatProps) { {activeView ? : }
- +
{ Logo

@@ -66,7 +66,6 @@ export const Header = () => { {/* Mobile menu buttons */}
-
- diff --git a/components/search-related.tsx b/components/search-related.tsx index f4aa2c8d..d4a58b08 100644 --- a/components/search-related.tsx +++ b/components/search-related.tsx @@ -60,7 +60,7 @@ export const SearchRelated: React.FC = ({ {data?.items ?.filter(item => item?.query !== '') .map((item, index) => ( -
+
-
-
- )}
(({ messages, i 'absolute top-1/2 transform -translate-y-1/2 left-3' )} onClick={handleAttachmentClick} - data-testid="attachment-button" + data-testid="desktop-attachment-button" > @@ -303,6 +291,18 @@ export const ChatPanel = forwardRef(({ messages, i {/* Suggestions are now handled by the parent component (chat.tsx) as an overlay */}
+ {selectedFile && ( +
+
+ + {selectedFile.name} + + +
+
+ )}
) }) diff --git a/components/history-container.tsx b/components/history-container.tsx index 0bf37705..7244b0a0 100644 --- a/components/history-container.tsx +++ b/components/history-container.tsx @@ -5,9 +5,7 @@ type HistoryContainerProps = { location: 'sidebar' | 'header' } -const HistoryContainer: React.FC = async ({ - location -}) => { +const HistoryContainer: React.FC = ({ location }) => { return (