diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/WorkflowActionCard.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/WorkflowActionCard.tsx index 1945f62db..c62ebdfa1 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/WorkflowActionCard.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/WorkflowActionCard.tsx @@ -6,22 +6,15 @@ export function WorkflowActionCard({ workflow: UiEditorWorkflowProjection; }) { const action = getStepAction(workflow); + const isReferenceStep = workflow.activeStep === 'reference-analysis'; + const isCombinedStep = workflow.activeStep === 'structure-recognition'; const running = - (workflow.activeStep === 'reference-analysis' && workflow.isSuggesting) || - (workflow.activeStep === 'structure-recognition' && - (workflow.isRecognizing || workflow.isBinding)); - const status = - workflow.activeStep === 'reference-analysis' - ? workflow.suggestionStatus - : workflow.activeStep === 'structure-recognition' - ? workflow.bindingStatus || workflow.recognitionStatus - : workflow.bindingStatus; - const hasRun = - workflow.activeStep === 'reference-analysis' - ? workflow.hasSuggested - : workflow.activeStep === 'structure-recognition' - ? workflow.hasBound - : workflow.hasBound; + (isReferenceStep && workflow.isSuggesting) || + (isCombinedStep && workflow.isBinding); + const status = isReferenceStep + ? workflow.suggestionStatus + : workflow.bindingStatus; + const hasRun = isReferenceStep ? workflow.hasSuggested : workflow.hasBound; return (