Show missing dependencies in dependency graph instead of failing

When dependencies are not cached on the server (common since we removed
proactive caching), the dependency graph now:
- Continues resolving what it can find
- Shows missing dependencies in a separate section with amber styling
- Displays the constraint and which package required them
- Updates the header stats to show "X cached • Y not cached"

This provides a better user experience than showing an error when
some dependencies haven't been downloaded yet.
This commit is contained in:
Mondo Diaz
2026-02-02 16:29:37 -06:00
parent ba0a658611
commit b3ae3b03eb
5 changed files with 111 additions and 6 deletions

View File

@@ -1033,10 +1033,19 @@ class ResolvedArtifact(BaseModel):
download_url: str
class MissingDependency(BaseModel):
"""A dependency that could not be resolved (not cached on server)"""
project: str
package: str
constraint: Optional[str] = None
required_by: Optional[str] = None
class DependencyResolutionResponse(BaseModel):
"""Response from dependency resolution endpoint"""
requested: Dict[str, str] # project, package, ref
resolved: List[ResolvedArtifact]
missing: List[MissingDependency] = []
total_size: int
artifact_count: int