Summary
MudClient.close() tears down the socket/stream but never clears localMode or localStream, so in WASM/local mode subsequent send() calls route into the dead stream and are silently swallowed while the user's command still echoes to the output pane.
Details
src/client.ts:284-301 closes the stream but leaves localMode/localStream set. send() (lines 248-255) then still takes the local branch:
public send(data: string) {
if (this.localMode && this.localStream) {
this.localStream.write(Buffer.from(data));
} else {
this.ws.send(data);
}
}
sendCommand (line 303) has already added the command to the output store via addCommand when local echo is on, so the user sees their command and nothing is actually sent. On the WebSocket path the same silent-drop happens because send() on a CLOSED socket is a no-op.
Fix direction
Clear localMode/localStream in close()/cleanupConnection, and have send() surface an error (or refuse and notify) when there is no live transport instead of dropping silently.
Verification
Read src/client.ts end to end.
Summary
MudClient.close()tears down the socket/stream but never clearslocalModeorlocalStream, so in WASM/local mode subsequentsend()calls route into the dead stream and are silently swallowed while the user's command still echoes to the output pane.Details
src/client.ts:284-301closes the stream but leaveslocalMode/localStreamset.send()(lines 248-255) then still takes the local branch:sendCommand(line 303) has already added the command to the output store viaaddCommandwhen local echo is on, so the user sees their command and nothing is actually sent. On the WebSocket path the same silent-drop happens becausesend()on a CLOSED socket is a no-op.Fix direction
Clear
localMode/localStreaminclose()/cleanupConnection, and havesend()surface an error (or refuse and notify) when there is no live transport instead of dropping silently.Verification
Read
src/client.tsend to end.