diff --git a/src/components/robot/pages/RobotConfigPage.tsx b/src/components/robot/pages/RobotConfigPage.tsx index 53ae90ab..d52b985e 100644 --- a/src/components/robot/pages/RobotConfigPage.tsx +++ b/src/components/robot/pages/RobotConfigPage.tsx @@ -62,7 +62,6 @@ export const RobotConfigPage: React.FC = ({ { return ( <> - + {t("List Limits")} @@ -539,22 +539,22 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { if (!robot || !robot.recording || !robot.recording.workflow) return null; const editableActions = new Set(['screenshot', 'scrapeList', 'scrapeSchema']); - const inputs: JSX.Element[] = []; + const textInputs: JSX.Element[] = []; + const screenshotInputs: JSX.Element[] = []; + const listInputs: JSX.Element[] = []; robot.recording.workflow.forEach((pair, pairIndex) => { if (!pair.what) return; pair.what.forEach((action, actionIndex) => { - // Only show editable name inputs for meaningful action types if (!editableActions.has(String(action.action))) return; - // derive current name from possible fields const currentName = action.name || (action.args && action.args[0] && typeof action.args[0] === 'object' && action.args[0].__name) || ''; - inputs.push( + const textField = ( { fullWidth /> ); + + switch (action.action) { + case 'scrapeSchema': + textInputs.push(textField); + break; + case 'screenshot': + screenshotInputs.push(textField); + break; + case 'scrapeList': + listInputs.push(textField); + break; + } }); }); - if (inputs.length === 0) return null; + const hasAnyInputs = textInputs.length > 0 || screenshotInputs.length > 0 || listInputs.length > 0; + if (!hasAnyInputs) return null; return ( <> - + {t('Actions')} - {inputs} + + {textInputs.length > 0 && ( + <> + + Texts + + {textInputs} + + )} + + {screenshotInputs.length > 0 && ( + <> + 0 ? '16px' : '0' }}> + Screenshots + + {screenshotInputs} + + )} + + {listInputs.length > 0 && ( + <> + 0 || screenshotInputs.length > 0) ? '16px' : '0' }}> + Lists + + {listInputs} + + )} ); };