From bd1d1c42a769d45dedf3a56bdb688f2ddd5c5d6e Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Sun, 17 May 2026 02:57:00 +0530 Subject: [PATCH] refactor: adjust thread max width and update button sizes in ComposerAction for improved UI consistency --- .../[search_space_id]/new-chat/loading.tsx | 2 +- .../components/assistant-ui/thread.tsx | 109 +++++++++--------- surfsense_web/components/ui/switch.tsx | 2 +- 3 files changed, 55 insertions(+), 58 deletions(-) diff --git a/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx b/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx index e18100e6a..108671662 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/new-chat/loading.tsx @@ -5,7 +5,7 @@ export default function Loading() {
{ {
{/* Greeting positioned above the composer */}
-

+

{greeting}

@@ -892,11 +891,11 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false @@ -908,6 +907,22 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false Upload Files + {hasWebSearchTool && ( + { + event.preventDefault(); + toggleTool("web_search"); + }} + > + + Web Search + + + )} setConnectorDialogOpen(true)}> Manage Connectors @@ -1031,14 +1046,20 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false disableTooltip={toolsPopoverOpen} variant="ghost" size="icon" - className="size-[34px] rounded-full p-1 font-semibold text-xs dark:border-muted-foreground/15 hover:bg-accent hover:text-accent-foreground" + className="size-9 rounded-full p-1 font-semibold text-xs text-muted-foreground dark:border-muted-foreground/15 hover:bg-accent hover:text-accent-foreground" aria-label="More actions" data-joyride="connector-icon" > - + - + event.preventDefault()} + > openUploadDialog()}> Upload Files @@ -1047,6 +1068,26 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false Take a screenshot + {hasWebSearchTool && ( + { + event.preventDefault(); + toggleTool("web_search"); + }} + className={cn( + "hover:bg-accent hover:text-accent-foreground", + isWebSearchEnabled && "text-primary" + )} + > + + Web Search + + + )} @@ -1161,50 +1202,6 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false )} - {hasWebSearchTool && ( - - )}
{!hasModelConfigured && (
@@ -1230,13 +1227,13 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false variant="default" size="icon" className={cn( - "aui-composer-send size-8 rounded-full", + "aui-composer-send size-9 rounded-full", isSendDisabled && "cursor-not-allowed opacity-50" )} aria-label="Send message" disabled={isSendDisabled} > - + @@ -1247,10 +1244,10 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false type="button" variant="default" size="icon" - className="aui-composer-cancel size-8 rounded-full" + className="aui-composer-cancel size-9 rounded-full" aria-label="Stop generating" > - + diff --git a/surfsense_web/components/ui/switch.tsx b/surfsense_web/components/ui/switch.tsx index de2c35fc0..2ebd7bfd8 100644 --- a/surfsense_web/components/ui/switch.tsx +++ b/surfsense_web/components/ui/switch.tsx @@ -19,7 +19,7 @@ const Switch = React.forwardRef< >