Skip to content

test(tui): exercise fragmented SGR mouse input through PTY - #461

Merged
gaobrian merged 5 commits into
mainfrom
test/tui-fragmented-sgr-pty-regression
Dec 1, 2026
Merged

gaobrian merged 5 commits into
mainfrom
test/tui-fragmented-sgr-pty-regression

Conversation

@gaobrian

@gaobrian gaobrian commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend the existing Unix PTY release gate to exercise the real BSH TUI process with SGR wheel reports fragmented at every byte boundary.

The test:

  • boots the real Runtime Host and bsh tui on a PTY;
  • injects SGR wheel-up and wheel-down reports split at every possible byte boundary;
  • checks that each continuation tail is absent from terminal output (so protocol bytes cannot become visible composer text);
  • sends a standalone Escape after the fragmented reports;
  • retains the existing Ctrl-D exit and Host-survival assertions.

This tests the actual Crossterm event reader used by Terminal::next_key, rather than a mocked Key queue. It covers the BSH integration boundary that the dependency-level fix alone did not validate.

Scope and limits

  • No runtime behavior or GUI/Host contract is changed.
  • This does not emulate the physical timing of a Ghostty trackpad gesture; manual two-finger acceptance remains required.
  • The test deliberately uses short inter-fragment gaps to exercise short reads at each split point without asserting an unsupported interpretation of the 20 ms standalone-Escape deadline.

Validation

  • macOS PTY gate passes with all fragmented SGR cases.
  • Linux PTY gate passes with all fragmented SGR cases.
  • Windows compile/TUI tests remain green (the PTY script is Unix-only).

@gaobrian
gaobrian merged commit 052b16e into main Dec 1, 2026
6 checks passed
@gaobrian
gaobrian deleted the test/tui-fragmented-sgr-pty-regression branch December 1, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant