fix: harden terminal probes across platforms - #311
Merged
Conversation
subinium
force-pushed
the
feature/terminal-compatibility
branch
from
July 31, 2026 06:23
46de038 to
32e6c72
Compare
subinium
force-pushed
the
feature/terminal-compatibility
branch
from
July 31, 2026 06:30
32e6c72 to
3e1468c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TERM=dumb, and tmux/screen unless explicitly forcedSLT_FORCE_TERMINAL_QUERIESandSLT_DISABLE_TERMINAL_QUERIESoverridesrun_staticsignature regression test compile-only so it never opens a live terminal under a PTY test runnerWhy
A real-PTY run exposed two compatibility hazards: a compile-signature test could emit terminal query sequences, and a silent or generic PTY host could leave the reply pump racing the first byte of user input. Automatic probing now requires a direct-terminal identity, while environment fallbacks remain available without terminal I/O.
The first Windows CI run exposed a separate cleanup bug: crossterm 0.28 reports Kitty keyboard commands as unsupported through its legacy Windows API. The next run exposed that mouse cleanup can also report
Initial console modes not setwhen panic cleanup has no initialized session. Either error previously returned before focus, bracketed paste, cursor, and alternate-screen cleanup ran. SLT now writes the standard Kitty ANSI protocol bytes directly and treats optional console-mode teardown as best-effort while preserving core restoration.Validation
cargo fmt -- --checkcargo check --all-featurescargo clippy --all-features -- -D warningscargo test --all-features(847 core unit tests plus integration and doctests)cargo check --examples --all-featurestyposcargo check -p superlighttui --no-default-featurescargo check -p slt-wasm --target wasm32-unknown-unknowncargo hack check -p superlighttui --each-feature --no-dev-deps(29 combinations)cargo audit(1,174 advisories loaded, no vulnerabilities)cargo deny checkcargo check -p superlighttui --features full,pty-test --target x86_64-pc-windows-gnuTERM=dumband an unidentified genericxterm-256colorhost; no query/control bytes were emittedRelease note
This is an Unreleased post-v0.22.3 hardening change. It does not retag or mutate the published v0.22.3 artifact.