From 8fd3528c4c6fd86f862767da6094c23e12b90962 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Wed, 12 Nov 2025 23:11:15 +0530 Subject: [PATCH] fix: settings limit capture list --- .../robot/pages/RobotSettingsPage.tsx | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/src/components/robot/pages/RobotSettingsPage.tsx b/src/components/robot/pages/RobotSettingsPage.tsx index 118329358..cb456e3d2 100644 --- a/src/components/robot/pages/RobotSettingsPage.tsx +++ b/src/components/robot/pages/RobotSettingsPage.tsx @@ -152,20 +152,36 @@ export const RobotSettingsPage = ({ handleStart }: RobotSettingsProps) => { }} style={{ marginBottom: "20px" }} /> - {robot.recording.workflow?.[0]?.what?.[0]?.args?.[0]?.limit !== - undefined && ( - - )} + {(() => { + let listCounter = 1; + + return robot.recording.workflow.flatMap((wf, wfIndex) => + wf.what.flatMap((action, actionIndex) => { + const argsWithLimit = action.args?.filter( + (arg: any) => arg && typeof arg === "object" && arg.limit !== undefined + ); + + if (!argsWithLimit?.length) return []; + + return argsWithLimit.map((arg, limitIndex) => { + const labelName = action.name || `List ${listCounter++}`; + return ( + + ); + }); + }) + ); + })()} +