Skip to content

Conversation

@jquast
Copy link
Owner

@jquast jquast commented Oct 20, 2025

This branch builds on and compares to #313 (as "base branch"), to benefit from the common "Inquiry Guardrail" of #312 for our test behavior but also to make the merges linear instead of branching, we just add to the most recent "tail" feature.

This implement support for XTVERSION Query as method get_software_version(timeout=1) returning SoftwareVersion object instance with fields .name and .version, run bin/display-version.py,

Checking software version (XTVERSION) ...
Terminal: Konsole, version 23.08.5

@jquast jquast changed the base branch from master to jq/sixel-height-and-width October 20, 2025 12:58
@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.28%. Comparing base (daa9a3c) to head (f3e77e7).
⚠️ Report is 1 commits behind head on jq/sixel-height-and-width.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           jq/sixel-height-and-width     #314      +/-   ##
=============================================================
+ Coverage                      98.24%   98.28%   +0.04%     
=============================================================
  Files                             11       11              
  Lines                           2389     2453      +64     
  Branches                         409      420      +11     
=============================================================
+ Hits                            2347     2411      +64     
  Misses                            32       32              
  Partials                          10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast jquast force-pushed the jq/xtversion-identification branch from 74b4a9c to 4aba172 Compare October 20, 2025 14:08
@jquast jquast marked this pull request as ready for review October 20, 2025 14:19
This branch builds on and compares to #312 (as "base branch") which is required for some common code.

Suggest a new way to detect resize, according to this Specification, https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83 detected by DEC Private mode 2048, with 'EVENT_RESIZE' keystroke name returned by inkey.

This is a bit new and not popularly supported, but it is a good solution to the protocol and system-independent support for window resize events. For example, this would work over serial where no existing protocols would.
This branch builds on and compares to #313 (as "base branch"), to benefit from the common "Inquiry Guardrail" of #312 for our test behavior but also to make the merges linear instead of branching, we just add to the most recent "tail" feature.

This implement support for XTVERSION Query as method `get_software_version(timeout=1)` returning SoftwareVersion object instance with fields ``.name`` and ``.version``, run bin/display-version.py,
```
Checking software version (XTVERSION) ...
Terminal: Konsole, version 23.08.5
```
@jquast jquast force-pushed the jq/sixel-height-and-width branch from 2ba08f7 to 102f32c Compare October 20, 2025 18:29
This cleans up/simplifies tests after removing unused 'from_string'
method.
The inquiry guardrail in _query_response() was incorrectly checking both does_styling and is_a_tty. Terminal inquiries should work regardless of styling preferences to allow keyboard features, bracketed paste, and window dimension queries even when styling is disabled. Updated method implementation and documentation throughout.
@jquast jquast force-pushed the jq/xtversion-identification branch from 280af3e to a9b7da1 Compare October 20, 2025 19:12
@jquast
Copy link
Owner Author

jquast commented Nov 2, 2025

I might consider a follow-up that uses the very legacy ^E raw control character, that a surprisingly large, like 25% of the ones tested respond to instead of XTVERSION. This fallback code is in ucs-detect. I found only one instance, ExtratermQT, replied with some strange escape characters that need more sanitization, this is the reason "PuTTY" gets displayed when you cat /dev/urandom or something, because ^E. CLASSIC.

In any case, ucs-detect exercised this code, aproximately 40% or so answered. I really should have tracked which terminals support XTVERSION vs ^E vs. what I keyed in manually, maybe next time.

@jquast jquast merged commit 6346c1b into jq/sixel-height-and-width Nov 2, 2025
23 checks passed
@jquast jquast deleted the jq/xtversion-identification branch November 2, 2025 23:57
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.

2 participants