From 29146da57e884cc6228cb653e75cc2e6b1f4ba72 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Mon, 27 Oct 2025 17:48:28 +0530 Subject: [PATCH 1/7] fix: hide overflow --- src/pages/RecordingPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/RecordingPage.tsx b/src/pages/RecordingPage.tsx index 6e362471..b5810a84 100644 --- a/src/pages/RecordingPage.tsx +++ b/src/pages/RecordingPage.tsx @@ -157,7 +157,7 @@ export const RecordingPage = ({ recordingName }: RecordingPageProps) => { <> -
+
From 5367111f72dcd8687ca34ef28f1b6efc2a776a58 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Mon, 27 Oct 2025 18:40:44 +0530 Subject: [PATCH 2/7] fix: add default names for captured action data --- src/components/robot/pages/RobotEditPage.tsx | 63 +++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index 96f7c9d3..5aa04b7a 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -543,17 +543,50 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { const screenshotInputs: JSX.Element[] = []; const listInputs: JSX.Element[] = []; + let textCount = 0; + let screenshotCount = 0; + let listCount = 0; + robot.recording.workflow.forEach((pair, pairIndex) => { if (!pair.what) return; pair.what.forEach((action, actionIndex) => { if (!editableActions.has(String(action.action))) return; - const currentName = + let currentName = action.name || (action.args && action.args[0] && typeof action.args[0] === 'object' && action.args[0].__name) || ''; + if (!currentName) { + switch (action.action) { + case 'scrapeSchema': + textCount++; + currentName = `Text ${textCount}`; + break; + case 'screenshot': + screenshotCount++; + currentName = `Screenshot ${screenshotCount}`; + break; + case 'scrapeList': + listCount++; + currentName = `List ${listCount}`; + break; + } + } else { + switch (action.action) { + case 'scrapeSchema': + textCount++; + break; + case 'screenshot': + screenshotCount++; + break; + case 'scrapeList': + listCount++; + break; + } + } + const textField = ( { }); }); + if (textInputs.length === 1 && textCount === 1) { + robot.recording.workflow.forEach((pair, pairIndex) => { + if (!pair.what) return; + + pair.what.forEach((action, actionIndex) => { + if (action.action === 'scrapeSchema') { + const existingName = + action.name || + (action.args && action.args[0] && typeof action.args[0] === 'object' && action.args[0].__name) || + ''; + + const currentName = !existingName ? 'Texts' : existingName; + + textInputs[0] = ( + handleActionNameChange(pairIndex, actionIndex, e.target.value)} + style={{ marginBottom: '12px' }} + fullWidth + /> + ); + } + }); + }); + } + const hasAnyInputs = textInputs.length > 0 || screenshotInputs.length > 0 || listInputs.length > 0; if (!hasAnyInputs) return null; From b9ab9bd7c99e8436bc1119770afc323075618800 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Mon, 27 Oct 2025 18:59:11 +0530 Subject: [PATCH 3/7] fix: add null checks legacy data --- src/components/run/RunContent.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/run/RunContent.tsx b/src/components/run/RunContent.tsx index ee397bf4..4cc787d1 100644 --- a/src/components/run/RunContent.tsx +++ b/src/components/run/RunContent.tsx @@ -87,8 +87,8 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe const hasOldFormat = !row.serializableOutput.scrapeSchema && !row.serializableOutput.scrapeList && Object.keys(row.serializableOutput).length > 0; if (hasLegacySchema || hasLegacyList || hasOldFormat) { - setIsLegacyData(true); processLegacyData(row.serializableOutput); + setIsLegacyData(false); return; } @@ -154,11 +154,12 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe const data = legacyOutput[key]; if (Array.isArray(data)) { - const isNestedArray = data.length > 0 && Array.isArray(data[0]); + const firstNonNullElement = data.find(item => item !== null && item !== undefined); + const isNestedArray = firstNonNullElement && Array.isArray(firstNonNullElement); if (isNestedArray) { data.forEach((subArray, index) => { - if (Array.isArray(subArray) && subArray.length > 0) { + if (subArray !== null && subArray !== undefined && Array.isArray(subArray) && subArray.length > 0) { const filteredData = subArray.filter(row => row && typeof row === 'object' && Object.values(row).some(value => value !== undefined && value !== "") ); @@ -171,7 +172,7 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe }); } else { const filteredData = data.filter(row => - row && typeof row === 'object' && Object.values(row).some(value => value !== undefined && value !== "") + row && typeof row === 'object' && !Array.isArray(row) && Object.values(row).some(value => value !== undefined && value !== "") ); if (filteredData.length > 0) { @@ -208,7 +209,7 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe if (Array.isArray(schemaOutput)) { const filteredData = schemaOutput.filter(row => - row && Object.values(row).some(value => value !== undefined && value !== "") + row && typeof row === 'object' && Object.values(row).some(value => value !== undefined && value !== "") ); if (filteredData.length > 0) { @@ -231,7 +232,7 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe const data = schemaOutput[key]; if (Array.isArray(data)) { const filteredData = data.filter(row => - Object.values(row).some(value => value !== undefined && value !== "") + row && typeof row === 'object' && Object.values(row).some(value => value !== undefined && value !== "") ); dataByKey[key] = filteredData; @@ -272,7 +273,7 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe const tableData = scrapeListData[key]; if (Array.isArray(tableData) && tableData.length > 0) { const filteredData = tableData.filter(row => - Object.values(row).some(value => value !== undefined && value !== "") + row && typeof row === 'object' && Object.values(row).some(value => value !== undefined && value !== "") ); if (filteredData.length > 0) { tablesList.push(filteredData); From f39195a11c7f5e051139ab8a2d0065fc3f8b3092 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Wed, 29 Oct 2025 15:06:06 +0530 Subject: [PATCH 4/7] fix: check text content for meaningful logic --- src/helpers/clientSelectorGenerator.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/helpers/clientSelectorGenerator.ts b/src/helpers/clientSelectorGenerator.ts index 03ad67a2..3189a430 100644 --- a/src/helpers/clientSelectorGenerator.ts +++ b/src/helpers/clientSelectorGenerator.ts @@ -564,14 +564,15 @@ class ClientSelectorGenerator { return true; } - if (element.children.length > 0) { - return false; + const text = (element.textContent || "").trim(); + const hasVisibleText = text.length > 0; + + if (hasVisibleText || element.querySelector("svg")) { + return true; } - const text = (element.textContent || "").trim(); - - if (text.length > 0) { - return true; + if (element.children.length > 0) { + return false; } return false; From a94b2c5b9bf5ed8c9ca977ae1d065b7559508850 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 1 Nov 2025 19:07:13 +0530 Subject: [PATCH 5/7] feat: // Get the corresponding scrapeList action to extract its name --- src/components/robot/pages/RobotEditPage.tsx | 51 ++++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index 96f7c9d3..30f5f2e1 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" }} + /> + ); + })} ); }; From e0b5103374840195d7777bb028b5eb602a6edd25 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Mon, 3 Nov 2025 22:26:53 +0530 Subject: [PATCH 6/7] fix: hide right side panel scrollbar --- src/components/recorder/RightSidePanel.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/recorder/RightSidePanel.tsx b/src/components/recorder/RightSidePanel.tsx index e22ab08b..de0dfcb0 100644 --- a/src/components/recorder/RightSidePanel.tsx +++ b/src/components/recorder/RightSidePanel.tsx @@ -534,9 +534,24 @@ export const RightSidePanel: React.FC = ({ onFinishCapture const isDarkMode = theme.darkMode; return ( - + - + {!isAnyActionActive && ( <> {showCaptureList && ( From ab48f3e7b8f16374f6d7572a86e605e8510a39c2 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Wed, 5 Nov 2025 15:07:14 +0530 Subject: [PATCH 7/7] fix: rm __name, limit to single text name --- src/components/robot/pages/RobotEditPage.tsx | 84 ++++++++++---------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index ba030e76..fa745160 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -436,15 +436,6 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { // update the standard name field action.name = newName; - // also update legacy __name location if present (args[0].__name) - if (action.args && action.args.length > 0 && typeof action.args[0] === 'object' && action.args[0] !== null && '__name' in action.args[0]) { - try { - action.args[0] = { ...action.args[0], __name: newName }; - } catch (e) { - console.error('Failed to update legacy __name field:', e); - } - } - updatedWorkflow[pairIndex].what[actionIndex] = action; } @@ -515,7 +506,6 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { const scrapeListAction = robot?.recording?.workflow?.[limitInfo.pairIndex]?.what?.[limitInfo.actionIndex]; const actionName = scrapeListAction?.name || - (scrapeListAction?.args?.[0]?.__name) || `List Limit ${index + 1}`; return ( @@ -564,7 +554,7 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { let currentName = action.name || - (action.args && action.args[0] && typeof action.args[0] === 'object' && action.args[0].__name) || + (action.args && action.args[0] && typeof action.args[0] === 'object') || ''; if (!currentName) { @@ -608,9 +598,49 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { ); switch (action.action) { - case 'scrapeSchema': - textInputs.push(textField); + case 'scrapeSchema': { + const existingName = + currentName || + (action.args && action.args[0] && typeof action.args[0] === "object") || + "Texts"; + + if (!textInputs.length) { + textInputs.push( + { + const newName = e.target.value; + + setRobot((prev) => { + if (!prev?.recording?.workflow) return prev; + + const updated = { ...prev }; + updated.recording = { ...prev.recording }; + updated.recording.workflow = prev.recording.workflow.map((p) => ({ + ...p, + what: p.what?.map((a) => { + if (a.action === "scrapeSchema") { + const updatedAction = { ...a }; + updatedAction.name = newName; + return updatedAction; + } + return a; + }), + })); + + return updated; + }); + }} + style={{ marginBottom: "12px" }} + fullWidth + /> + ); + } + break; + } case 'screenshot': screenshotInputs.push(textField); break; @@ -621,34 +651,6 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { }); }); - if (textInputs.length === 1 && textCount === 1) { - robot.recording.workflow.forEach((pair, pairIndex) => { - if (!pair.what) return; - - pair.what.forEach((action, actionIndex) => { - if (action.action === 'scrapeSchema') { - const existingName = - action.name || - (action.args && action.args[0] && typeof action.args[0] === 'object' && action.args[0].__name) || - ''; - - const currentName = !existingName ? 'Texts' : existingName; - - textInputs[0] = ( - handleActionNameChange(pairIndex, actionIndex, e.target.value)} - style={{ marginBottom: '12px' }} - fullWidth - /> - ); - } - }); - }); - } - const hasAnyInputs = textInputs.length > 0 || screenshotInputs.length > 0 || listInputs.length > 0; if (!hasAnyInputs) return null;