Link HTML5 review findings to source
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-17 01:52:28 +03:00
parent 2aaf5d0082
commit de119c2106
3 changed files with 46 additions and 2 deletions
@@ -1713,6 +1713,25 @@ async def html5_project_symbol_detail(project_id: str, lineage_id: str) -> Respo
)
@app.get("/html5/projects/{project_id}/source/by-path")
async def html5_project_source_by_path(project_id: str, path: str) -> Response:
snapshot = _project_snapshot_or_404(project_id)
node = next(
(
item
for item in snapshot.nodes
if item.source_ref is not None and item.source_ref.source_path == path
),
None,
)
if node is None:
raise HTTPException(status_code=404, detail=f"Source not found: {path}")
return Response(
render_html5_source(node),
media_type="text/html; charset=utf-8",
)
@app.get("/html5/projects/{project_id}/source/{lineage_id}")
async def html5_project_source(project_id: str, lineage_id: str) -> Response:
snapshot = _project_snapshot_or_404(project_id)