Skip to content

Commit 214d0a8

Browse files
waleedlatif1claude
andcommitted
fix(logs): inline Workflow State row and lift search dropdown z-index
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4df1bf9 commit 214d0a8

2 files changed

Lines changed: 32 additions & 20 deletions

File tree

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

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ export const LogDetails = memo(function LogDetails({
316316
!!(log.executionData?.enhanced && log.executionData?.traceSpans))
317317

318318
const hasCostInfo = !!(isWorkflowExecutionLog && log?.cost)
319+
const showWorkflowState =
320+
isWorkflowExecutionLog &&
321+
!!log?.executionId &&
322+
log?.trigger !== 'mothership' &&
323+
!permissionConfig.hideTraceSpans
319324
const showTraceTab =
320325
isWorkflowExecutionLog && !!log?.executionData?.traceSpans && !permissionConfig.hideTraceSpans
321326

@@ -546,19 +551,29 @@ export const LogDetails = memo(function LogDetails({
546551

547552
{/* Duration */}
548553
<div
549-
className={`flex h-[48px] items-center justify-between border-b p-2 ${log.deploymentVersion ? 'border-[var(--border)]' : 'border-transparent'}`}
554+
className={cn(
555+
'flex h-[48px] items-center justify-between border-b p-2',
556+
log.deploymentVersion || showWorkflowState
557+
? 'border-[var(--border)]'
558+
: 'border-transparent'
559+
)}
550560
>
551561
<span className='font-medium text-[var(--text-tertiary)] text-caption'>
552562
Duration
553563
</span>
554-
<span className='font-medium text-[var(--text-secondary)] text-small'>
564+
<span className='font-medium text-[var(--text-secondary)] text-caption tabular-nums'>
555565
{formatDuration(log.duration, { precision: 2 }) || '—'}
556566
</span>
557567
</div>
558568

559569
{/* Version */}
560570
{log.deploymentVersion && (
561-
<div className='flex h-[48px] items-center gap-2 p-2'>
571+
<div
572+
className={cn(
573+
'flex h-[48px] items-center gap-2 p-2',
574+
showWorkflowState && 'border-[var(--border)] border-b'
575+
)}
576+
>
562577
<span className='flex-shrink-0 font-medium text-[var(--text-tertiary)] text-caption'>
563578
Version
564579
</span>
@@ -569,27 +584,24 @@ export const LogDetails = memo(function LogDetails({
569584
</div>
570585
</div>
571586
)}
572-
</div>
573587

574-
{/* Workflow State */}
575-
{isWorkflowExecutionLog &&
576-
log.executionId &&
577-
log.trigger !== 'mothership' &&
578-
!permissionConfig.hideTraceSpans && (
579-
<div className='-mt-2 flex flex-col gap-1.5 rounded-md border border-[var(--border)] bg-[var(--surface-2)] px-2.5 py-2'>
588+
{/* Workflow State */}
589+
{showWorkflowState && (
590+
<button
591+
type='button'
592+
onClick={() => setIsExecutionSnapshotOpen(true)}
593+
className='flex h-[48px] items-center justify-between p-2 text-left transition-colors hover-hover:bg-[var(--surface-2)]'
594+
>
580595
<span className='font-medium text-[var(--text-tertiary)] text-caption'>
581596
Workflow State
582597
</span>
583-
<Button
584-
variant='active'
585-
onClick={() => setIsExecutionSnapshotOpen(true)}
586-
className='flex w-full items-center justify-between px-2.5 py-1.5'
587-
>
588-
<span className='font-medium text-caption'>View Snapshot</span>
589-
<Eye className='h-[14px] w-[14px]' />
590-
</Button>
591-
</div>
598+
<span className='flex items-center gap-1.5 font-medium text-[var(--text-secondary)] text-caption'>
599+
View Snapshot
600+
<Eye className='h-[12px] w-[12px]' />
601+
</span>
602+
</button>
592603
)}
604+
</div>
593605

594606
{/* Workflow Input */}
595607
{isWorkflowExecutionLog && workflowInput && !permissionConfig.hideTraceSpans && (

apps/sim/app/workspace/[workspaceId]/logs/components/logs-toolbar/components/search/search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function AutocompleteSearch({
248248
<DropdownMenuPrimitive.Portal>
249249
<DropdownMenuPrimitive.Content
250250
ref={dropdownRef}
251-
className='z-50 rounded-lg border border-[var(--border)] bg-[var(--bg)] shadow-sm'
251+
className='z-[70] rounded-lg border border-[var(--border)] bg-[var(--bg)] shadow-sm'
252252
style={{ width: dropdownWidth }}
253253
align='start'
254254
sideOffset={4}

0 commit comments

Comments
 (0)