Skip to content

bugfix kitty keyboard protocol detection#348

Merged
jquast merged 1 commit intomasterfrom
jq/bugfix-kitty-keyboard
Feb 1, 2026
Merged

bugfix kitty keyboard protocol detection#348
jquast merged 1 commit intomasterfrom
jq/bugfix-kitty-keyboard

Conversation

@jquast
Copy link
Copy Markdown
Owner

@jquast jquast commented Jan 31, 2026

The boundary pattern in get_kitty_keyboard_state() used .+ which matched prematurely!

Existing tests didn't catch this because they use ungetch() which buffers the entire response

The reported codspeed performance adjustment is real, ~20% less for emojis and CJK, for recent fixes in wcwidth release for "standalone" emoji variators and complex Brahmic scripts (Sanskrit etc)

jquast/wcwidth#200
jquast/wcwidth#202

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 31, 2026

CodSpeed Performance Report

Merging this PR will degrade performance by 21.24%

Comparing jq/bugfix-kitty-keyboard (75e094d) with master (77d93b5)

Summary

❌ 8 regressed benchmarks
✅ 20 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_center_emoji_zwj 171.8 µs 212.1 µs -19.01%
test_length_cjk 632.3 µs 753.1 µs -16.05%
test_rjust_cjk 639.3 µs 759.3 µs -15.8%
test_center_cjk 641.6 µs 761.2 µs -15.71%
test_ljust_cjk 640.3 µs 760.1 µs -15.75%
test_ljust_emoji_zwj 168.6 µs 208.7 µs -19.22%
test_rjust_emoji_zwj 169.2 µs 209.4 µs -19.2%
test_length_emoji_zwj 155.5 µs 197.5 µs -21.24%

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.42%. Comparing base (77d93b5) to head (75e094d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #348      +/-   ##
==========================================
- Coverage   98.42%   98.42%   -0.01%     
==========================================
  Files          11       11              
  Lines        2607     2601       -6     
  Branches      460      459       -1     
==========================================
- Hits         2566     2560       -6     
  Misses         31       31              
  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.

The boundary pattern in ``get_kitty_keyboard_state()`` used ``.+`` which matched prematurely!

Existing tests didn't catch this because they use ungetch() which buffers the entire response
@jquast jquast force-pushed the jq/bugfix-kitty-keyboard branch from 36541d3 to 75e094d Compare January 31, 2026 19:09
@jquast jquast marked this pull request as ready for review January 31, 2026 19:12
@jquast jquast merged commit 990c181 into master Feb 1, 2026
15 of 16 checks passed
@jquast jquast deleted the jq/bugfix-kitty-keyboard branch February 1, 2026 15:25
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