From 28af4ade8026b235f1245b031b1538d7a4fbdcc4 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Mon, 24 Nov 2025 17:36:02 -0300 Subject: [PATCH 1/2] Show uploading status (#492) --- frontend/app/chat/_components/chat-input.tsx | 1 + frontend/app/chat/_components/file-preview.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/app/chat/_components/chat-input.tsx b/frontend/app/chat/_components/chat-input.tsx index 406ee10a..29b081c5 100644 --- a/frontend/app/chat/_components/chat-input.tsx +++ b/frontend/app/chat/_components/chat-input.tsx @@ -350,6 +350,7 @@ export const ChatInput = forwardRef( onClear={() => { onFileSelected(null); }} + isUploading={isUploading} /> )} diff --git a/frontend/app/chat/_components/file-preview.tsx b/frontend/app/chat/_components/file-preview.tsx index 482a505c..95349b24 100644 --- a/frontend/app/chat/_components/file-preview.tsx +++ b/frontend/app/chat/_components/file-preview.tsx @@ -1,10 +1,11 @@ -import { X } from "lucide-react"; +import { Loader2, X } from "lucide-react"; import Image from "next/image"; import { Button } from "@/components/ui/button"; interface FilePreviewProps { uploadedFile: File; onClear: () => void; + isUploading?: boolean; } const formatFileSize = (bytes: number): string => { @@ -22,12 +23,14 @@ const getFilePreviewUrl = (file: File): string => { return ""; }; -export const FilePreview = ({ uploadedFile, onClear }: FilePreviewProps) => { +export const FilePreview = ({ uploadedFile, onClear, isUploading = false }: FilePreviewProps) => { return (
{/* File Image Preview */}
- {getFilePreviewUrl(uploadedFile) ? ( + {isUploading ? ( + + ) : getFilePreviewUrl(uploadedFile) ? ( File preview Date: Mon, 24 Nov 2025 17:37:42 -0300 Subject: [PATCH 2/2] fix: show files only if chat context files exist (#491) * Show files only when existent * Fixed formatting --- frontend/components/navigation.tsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/frontend/components/navigation.tsx b/frontend/components/navigation.tsx index 773117fb..4efd1403 100644 --- a/frontend/components/navigation.tsx +++ b/frontend/components/navigation.tsx @@ -472,19 +472,15 @@ export function Navigation({ )}
-
-
-

- Files -

-
-
- {(newConversationFiles?.length ?? 0) === 0 ? ( -
- No documents yet -
- ) : ( - newConversationFiles?.map((file, index) => ( + {(newConversationFiles?.length ?? 0) !== 0 && ( +
+
+

+ Files +

+
+
+ {newConversationFiles?.map((file, index) => (
- )) - )} + ))} +
-
+ )}
)}