terminal: build the ws URL like the app's own downlinks; show the attempted URL on failure

The served bundle's wsUrl is provably correct, yet one report showed
ws://host/ws//host/sidebar/ws/terminal (a /ws/ prefix no version ever
emitted). Mirror the app's own downlink construction (new URL(path,
location.origin) + protocol swap — the construction the chat's working
event streams use), and surface the exact attempted URL in the failure
banner plus a console.error, so a recurrence identifies the source
(stale page vs environment rewrite) immediately.
This commit is contained in:
Menghuan1918
2026-08-08 15:23:01 +08:00
parent 97e1f60e47
commit e80c1f6625
2 changed files with 22 additions and 3 deletions
+9
View File
@@ -662,6 +662,7 @@
flex: none;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
padding: 3px 10px;
font: var(--dsw-font-xxxs-11);
@@ -669,6 +670,14 @@
background: var(--dsw-alias-state-warn-tertiary);
}
/* The attempted ws URL, shown when the connection failed (diagnosis). */
.terminalBannerUrl {
flex-basis: 100%;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
word-break: break-all;
opacity: 0.85;
}
.boundaryError {
position: fixed;
right: 0;