Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix(workflows): simplify comparison headings and badges
  • Loading branch information
icecrasher321 committed Oct 2, 2026
commit 5e9fe801550902491ff435fb3fb0a0be0a23ede3
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ function WorkflowPreviewBlockInner({ id, data }: NodeProps<WorkflowPreviewBlockN
)}
>
{/* Comparison label above the card */}
{diffStatus && <DiffStatusLabel status={diffStatus} count={changedFieldSet.size} />}
{diffStatus && <DiffStatusLabel status={diffStatus} />}
{/* Selection ring overlay (takes priority over execution rings) */}
{isPreviewSelected && (
<div className='pointer-events-none absolute inset-0 z-40 rounded-2xl ring-[1.5px] ring-[var(--text-secondary)]' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ const DIFF_LABEL_CLASS: Record<BlockDiffStatus, string> = {

interface DiffStatusLabelProps {
status: BlockDiffStatus
/** How many fields changed on a modified block; shown after the label when known */
count?: number
}

/**
* The comparison label floating above a canvas card or container: the same
* chrome wherever it appears so a block and a loop read as one system.
*/
export function DiffStatusLabel({ status, count }: DiffStatusLabelProps) {
export function DiffStatusLabel({ status }: DiffStatusLabelProps) {
return (
<div
className={cn(
Expand All @@ -35,7 +33,6 @@ export function DiffStatusLabel({ status, count }: DiffStatusLabelProps) {
)}
>
{DIFF_LABEL[status]}
{status === 'modified' && count ? ` · ${count}` : null}
</div>
)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client'

import { ArrowRight } from '@sim/emcn/icons'
import type { ForkWorkflowComparison } from '@/lib/api/contracts/workspace-fork'
import { WorkflowComparisonModal } from '@/app/workspace/[workspaceId]/w/components/workflow-diff'
import { useDeploymentVersionState } from '@/hooks/queries/workflows'
Expand Down Expand Up @@ -35,13 +34,7 @@ export function ForkComparisonModal({
onOpenChange={(open) => {
if (!open) onClose()
}}
header={
<div className='flex items-center gap-2'>
<span>Last Sync</span>
<ArrowRight className='size-[14px] text-[var(--text-icon)]' />
<span>Now</span>
</div>
}
header='Compare versions'
baseState={base.data ?? null}
targetState={target.data ?? null}
isLoading={base.isLoading || target.isLoading}
Expand Down
Loading