diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans-display.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans-display.tsx index 36a66245e5e..0d3361816b9 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans-display.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans-display.tsx @@ -82,14 +82,21 @@ function transformBlockData(data: any, blockType: string, isInput: boolean) { interface CollapsibleInputOutputProps { span: TraceSpan spanId: string + depth: number } -function CollapsibleInputOutput({ span, spanId }: CollapsibleInputOutputProps) { +function CollapsibleInputOutput({ span, spanId, depth }: CollapsibleInputOutputProps) { const [inputExpanded, setInputExpanded] = useState(false) const [outputExpanded, setOutputExpanded] = useState(false) + // Calculate the left margin based on depth to match the parent span's indentation + const leftMargin = depth * 16 + 8 + 24 // Base depth indentation + icon width + extra padding + return ( -