fix(automations): remap all branch path IDs in ImportFlowModal and guard deleteFolder against parentId cycles
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- backend-api-design, full-stack
Línea de trabajo
Start in ImportFlowModal.tsx at handlePerformImport and in automations.service.ts at deleteFolder. Trace the existing idMap remapping and recursive folder traversal, then check how branch references and folder children are represented. Done means every listed branch target is remapped and folder deletion safely handles cycles and the stated depth limit.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem Description
-
ImportFlowModalleaves dangling node IDs on imported flows:
Inapps/web/app/dashboard/[companyId]/automation/[automationId]/components/ImportFlowModal.tsx(lines 261-287),handlePerformImportgenerates new node IDs (idMap) and remapsconditionPaths,randomPaths, andsplitBranches.
However, it fails to remapbuttonPaths,defaultPath,agentBranchPaths,scoringPaths,vipNextNodeId, andnormalNextNodeId. Any imported flow using buttons, AI Agent branches, or profile scoring branches retains stale node IDs and breaks when executed. -
deleteFolderlacks cycle/depth protection:
Inapps/api/src/automations/automations.service.ts(deleteFolder, lines 88-100),findChildrenRecursivetraverses child folders without avisitedset or depth limit. If anyparentIdcycle exists in the database, deleting a folder enters an infinite async loop.
Expected Behavior
- All branch target references in an imported flow (
buttonPaths,defaultPath,agentBranchPaths,scoringPaths,vipNextNodeId,normalNextNodeId, as well asconditionPaths,randomPaths, andsplitBranches) are remapped viaidMap. findChildrenRecursiveindeleteFoldertracks visited folder IDs and enforces a max depth so cycles cannot hang the API.
Where to Look
apps/web/app/dashboard/[companyId]/automation/[automationId]/components/ImportFlowModal.tsx(handlePerformImport, lines 261-287)apps/api/src/automations/automations.service.ts(deleteFolder, lines 88-100)
Solution / Implementation Guide
- In
ImportFlowModal.tsx:- Remap
buttonPaths,agentBranchPaths, andscoringPaths(mapping each path's target node ID throughidMap). - Remap
defaultPath,vipNextNodeId, andnormalNextNodeIdthroughidMapwhen present.
- Remap
- In
automations.service.ts(deleteFolder):- Pass a
visited = new Set<string>()anddepth = 0(e.g., max depth50) intofindChildrenRecursive, skipping any folder ID already invisited.
- Pass a
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 1
- Merge medio
- 6 min
- PR fusionados (30 d)
- 27
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sumamakhan761/tryinstance
-
backend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sumamakhan761/tryinstance#65 ·
Los mantenedores suelen responder en 1 día
-
backend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
sumamakhan761/tryinstance#64 ·
Los mantenedores suelen responder en 1 día
-
backend good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
sumamakhan761/tryinstance#63 ·
Los mantenedores suelen responder en 1 día
-
backend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sumamakhan761/tryinstance#62 ·
Los mantenedores suelen responder en 1 día
-
backend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sumamakhan761/tryinstance#60 ·
Los mantenedores suelen responder en 1 día
Todos los issues de sumamakhan761/tryinstance
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
makecindy/cindy#15342 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
no-repo-link tool-submission
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100