Root cause: teardown is a hand-maintained roll-call, not a registry
MudClient.cleanupConnection (src/client.ts:261-282) resets ~13 stores and services by hand, one line each. Any stateful feature that forgets to add itself keeps state across a disconnect it should not, and any teardown that forgets to stop something leaks it.
Instances already filed
Other observed gaps (not yet separately filed)
- Server-pushed
Client.Keystrokes bindings are not cleared on disconnect (only on full shutdown), so a prior session's bindings survive into the next connection.
Suggested direction
A resetOnDisconnect registry that stores/services opt into, iterated on cleanup, so adding a feature can't silently omit its own reset.
Root cause: teardown is a hand-maintained roll-call, not a registry
MudClient.cleanupConnection(src/client.ts:261-282) resets ~13 stores and services by hand, one line each. Any stateful feature that forgets to add itself keeps state across a disconnect it should not, and any teardown that forgets to stop something leaks it.Instances already filed
close()leaveslocalMode/localStreamarmedMediaService.shutdown()never stops playing soundsOther observed gaps (not yet separately filed)
Client.Keystrokesbindings are not cleared on disconnect (only on fullshutdown), so a prior session's bindings survive into the next connection.Suggested direction
A
resetOnDisconnectregistry that stores/services opt into, iterated on cleanup, so adding a feature can't silently omit its own reset.