fix(webcrt): keep session across WS remount and fix blank terminal

Allow brief WebSocket re-attach after React StrictMode cleanup, ensure terminal pane has layout height, and show connect status in xterm.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-07-29 17:32:23 +08:00
parent 873f2bfe34
commit 183cb7eec9
5 changed files with 95 additions and 21 deletions

View file

@ -350,6 +350,7 @@ export function WebcrtPage() {
{tab.wsUrl ? (
<WebTerminal
wsUrl={tab.wsUrl}
title={tab.target.ip_address || tab.target.name}
onStatus={(state) => {
if (state === "open" || state === "connected") updateTab(tab.key, { status: "connected" });
else if (state === "error") updateTab(tab.key, { status: "error" });