Skip to content

Typing and keys queued behind a message are still sent after their connection closed #233

Closed

Description

@devswha

What happens

Typing (input) and key presses (keys) that arrive while a composer message is in flight wait their turn in the pane's queue. If the connection that sent them closes while they wait, they are still sent to the pane afterwards.

The rule elsewhere in the app is that nothing typed outlives its connection: keystrokes typed offline go to a draft, never to the pane. A Stop or an Enter from a phone that has already dropped off can land seconds later, after the message, with nobody watching.

submit is different on purpose: a message sent just before the phone locks is finished by the server.

Where

server/index.ts, the WebSocket input handler (the paneQueues.has(...) branch) and the keys handler: the queued task checks the held state and authorizeSocket (revocation and role), not whether the client is still connected. The path for a PC without terminal attach already checks this (#227).

Reproduce

On an attached pane send submit, then input (ESC) and keys (Enter), then close the socket. The pane receives the message, then the ESC and the Enter.

Activity

  1. added a commit that references this issue on Oct 1, 2026
    bf9fc63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions