Merge pull request #858 from getmaxun/fix-list-limits

feat: display list names instead of generic labels while editing robots
This commit is contained in:
Karishma
2025-11-03 15:51:39 +05:30
committed by GitHub

View File

@@ -510,10 +510,18 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
{t("List Limits")} {t("List Limits")}
</Typography> </Typography>
{scrapeListLimits.map((limitInfo, index) => ( {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 (
<TextField <TextField
key={`limit-${limitInfo.pairIndex}-${limitInfo.actionIndex}`} key={`limit-${limitInfo.pairIndex}-${limitInfo.actionIndex}`}
label={`${t("List Limit")} ${index + 1}`} label={actionName}
type="number" type="number"
value={limitInfo.currentLimit || ""} value={limitInfo.currentLimit || ""}
onChange={(e) => { onChange={(e) => {
@@ -530,7 +538,8 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
inputProps={{ min: 1 }} inputProps={{ min: 1 }}
style={{ marginBottom: "20px" }} style={{ marginBottom: "20px" }}
/> />
))} );
})}
</> </>
); );
}; };