From 3d45efa90bd68b1c78535ee30ed39ec173ad233d Mon Sep 17 00:00:00 2001 From: gilesb Date: Sat, 10 Jan 2026 18:38:07 +0000 Subject: [PATCH] Link to activity instead of asset in "View on L2" After publishing, link to /activities/{activity_id} instead of /assets/{asset_name} so user sees the published run. Co-Authored-By: Claude Opus 4.5 --- server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index b6d9b8c..6787fd3 100644 --- a/server.py +++ b/server.py @@ -4064,10 +4064,14 @@ async def ui_publish_run(run_id: str, request: Request): l2_https = l2_server.replace("http://", "https://") asset_name = result["asset"]["name"] short_name = asset_name[:16] + "..." if len(asset_name) > 20 else asset_name + # Link to activity (the published run) rather than just the asset + activity = result.get("activity") + activity_id = activity.get("activity_id") if activity else None + l2_link = f"{l2_https}/activities/{activity_id}" if activity_id else f"{l2_https}/assets/{asset_name}" return HTMLResponse(f'''
Published to L2 as {short_name}! - View on L2 + View on L2
''') except http_requests.exceptions.HTTPError as e: