Files
Nexus/docs/reports/2026-06-10-rdp-browser-e2e-verification.md
2026-07-08 22:31:31 +08:00

34 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RDP 浏览器 E2E 验收 — 2026-06-10
## 结论
**通过** — 生产环境 Playwright 在约 **7.7s** 内完成 `host_id=1` 连接,出现「已连接」与 1024×768 画布。
## 根因
`useRdpSession.ts` 使用 `Guacamole.Client.STATE_CONNECTED`(运行时 **undefined**),`onstatechange` 从未将 UI 设为 `connected`
WS 层与 guacd 实际正常(sync 已到达浏览器)。
## 修复
- 改用 `Guacamole.Client.State.CONNECTED` / `Tunnel.State.OPEN`
- `RdpPage``mounted` 守卫 + 避免重复 connect
- `useRdpSession`connect 序号防竞态
## 验证命令
```bash
# 生产 mint JWT 后
NEXUS_E2E_ACCESS_TOKEN=<jwt> npx playwright test e2e/pages/rdp-connect.spec.mjs
```
## 用户终验
1. 强刷 `Ctrl+Shift+R`(入口 bundle`index-DWNCTCE6.js`
2. 3389远程 → azurewin11 → 应数秒内显示桌面
## 探针(可选)
- `scripts/guacd_rdp_probe.py` — 直连 guacd,约 11 条指令内收到 sync
- `scripts/rdp_ws_sync_check.py` — 经 WS 第 4 帧收到 `4.sync,...`