Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions apps/sim/app/api/workflows/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,18 @@ export async function POST(req: NextRequest) {

logger.info(`[${requestId}] Creating workflow ${workflowId} for user ${session.user.id}`)

// Track workflow creation
try {
const { trackPlatformEvent } = await import('@/lib/telemetry/tracer')
trackPlatformEvent('platform.workflow.created', {
'workflow.id': workflowId,
'workflow.name': name,
'workflow.has_workspace': !!workspaceId,
'workflow.has_folder': !!folderId,
import('@/lib/telemetry/tracer')
.then(({ trackPlatformEvent }) => {
trackPlatformEvent('platform.workflow.created', {
'workflow.id': workflowId,
'workflow.name': name,
'workflow.has_workspace': !!workspaceId,
'workflow.has_folder': !!folderId,
})
})
.catch(() => {
// Silently fail
})
} catch (_e) {
// Silently fail
}

await db.insert(workflow).values({
id: workflowId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import '@/components/emcn/components/code/code.css'
interface LogSidebarProps {
log: WorkflowLog | null
isOpen: boolean
isLoadingDetails?: boolean
onClose: () => void
onNavigateNext?: () => void
onNavigatePrev?: () => void
Expand Down Expand Up @@ -192,6 +193,7 @@ const BlockContentDisplay = ({
export function Sidebar({
log,
isOpen,
isLoadingDetails = false,
onClose,
onNavigateNext,
onNavigatePrev,
Expand Down Expand Up @@ -219,15 +221,6 @@ export function Sidebar({
}
}, [log?.id])

const isLoadingDetails = useMemo(() => {
if (!log) return false
// Only show while we expect details to arrive (has executionId)
if (!log.executionId) return false
const hasEnhanced = !!log.executionData?.enhanced
const hasAnyDetails = hasEnhanced || !!log.cost || Array.isArray(log.executionData?.traceSpans)
return !hasAnyDetails
}, [log])

const formattedContent = useMemo(() => {
if (!log) return null

Expand Down
Loading