diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index 96f7c9d3f..30f5f2e19 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -510,27 +510,36 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { {t("List Limits")} - {scrapeListLimits.map((limitInfo, index) => ( - { - const value = parseInt(e.target.value, 10); - if (value >= 1) { - handleLimitChange( - limitInfo.pairIndex, - limitInfo.actionIndex, - limitInfo.argIndex, - value - ); - } - }} - inputProps={{ min: 1 }} - style={{ marginBottom: "20px" }} - /> - ))} + {scrapeListLimits.map((limitInfo, index) => { + // Get the corresponding scrapeList action to extract its name + const scrapeListAction = robot?.recording?.workflow?.[limitInfo.pairIndex]?.what?.[limitInfo.actionIndex]; + const actionName = + scrapeListAction?.name || + (scrapeListAction?.args?.[0]?.__name) || + `List Limit ${index + 1}`; + + return ( + { + const value = parseInt(e.target.value, 10); + if (value >= 1) { + handleLimitChange( + limitInfo.pairIndex, + limitInfo.actionIndex, + limitInfo.argIndex, + value + ); + } + }} + inputProps={{ min: 1 }} + style={{ marginBottom: "20px" }} + /> + ); + })} ); };