diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 68dcc315..c6d81c4e 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -451,9 +451,19 @@ export const RightSidePanel: React.FC = ({ onFinishCapture )} - {workflow.workflow && workflow.workflow.map((pair, i, workflow) => ( + { + workflow.workflow.map((pair, i, workflow) => ( - {browserSteps.map((step) => ( + {browserSteps.filter(step => { + if (step.type === 'text') { + return confirmedTextSteps[step.id]; // Check if text step is confirmed + } else if (step.type === 'list') { + return Object.values(confirmedListTextFields[step.id] || {}).some(Boolean); // Check if any list fields are confirmed + } else if (step.type === 'screenshot') { + return true; // Assuming all screenshot steps are considered confirmed by default + } + return false; // Default case + }).map((step) => ( = ({ onFinishCapture > {step.type === 'text' && ( <> - {confirmedTextSteps[step.id] && hoverStates[step.id] && ( + {hoverStates[step.id] && ( handlePairDelete()} sx={{ @@ -517,23 +527,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture ), }} /> - {!confirmedTextSteps[step.id] && ( - - - - - )} )} {step.type === 'screenshot' && ( @@ -580,23 +573,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture ), }} /> - {!confirmedListTextFields[step.id]?.[key] && ( - - - - - )} ))}