Skip to content

Commit c23f1cd

Browse files
committed
fix(logs): trace view resizable split, bar visibility, provider icons, cleanup
- Resizable tree/detail split in trace view (default 360px, drag to resize) - Resizable right panel in preview snapshot (280–600px) - Fix Gantt bar invisibility for late-run spans (clamp offsetPct to 100-MIN_BAR_PCT) - Propagate model+provider to child model spans in span-factory for correct icons - Fix icon contrast on light provider backgrounds (luminance-based color class) - Replace custom status badges with emcn Badge component - Lighten jump-to-error button to ghost variant - Remove double X button in modal snapshot (showBlockCloseButton prop) - Fix emcn subpath imports → barrel in trace-view, log-details, execution-snapshot - Fix hover: → hover-hover: on resize handles - Add body style cleanup on resize unmount - Fix React Query key factory naming (stats/stat convention) - Remove unnecessary useCallback/useMemo in preview and execution-snapshot
1 parent 6fb6dd4 commit c23f1cd

7 files changed

Lines changed: 396 additions & 349 deletions

File tree

apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
'use client'
22

3-
import { useCallback, useRef, useState } from 'react'
3+
import type React from 'react'
4+
import { useRef, useState } from 'react'
45
import { AlertCircle, Loader2 } from 'lucide-react'
56
import { createPortal } from 'react-dom'
67
import {
8+
Copy,
79
DropdownMenu,
810
DropdownMenuContent,
911
DropdownMenuItem,
@@ -13,7 +15,6 @@ import {
1315
ModalContent,
1416
ModalHeader,
1517
} from '@/components/emcn'
16-
import { Copy } from '@/components/emcn/icons'
1718
import { cn } from '@/lib/core/utils/cn'
1819
import { Preview } from '@/app/workspace/[workspaceId]/w/components/preview'
1920
import { useExecutionSnapshot } from '@/hooks/queries/logs'
@@ -64,21 +65,21 @@ export function ExecutionSnapshot({
6465
const [menuPosition, setMenuPosition] = useState({ x: 0, y: 0 })
6566
const menuRef = useRef<HTMLDivElement>(null)
6667

67-
const closeMenu = useCallback(() => {
68+
function closeMenu() {
6869
setIsMenuOpen(false)
69-
}, [])
70+
}
7071

71-
const handleCanvasContextMenu = useCallback((e: React.MouseEvent) => {
72+
function handleCanvasContextMenu(e: React.MouseEvent) {
7273
e.preventDefault()
7374
e.stopPropagation()
7475
setMenuPosition({ x: e.clientX, y: e.clientY })
7576
setIsMenuOpen(true)
76-
}, [])
77+
}
7778

78-
const handleCopyExecutionId = useCallback(() => {
79+
function handleCopyExecutionId() {
7980
navigator.clipboard.writeText(executionId)
8081
closeMenu()
81-
}, [executionId, closeMenu])
82+
}
8283

8384
const workflowState = data?.workflowState as WorkflowState | undefined
8485
const childWorkflowSnapshots = data?.childWorkflowSnapshots as
@@ -161,6 +162,7 @@ export function ExecutionSnapshot({
161162
onCanvasContextMenu={handleCanvasContextMenu}
162163
showBorder={!isModal}
163164
autoSelectLeftmost
165+
showBlockCloseButton={!isModal}
164166
/>
165167
)
166168
}

0 commit comments

Comments
 (0)