From e7b1a0496663cfefea764b3573bf24bc7a82324d Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Tue, 14 Apr 2026 22:49:00 +0200 Subject: [PATCH] fix(ui): restrict tablo delete to admins, hide chat attachments and border - Only show trash icon on tablo cards/rows when user is admin - Comment out attachment button and file inputs in chat composer - Remove top border from chat composer - Add org logo to NavigationBar avatar Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/main/src/pages/tablos.tsx | 44 +++++++++++++----------- packages/chat-ui/src/components/chat.tsx | 21 +++++------ 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/apps/main/src/pages/tablos.tsx b/apps/main/src/pages/tablos.tsx index 87a51fe..66b59c4 100644 --- a/apps/main/src/pages/tablos.tsx +++ b/apps/main/src/pages/tablos.tsx @@ -128,16 +128,18 @@ function TabloCard({ {label} - + {tablo.is_admin && ( + + )} {/* Icon + name */} @@ -260,16 +262,18 @@ function TabloRow({ - + {tablo.is_admin && ( + + )} ); diff --git a/packages/chat-ui/src/components/chat.tsx b/packages/chat-ui/src/components/chat.tsx index e722234..a4e8549 100644 --- a/packages/chat-ui/src/components/chat.tsx +++ b/packages/chat-ui/src/components/chat.tsx @@ -15,10 +15,10 @@ import { Trash2, X, Paperclip, - Image as ImageIcon, - Smile, + // Image as ImageIcon, + // Smile, Upload, - Plus, + // Plus, Play, Pause, Mic, @@ -1156,12 +1156,12 @@ function ChatComposer({ const [value, setValue] = React.useState("") const [files, setFiles] = React.useState([]) const [isDragging, setIsDragging] = React.useState(false) - const [showAttachMenu, setShowAttachMenu] = React.useState(false) + // const [showAttachMenu, setShowAttachMenu] = React.useState(false) const { textareaRef, resize } = useAutoResize({ maxRows: 6 }) const { handleKeyDown: handleTypingKeyDown, stopTyping } = useTypingIndicator({ onTypingChange: onTyping }) - const fileInputRef = React.useRef(null) - const imageInputRef = React.useRef(null) + // const fileInputRef = React.useRef(null) + // const imageInputRef = React.useRef(null) const hasContent = value.trim().length > 0 || files.length > 0 const addFiles = React.useCallback((newFiles: FileList | File[]) => { @@ -1226,7 +1226,6 @@ function ChatComposer({ } if (imageFiles.length > 0) { addFiles(imageFiles) - setShowAttachMenu(false) } }, [addFiles] @@ -1247,7 +1246,6 @@ function ChatComposer({ setIsDragging(false) if (e.dataTransfer.files.length > 0) { addFiles(e.dataTransfer.files) - setShowAttachMenu(false) } }, [addFiles] @@ -1285,11 +1283,11 @@ function ChatComposer({ )} {/* Composer body — frosted glass */} -
+
{/* Input row */}
- {/* + button with attachment popout */} + {/* + button with attachment popout — disabled until file upload is implemented
- {/* Popout menu */} {showAttachMenu && (