From 1ec86242af41d883bb6c82bc701106de44e25a96 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 27 Nov 2025 00:03:01 +0530 Subject: [PATCH 1/3] feat: store render outputs --- src/components/robot/pages/RobotEditPage.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index 53424bb2..280ce9dd 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -791,6 +791,9 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { navigate(basePath); }; + const scrapeListLimitFields = renderScrapeListLimitFields(); + const actionNameFields = renderActionNameFields(); + return ( Date: Thu, 27 Nov 2025 00:04:42 +0530 Subject: [PATCH 2/3] feat: conditionally render last two --- src/components/robot/pages/RobotEditPage.tsx | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index 280ce9dd..3a63f8f1 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -791,9 +791,6 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { navigate(basePath); }; - const scrapeListLimitFields = renderScrapeListLimitFields(); - const actionNameFields = renderActionNameFields(); - return ( { onChange={(e) => handleTargetUrlChange(e.target.value)} style={{ marginBottom: "20px" }} /> - - {renderScrapeListLimitFields()} - - {renderActionNameFields()} + {renderScrapeListLimitFields() && ( + <> + + {renderScrapeListLimitFields()} + +)} + +{renderActionNameFields() && ( + <> + + {renderActionNameFields()} + +)} + )} From d133858f584c38cebe69c78acb9b7d027361ca48 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 27 Nov 2025 00:05:01 +0530 Subject: [PATCH 3/3] fix: format --- src/components/robot/pages/RobotEditPage.tsx | 27 ++++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index 3a63f8f1..178c5ad3 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -500,7 +500,7 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { {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 = + const actionName = scrapeListAction?.name || `List Limit ${index + 1}`; @@ -821,20 +821,19 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { onChange={(e) => handleTargetUrlChange(e.target.value)} style={{ marginBottom: "20px" }} /> - {renderScrapeListLimitFields() && ( - <> - - {renderScrapeListLimitFields()} - -)} - -{renderActionNameFields() && ( - <> - - {renderActionNameFields()} - -)} + {renderScrapeListLimitFields() && ( + <> + + {renderScrapeListLimitFields()} + + )} + {renderActionNameFields() && ( + <> + + {renderActionNameFields()} + + )} )}