Commit Graph
2 Commits
Author SHA1 Message Date
Brennan BensonandNeil fc7f372ccb fix(terminal): preserve startup query reply order
Answer cooked-mode terminal queries in the originating turn when the native PTY can prove echo is quiet, and hold later query-only replies behind deferred replies on upstream SSH relays. Keep renderer replies atomic and bound both renderer and host-side queues with local, daemon, relay, native, and Docker SSH fish regression coverage.

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-08-14 14:26:02 -07:00
Jinjing c0c893d171 fix(pty): bound cooked reply queue (#13422)
* fix(pty): bound cooked reply queue

* fix(pty): bound cooked reply queue

Implement bounded storage for cooked-echo-safe replies: 64 pending
replies and 4096 UTF-16 code units. Shed oldest replies on overflow,
never ordinary input. Add drain failure containment with generation
fencing to prevent stale operations from clearing fresh input after
clear() reuse.

* fix(pty): report pty id in drain failures

When the async drain yields, the owner may rebind to a different PTY
before the failure surfaces. Pass the failing pty id so the transport can
ignore stale failures from a rebound owner. Also tighten the pending
reply queue size bound to prevent half-written entries.
2026-08-10 12:17:21 -07:00