You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
v1.3.1: Fix prompt text typed twice after a server restart (#12)
MarcoServer.start() subscribed to the websocket service's message and
client-connection streams on every start without cancelling the
previous subscription (the broadcast controllers outlive a stop), so
each restart added another handler: one press then typed the prompt
text twice, ran commands twice and flipped toggles straight back.
Subscriptions are now stored, cancelled in stop(), and defensively
re-created per start. Covered by an end-to-end regression test that
boots a real MarcoServer, restarts it, presses a prompt button over a
raw WebSocket and asserts exactly one commandResult arrives (verified
red without the fix: two results).
Version 1.3.1+3.
Co-authored-by: Claude <noreply@anthropic.com>