From 6acab57aeff162fd613912dcb0d9f6b462bbdfb4 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 6 Jan 2026 13:32:18 +0530 Subject: [PATCH] chore: deprecate robot duplication --- src/components/robot/Recordings.tsx | 7 ------- src/components/robot/RecordingsTable.tsx | 17 +++-------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/components/robot/Recordings.tsx b/src/components/robot/Recordings.tsx index 44dc4df6..bcdb5d7a 100644 --- a/src/components/robot/Recordings.tsx +++ b/src/components/robot/Recordings.tsx @@ -9,7 +9,6 @@ import { import { RobotIntegrationPage } from "./pages/RobotIntegrationPage"; import { RobotSettingsPage } from "./pages/RobotSettingsPage"; import { RobotEditPage } from "./pages/RobotEditPage"; -import { RobotDuplicatePage } from "./pages/RobotDuplicatePage"; import { useNavigate, useLocation, useParams } from "react-router-dom"; import { useGlobalInfoStore } from "../../context/globalInfo"; import { useTranslation } from "react-i18next"; @@ -106,8 +105,6 @@ export const Recordings = ({ return {}} />; } else if (currentPath.endsWith("/edit")) { return {}} />; - } else if (currentPath.endsWith("/duplicate")) { - return {}} />; } return null; }; @@ -118,7 +115,6 @@ export const Recordings = ({ currentPath.includes("/integrate") || currentPath.includes("/settings") || currentPath.includes("/edit") || - currentPath.includes("/duplicate") || currentPath.includes("/run"); if (isConfigPage) { @@ -146,9 +142,6 @@ export const Recordings = ({ handleEditRobot={(id, name, params) => handleNavigate(`/robots/${id}/edit`, id, name, params) } - handleDuplicateRobot={(id, name, params) => - handleNavigate(`/robots/${id}/duplicate`, id, name, params) - } /> diff --git a/src/components/robot/RecordingsTable.tsx b/src/components/robot/RecordingsTable.tsx index 1d748a4d..841dc220 100644 --- a/src/components/robot/RecordingsTable.tsx +++ b/src/components/robot/RecordingsTable.tsx @@ -77,7 +77,6 @@ interface RecordingsTableProps { handleIntegrateRecording: (id: string, fileName: string, params: string[]) => void; handleSettingsRecording: (id: string, fileName: string, params: string[]) => void; handleEditRobot: (id: string, name: string, params: string[]) => void; - handleDuplicateRobot: (id: string, name: string, params: string[]) => void; } const LoadingRobotRow = memo(({ row, columns }: any) => { @@ -155,7 +154,6 @@ const TableRowMemoized = memo(({ row, columns, handlers }: any) => { handlers.handleRetrainRobot(row.id, row.name)} handleEdit={() => handlers.handleEditRobot(row.id, row.name, row.params || [])} - handleDuplicate={() => handlers.handleDuplicateRobot(row.id, row.name, row.params || [])} handleDelete={() => handlers.handleDelete(row.id)} robotType={row.type} /> @@ -184,7 +182,7 @@ export const RecordingsTable = ({ handleIntegrateRecording, handleSettingsRecording, handleEditRobot, - handleDuplicateRobot }: RecordingsTableProps) => { + }: RecordingsTableProps) => { const { t } = useTranslation(); const theme = useTheme(); const [page, setPage] = React.useState(0); @@ -506,10 +504,9 @@ export const RecordingsTable = ({ handleIntegrateRecording, handleSettingsRecording, handleEditRobot, - handleDuplicateRobot, handleRetrainRobot, handleDelete: async (id: string) => openDeleteConfirm(id) - }), [handleRunRecording, handleScheduleRecording, handleIntegrateRecording, handleSettingsRecording, handleEditRobot, handleDuplicateRobot, handleRetrainRobot, notify, t, refetch]); + }), [handleRunRecording, handleScheduleRecording, handleIntegrateRecording, handleSettingsRecording, handleEditRobot, handleRetrainRobot, notify, t, refetch]); return ( @@ -777,11 +774,10 @@ interface OptionsButtonProps { handleRetrain: () => void; handleEdit: () => void; handleDelete: () => void; - handleDuplicate: () => void; robotType: string; } -const OptionsButton = ({ handleRetrain, handleEdit, handleDelete, handleDuplicate, robotType }: OptionsButtonProps) => { +const OptionsButton = ({ handleRetrain, handleEdit, handleDelete, robotType }: OptionsButtonProps) => { const [anchorEl, setAnchorEl] = React.useState(null); const handleClick = (event: React.MouseEvent) => { @@ -826,13 +822,6 @@ const OptionsButton = ({ handleRetrain, handleEdit, handleDelete, handleDuplicat Delete - - {robotType !== 'scrape' && ( - { handleDuplicate(); handleClose(); }}> - - Duplicate - - )}