Show consent pending state in browser during RDP approval

- Agent sends rdp_consent_pending after spawning consent dialog
- Browser shows 'Warte auf Zustimmung...' with yellow indicator
- First frame switches to 'connected', denial shows red error message
- Fixed stale closure bug in onmessage with connectedRef

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 10:25:37 +02:00
parent d42dc562a3
commit 383bbff7a6
2 changed files with 25 additions and 8 deletions

View File

@@ -98,6 +98,11 @@ public class RtcService
return;
}
// Browser informieren dass auf User-Zustimmung gewartet wird
var pending = Encoding.UTF8.GetBytes("{\"type\":\"rdp_consent_pending\"}");
if (ws.State == WebSocketState.Open)
await ws.SendAsync(new ArraySegment<byte>(pending), WebSocketMessageType.Text, true, CancellationToken.None);
bool accepted = false;
try
{