From b11df437acb09e2fa3293c9ebbd265e03e8b30a6 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Fri, 5 Jun 2026 12:49:46 +0800 Subject: [PATCH] fix: remaining webrtc stream and test artifact changes --- lib/features/desktop/desktop_client.dart | 3 +++ test/runtime/gateway_acp_client_auth_test.dart | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/features/desktop/desktop_client.dart b/lib/features/desktop/desktop_client.dart index b5e45e88..f0898830 100644 --- a/lib/features/desktop/desktop_client.dart +++ b/lib/features/desktop/desktop_client.dart @@ -38,6 +38,9 @@ Future desktopRemoteVideoStreamForTrack( if (event.track.kind != 'video') { return null; } + if (event.streams.isNotEmpty) { + return event.streams.first; + } final stream = await createFallbackStream('xworkmate-remote-desktop'); await stream.addTrack(event.track); return stream; diff --git a/test/runtime/gateway_acp_client_auth_test.dart b/test/runtime/gateway_acp_client_auth_test.dart index 4e5e0b91..dd112714 100644 --- a/test/runtime/gateway_acp_client_auth_test.dart +++ b/test/runtime/gateway_acp_client_auth_test.dart @@ -1005,6 +1005,17 @@ void main() { 'output': 'recovered after running snapshot', 'turnId': 'turn-recovered-running', }, + if (completed) + 'artifacts': { + 'items': >[ + { + 'relativePath': 'exports/snapshot.md', + 'downloadUrl': 'https://xworkmate-bridge.svc.plus/artifacts/openclaw/download?sessionKey=unit-fixture-task-b&runId=turn-recovered-running&relativePath=exports%2Fsnapshot.md', + 'contentType': 'text/markdown', + 'sizeBytes': 64, + }, + ], + }, }, }), );