Skip to content

Commit 8c53a45

Browse files
committed
fix(logs): relax fileSchema so execution logs with files render again
1 parent 49713f8 commit 8c53a45

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

  • apps/sim
    • app/workspace/[workspaceId]/logs/components/log-details/components/file-download
    • lib/api/contracts

apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { createLogger } from '@sim/logger'
55
import { ArrowDown } from 'lucide-react'
66
import { useRouter } from 'next/navigation'
77
import { Button, Loader } from '@/components/emcn'
8+
import { cn } from '@/lib/core/utils/cn'
89
import { extractWorkspaceIdFromExecutionKey, getViewerUrl } from '@/lib/uploads/utils/file-utils'
910

1011
const logger = createLogger('FileCards')
@@ -16,8 +17,8 @@ interface FileData {
1617
type: string
1718
key: string
1819
url: string
19-
uploadedAt: string
20-
expiresAt: string
20+
uploadedAt?: string
21+
expiresAt?: string
2122
storageProvider?: 's3' | 'blob' | 'local'
2223
bucketName?: string
2324
}
@@ -220,7 +221,7 @@ export function FileDownload({
220221
return (
221222
<Button
222223
variant='ghost'
223-
className={`h-7 px-2 text-xs ${className}`}
224+
className={cn('h-7 px-2 text-xs', className)}
224225
onClick={handleDownload}
225226
disabled={isDownloading}
226227
>

apps/sim/lib/api/contracts/logs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ const fileSchema = z.object({
7373
type: z.string(),
7474
url: z.string(),
7575
key: z.string(),
76-
uploadedAt: z.string(),
77-
expiresAt: z.string(),
76+
uploadedAt: z.string().optional(),
77+
expiresAt: z.string().optional(),
7878
storageProvider: z.enum(['s3', 'blob', 'local']).optional(),
7979
bucketName: z.string().optional(),
8080
})

0 commit comments

Comments
 (0)