From aef4c90107b5acce3d338831a30b7cb799b5f162 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Fri, 17 Apr 2026 09:03:34 +0530 Subject: [PATCH] refactor: update UI components for improved layout in assistant message, public chat footer, and report panel --- .../assistant-ui/assistant-message.tsx | 2 +- .../public-chat/public-chat-footer.tsx | 2 +- .../components/report-panel/pdf-viewer.tsx | 2 +- .../components/report-panel/report-panel.tsx | 18 +++++++++++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/surfsense_web/components/assistant-ui/assistant-message.tsx b/surfsense_web/components/assistant-ui/assistant-message.tsx index fd1f6518b..ef7e217ec 100644 --- a/surfsense_web/components/assistant-ui/assistant-message.tsx +++ b/surfsense_web/components/assistant-ui/assistant-message.tsx @@ -545,7 +545,7 @@ const AssistantMessageInner: FC = () => { )} -
+
diff --git a/surfsense_web/components/public-chat/public-chat-footer.tsx b/surfsense_web/components/public-chat/public-chat-footer.tsx index e341a9a0c..7d3263341 100644 --- a/surfsense_web/components/public-chat/public-chat-footer.tsx +++ b/surfsense_web/components/public-chat/public-chat-footer.tsx @@ -68,7 +68,7 @@ export function PublicChatFooter({ shareToken }: PublicChatFooterProps) { size="lg" onClick={handleCopyAndContinue} disabled={isCloning} - className="gap-2 rounded-full px-6 shadow-lg transition-all duration-200 hover:scale-[1.02] hover:shadow-xl hover:brightness-110 hover:bg-primary" + className="gap-2 rounded-full px-6 shadow-lg transition-al select-none duration-200 hover:scale-[1.02] hover:shadow-xl hover:brightness-110 hover:bg-primary" > {isCloning ? : } Copy and continue this chat diff --git a/surfsense_web/components/report-panel/pdf-viewer.tsx b/surfsense_web/components/report-panel/pdf-viewer.tsx index 828cadc4f..71b880324 100644 --- a/surfsense_web/components/report-panel/pdf-viewer.tsx +++ b/surfsense_web/components/report-panel/pdf-viewer.tsx @@ -285,7 +285,7 @@ export function PdfViewer({ pdfUrl, isPublic = false }: PdfViewerProps) { return (
{numPages > 0 && ( -
+
diff --git a/surfsense_web/components/report-panel/report-panel.tsx b/surfsense_web/components/report-panel/report-panel.tsx index 3115378b8..81f9365a3 100644 --- a/surfsense_web/components/report-panel/report-panel.tsx +++ b/surfsense_web/components/report-panel/report-panel.tsx @@ -18,6 +18,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { Spinner } from "@/components/ui/spinner"; import { useMediaQuery } from "@/hooks/use-media-query"; import { baseApiService } from "@/lib/apis/base-api.service"; import { authenticatedFetch } from "@/lib/auth-utils"; @@ -292,7 +293,7 @@ export function ReportPanelContent({ return ( <> {/* Action bar — always visible; buttons are disabled while loading */} -
+
{/* Copy button — hidden for Typst (resume) */} {reportContent?.content_type !== "typst" && ( @@ -307,7 +308,18 @@ export function ReportPanelContent({ )} - {/* Export dropdown */} + {/* Export — plain button for resume (typst), dropdown for others */} + {reportContent?.content_type === "typst" ? ( + + ) : (