Skip to content

Commit 3c8f76d

Browse files
author
Roman Snapko
authored
Fix deleted step display in run history (#2117)
<!-- Ensure the title clearly reflects what was changed. Provide a clear and concise description of the changes made. The PR should only contain the changes related to the issue, and no other unrelated changes. --> Fixes OPS-3709 <img width="616" height="514" alt="image" src="https://github.com/user-attachments/assets/dab9101e-b9e5-4e60-8484-028853d7cb60" />
1 parent 173cc01 commit 3c8f76d

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

packages/react-ui/src/app/features/builder/run-details/flow-step-details-card-item.tsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
CollapsibleContent,
77
CollapsibleTrigger,
88
} from '@openops/components/ui';
9-
import { ChevronRight } from 'lucide-react';
9+
import { ChevronRight, SquareX } from 'lucide-react';
1010
import React, { useCallback, useMemo } from 'react';
1111

1212
import { blocksHooks } from '@/app/features/blocks/lib/blocks-hook';
@@ -18,6 +18,7 @@ import { ActionType, FlagId, flowHelper } from '@openops/shared';
1818
import { flagsHooks } from '@/app/common/hooks/flags-hooks';
1919
import { useCenterWorkflowViewOntoStep } from '@/app/features/builder/hooks/center-workflow-view-onto-step';
2020
import { StepStatusIcon } from '@/app/features/flow-runs/components/step-status-icon';
21+
import { t } from 'i18next';
2122
import { RUN_DETAILS_STEP_CARD_ID_PREFIX } from './constants';
2223
import { LoopIterationInput } from './loop-iteration-input';
2324

@@ -145,10 +146,24 @@ const FlowStepDetailsCardItem = ({
145146
/>
146147
</Button>
147148
)}
148-
<img className="w-6 h-6" alt={'logo'} src={stepMetadata?.logoUrl} />
149-
<div className="break-all truncate">{`${stepIndex + 1}. ${
150-
step?.displayName
151-
}`}</div>
149+
{stepMetadata?.logoUrl ? (
150+
<img
151+
className="w-6 h-6"
152+
alt={'logo'}
153+
src={stepMetadata?.logoUrl}
154+
/>
155+
) : (
156+
<SquareX className="w-6 h-6 text-muted-foreground" />
157+
)}
158+
159+
<div
160+
className={cn('break-all truncate', {
161+
'text-muted-foreground italic': !step?.displayName,
162+
})}
163+
>
164+
{(stepIndex !== -1 ? `${stepIndex + 1}. ` : '') +
165+
(step?.displayName ?? t('Deleted Step'))}
166+
</div>
152167
<div className="w-2"></div>
153168
<div className="flex gap-1 justify-end items-center flex-grow">
154169
{isLoopStep && (

0 commit comments

Comments
 (0)