refactor: update UI components for improved layout in assistant message, public chat footer, and report panel

This commit is contained in:
Anish Sarkar 2026-04-17 09:03:34 +05:30
parent abf758997a
commit aef4c90107
4 changed files with 18 additions and 6 deletions

View file

@ -545,7 +545,7 @@ const AssistantMessageInner: FC = () => {
</div>
)}
<div className="aui-assistant-message-footer mt-1 mb-5 ml-2 flex items-center gap-2">
<div className="aui-assistant-message-footer mt-3 mb-5 ml-2 flex items-center gap-2">
<AssistantActionBar />
</div>
</CitationMetadataProvider>

View file

@ -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 ? <Spinner size="sm" /> : <Copy className="size-4" />}
Copy and continue this chat

View file

@ -285,7 +285,7 @@ export function PdfViewer({ pdfUrl, isPublic = false }: PdfViewerProps) {
return (
<div className="flex flex-col h-full">
{numPages > 0 && (
<div className={`flex items-center justify-center gap-2 px-4 py-2 border-b shrink-0 ${isPublic ? "bg-main-panel" : "bg-sidebar"}`}>
<div className={`flex items-center justify-center gap-2 px-4 py-2 border-b shrink-0 select-none ${isPublic ? "bg-main-panel" : "bg-sidebar"}`}>
<Button variant="ghost" size="icon" onClick={zoomOut} disabled={scale <= MIN_ZOOM} className="size-7">
<ZoomOutIcon className="size-4" />
</Button>

View file

@ -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 */}
<div className="flex items-center justify-between px-4 py-2 shrink-0">
<div className="flex h-14 items-center justify-between px-4 shrink-0">
<div className="flex items-center gap-2">
{/* Copy button — hidden for Typst (resume) */}
{reportContent?.content_type !== "typst" && (
@ -307,7 +308,18 @@ export function ReportPanelContent({
</Button>
)}
{/* Export dropdown */}
{/* Export — plain button for resume (typst), dropdown for others */}
{reportContent?.content_type === "typst" ? (
<Button
variant="outline"
size="sm"
onClick={() => handleExport("pdf")}
disabled={isLoading || !reportContent?.content || exporting !== null}
className={`h-8 min-w-[100px] px-3.5 py-4 text-[15px] ${btnBg} select-none`}
>
{exporting === "pdf" ? <Spinner size="xs" /> : "Download"}
</Button>
) : (
<DropdownMenu modal={insideDrawer ? false : undefined}>
<DropdownMenuTrigger asChild>
<Button
@ -328,10 +340,10 @@ export function ReportPanelContent({
onExport={handleExport}
exporting={exporting}
showAllFormats={!shareToken}
pdfOnly={reportContent?.content_type === "typst"}
/>
</DropdownMenuContent>
</DropdownMenu>
)}
{/* Version switcher — only shown when multiple versions exist */}
{versions.length > 1 && (