fix: address coderabbit reviews

This commit is contained in:
Rohit Rajan
2026-09-16 14:44:34 +05:30
parent 134c065bf4
commit a96db3e837
3 changed files with 22 additions and 3 deletions
+5 -1
View File
@@ -750,7 +750,11 @@ export const BrowserWindow = () => {
const content = candidate.field.data.trim().replace(/\s+/g, " ").toLowerCase();
const columnSignature = getColumnSignature?.(candidate.field);
if (!seenContent.has(content) && (!columnSignature || !seenColumns.has(columnSignature))) {
const isDuplicate = columnSignature
? seenColumns.has(columnSignature)
: seenContent.has(content);
if (!isDuplicate) {
seenContent.add(content);
if (columnSignature) {
seenColumns.add(columnSignature);
+1 -1
View File
@@ -339,7 +339,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
});
}
}
}, [fieldsString, currentListStep?.listSelector, getList, extractDataClientSide]);
}, [fieldsString, currentListStep?.id, currentListStep?.listSelector, getList, extractDataClientSide]);
const handleStartGetText = () => {
const newActionId = `text-${generateUUID()}`;
+16 -1
View File
@@ -4036,7 +4036,22 @@ class ClientSelectorGenerator {
`contains(@class, ${this.wrapXPathValue(className)})`
)
.join(" and ");
return `//table[${classPredicate}]/${sectionStep}/tr`;
const matchingTables = Array.from(
table.ownerDocument.querySelectorAll("table")
).filter((candidate) =>
tableClasses
.slice(0, 3)
.every((className) => candidate.classList.contains(className))
);
if (matchingTables.length === 1) {
return `//table[${classPredicate}]/${sectionStep}/tr`;
}
const classMatchIndex = matchingTables.indexOf(table) + 1;
if (classMatchIndex > 0) {
return `(//table[${classPredicate}])[${classMatchIndex}]/${sectionStep}/tr`;
}
}
const tableIndex =