diff --git a/apps/desktop/src/chat/ChatWidget.tsx b/apps/desktop/src/chat/ChatWidget.tsx
index bf4518e..56c5c96 100644
--- a/apps/desktop/src/chat/ChatWidget.tsx
+++ b/apps/desktop/src/chat/ChatWidget.tsx
@@ -332,28 +332,20 @@ export function ChatWidget({ ticketId }: ChatWidgetProps) {
)
}
- // Versao minimizada (recolhida)
+ // Versao minimizada (chip compacto igual web)
if (isMinimized) {
return (
-
+
)
diff --git a/src/components/tickets/ticket-chat-history.tsx b/src/components/tickets/ticket-chat-history.tsx
index abd9c26..1b66a06 100644
--- a/src/components/tickets/ticket-chat-history.tsx
+++ b/src/components/tickets/ticket-chat-history.tsx
@@ -54,6 +54,18 @@ type ChatSession = {
const MESSAGES_PER_PAGE = 20
+function formatDuration(minutes: number): string {
+ if (minutes < 60) {
+ return `${minutes} min`
+ }
+ const hours = Math.floor(minutes / 60)
+ const mins = minutes % 60
+ if (mins === 0) {
+ return `${hours}h`
+ }
+ return `${hours}h ${mins}min`
+}
+
function MessageAttachmentPreview({ attachment }: { attachment: { storageId: string; name: string; type: string | null } }) {
const getFileUrl = useAction(api.files.getUrl)
const [loading, setLoading] = useState(false)
@@ -147,7 +159,7 @@ function ChatSessionCard({ session, isExpanded, onToggle }: { session: ChatSessi
-
{session.messageCount} mensagens
-
-
{duration} min
+
{formatDuration(duration)}