From 5c77864b14317fd983b9c4be754d4a5938775ea8 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Mon, 4 May 2026 03:06:01 +0530 Subject: [PATCH] refactor(ui): standardize header styles across panels; adjust button sizes and spacing for improved layout consistency --- .../components/assistant-ui/chat-viewport.tsx | 3 +-- .../citation-panel/citation-panel.tsx | 17 +++++++++++------ .../components/editor-panel/editor-panel.tsx | 19 ++++++++++++------- .../components/report-panel/report-panel.tsx | 19 ++++++++++++------- surfsense_web/components/ui/fixed-toolbar.tsx | 2 +- 5 files changed, 37 insertions(+), 23 deletions(-) diff --git a/surfsense_web/components/assistant-ui/chat-viewport.tsx b/surfsense_web/components/assistant-ui/chat-viewport.tsx index c0684407e..a7cf227b4 100644 --- a/surfsense_web/components/assistant-ui/chat-viewport.tsx +++ b/surfsense_web/components/assistant-ui/chat-viewport.tsx @@ -9,8 +9,7 @@ const ChatScrollToBottom: FC = () => ( diff --git a/surfsense_web/components/citation-panel/citation-panel.tsx b/surfsense_web/components/citation-panel/citation-panel.tsx index ed8acd656..e9f14bf64 100644 --- a/surfsense_web/components/citation-panel/citation-panel.tsx +++ b/surfsense_web/components/citation-panel/citation-panel.tsx @@ -94,19 +94,24 @@ export const CitationPanelContent: FC = ({ chunkId, o return ( <> -
-
-

Citation

+
+
+

Citation

{onClose && ( - )}
-
+

{data?.title ?? (isLoading ? "Loading…" : `Chunk #${chunkId}`)} diff --git a/surfsense_web/components/editor-panel/editor-panel.tsx b/surfsense_web/components/editor-panel/editor-panel.tsx index eab07a91b..224f0b6a4 100644 --- a/surfsense_web/components/editor-panel/editor-panel.tsx +++ b/surfsense_web/components/editor-panel/editor-panel.tsx @@ -448,17 +448,22 @@ export function EditorPanelContent({ return ( <> {showDesktopHeader ? ( -

-
-

File

+
+
+

File

-
-
+

{displayTitle}

@@ -667,7 +672,7 @@ export function EditorPanelContent({ placeholder="Start writing..." editorVariant="default" allowModeToggle={false} - reserveToolbarSpace + reserveToolbarSpace={isEditing} defaultEditing={isEditing} className="**:[[role=toolbar]]:bg-sidebar!" // Render `[citation:N]` badges in view mode only. diff --git a/surfsense_web/components/report-panel/report-panel.tsx b/surfsense_web/components/report-panel/report-panel.tsx index 7fafc9c3b..53625b521 100644 --- a/surfsense_web/components/report-panel/report-panel.tsx +++ b/surfsense_web/components/report-panel/report-panel.tsx @@ -446,21 +446,26 @@ export function ReportPanelContent({ <> {showDesktopHeader ? ( <> - {/* Header — matches the editor panel "File" header pattern */} -
-

+ {/* Header — matches the Documents panel header pattern */} +
+

{isResume ? "Resume" : "Report"}

{onClose && ( - )}
{!isResume && ( -
+

{reportContent?.title || title} @@ -528,7 +533,7 @@ export function ReportPanelContent({ placeholder="Report content..." editorVariant="default" allowModeToggle={false} - reserveToolbarSpace + reserveToolbarSpace={isEditing} defaultEditing={isEditing} className="[&_[role=toolbar]]:!bg-sidebar" // Show citation badges in view mode; raw `[citation:N]` diff --git a/surfsense_web/components/ui/fixed-toolbar.tsx b/surfsense_web/components/ui/fixed-toolbar.tsx index 40677e777..e11fae861 100644 --- a/surfsense_web/components/ui/fixed-toolbar.tsx +++ b/surfsense_web/components/ui/fixed-toolbar.tsx @@ -14,7 +14,7 @@ export function FixedToolbar({ return (