Fix WebCRT terminal not mounting when only sessionId is set.

Reconnect and tab restore clear wsUrl; the pane still gated on wsUrl so Telnet stayed on authenticating with an empty terminal. Mount/render from sessionId instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-02 19:14:30 +08:00
parent c92879daf3
commit fb3da4dfc7

View file

@ -2282,13 +2282,13 @@ export function WebcrtPage() {
className="webcrt-main__pane"
hidden={!isActive}
>
{tab.status === "connecting" && !tab.wsUrl ? (
{tab.status === "connecting" && !tab.sessionId ? (
<div className="webcrt-main__placeholder">
<div>{connectPhaseLabel(tab.connectPhase, t)}…</div>
<p className="panel__hint">{t("webcrt.phase.hint")}</p>
</div>
) : null}
{tab.status === "error" && !tab.wsUrl ? (
{tab.status === "error" && !tab.sessionId ? (
<div className="webcrt-main__placeholder webcrt-main__placeholder--error">
<div>{t("webcrt.status.error")}</div>
{tab.errorMessage ? <pre className="webcrt-error-detail">{tab.errorMessage}</pre> : null}
@ -2297,7 +2297,7 @@ export function WebcrtPage() {
</button>
</div>
) : null}
{tab.wsUrl ? (
{tab.sessionId ? (
<>
{tab.status === "connecting" ? (
<div className="webcrt-connect-banner" role="status">