diff --git a/backend/app/dependencies.py b/backend/app/dependencies.py index e8912e8..13bb686 100644 --- a/backend/app/dependencies.py +++ b/backend/app/dependencies.py @@ -791,6 +791,11 @@ def resolve_dependencies( continue dep_artifact_id, dep_version, dep_size = resolved_dep + + # Skip if resolved to same artifact (self-dependency at artifact level) + if dep_artifact_id == artifact_id: + continue + _resolve_recursive( dep_artifact_id, dep.dependency_project, diff --git a/frontend/src/components/DependencyGraph.tsx b/frontend/src/components/DependencyGraph.tsx index 89e52dd..cdfb866 100644 --- a/frontend/src/components/DependencyGraph.tsx +++ b/frontend/src/components/DependencyGraph.tsx @@ -117,6 +117,14 @@ function DependencyGraph({ projectName, packageName, tagName, onClose }: Depende try { const result = await resolveDependencies(projectName, packageName, tagName); + + // If only the root package (no dependencies) and no missing deps, close the modal + const hasDeps = result.artifact_count > 1 || (result.missing && result.missing.length > 0); + if (!hasDeps) { + onClose(); + return; + } + setResolution(result); const graph = await buildGraph(result);