Skip to content

terminal: a click made while an arrow key is still queued is written as raw bytes #667

Closed

Description

@devswha

Found by the whole-release Codex (gpt-6.1-sol, xhigh) review of v0.4.3 (#664); not a release blocker. Inferred from code, not reproduced live.

server/index.ts around line 2152: since #634, plain arrows go through the pane's key queue (pane.send_keys) and a click is replayed as a mouse-report input frame. While an arrow RPC is still pending, that mouse report takes the queued pane.send_text path, which writes the literal bytes instead of going through the attach input. Holding an arrow against a slow herdr and clicking can then put ESC[<…M/m into a program that never enabled mouse reporting, or deliver the wrong encoding to a TUI.

Possible fix: keep queued mouse reports on the attach input path, with the captured attachment/claim checks and the ordering bookkeeping. Test: a click while a key is pending (the current click checks run after the arrow queue drains). Related: #621, #634.

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