diff --git a/server.py b/server.py
index c1d38bb..e1209fd 100644
--- a/server.py
+++ b/server.py
@@ -299,6 +299,91 @@ async def get_cached(content_hash: str):
return FileResponse(cache_path)
+@app.get("/ui/cache/{content_hash}", response_class=HTMLResponse)
+async def ui_cache_view(content_hash: str):
+ """View cached content with appropriate display."""
+ cache_path = CACHE_DIR / content_hash
+
+ if not cache_path.exists():
+ return HTMLResponse(f"""
+
+
+
Not Found | Art DAG L1
+
+
+ ← Back to runs
+ Content not found: {content_hash}
+
+
+""", status_code=404)
+
+ media_type = detect_media_type(cache_path)
+ file_size = cache_path.stat().st_size
+ size_str = f"{file_size:,} bytes"
+ if file_size > 1024*1024:
+ size_str = f"{file_size/(1024*1024):.1f} MB"
+ elif file_size > 1024:
+ size_str = f"{file_size/1024:.1f} KB"
+
+ html = f"""
+
+
+
+ {content_hash[:16]}... | Art DAG L1
+
+
+
+
+ ← Back to runs
+
+
+
+
+
+
+
+
Details
+
+
Content Hash (SHA3-256)
+
{content_hash}
+
+
+
+
+
+
+
+
+"""
+ return html
+
+
@app.get("/cache")
async def list_cache():
"""List cached content hashes."""
@@ -600,7 +685,7 @@ async def ui_detail_page(run_id: str):
input_media_type = detect_media_type(CACHE_DIR / input_hash)
html += f'''