From c51f266ad78d5e657916e71c99642d17fb1d2db5 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 3 Feb 2026 15:26:09 -0800 Subject: [PATCH] fix(logs): use formatDuration utility and align file cards styling (#3125) --- .../file-download/file-download.tsx | 34 ++++++++----------- .../components/log-details/log-details.tsx | 3 +- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx index 74397b9bb..3dd05f8d8 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx @@ -104,14 +104,12 @@ function FileCard({ file, isExecutionFile = false, workspaceId }: FileCardProps) } return ( -
-
-
- - {file.name} - -
- +
+
+ + {file.name} + + {formatFileSize(file.size)}
@@ -142,20 +140,18 @@ export function FileCards({ files, isExecutionFile = false, workspaceId }: FileC } return ( -
+
Files ({files.length}) -
- {files.map((file, index) => ( - - ))} -
+ {files.map((file, index) => ( + + ))}
) } diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx index b0f79805a..43aa334e4 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx @@ -18,6 +18,7 @@ import { import { ScrollArea } from '@/components/ui/scroll-area' import { BASE_EXECUTION_CHARGE } from '@/lib/billing/constants' import { cn } from '@/lib/core/utils/cn' +import { formatDuration } from '@/lib/core/utils/formatting' import { filterHiddenOutputKeys } from '@/lib/logs/execution/trace-spans/trace-spans' import { ExecutionSnapshot, @@ -453,7 +454,7 @@ export const LogDetails = memo(function LogDetails({ Duration - {log.duration || '—'} + {formatDuration(log.duration, { precision: 2 }) || '—'}