chore: upgrade libghostty and preserve terminal behavior - #3906
Conversation
|
Important Review skippedToo many files! This PR contains 613 files, which is 313 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (38)
📒 Files selected for processing (613)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
Too many files changed for review (651 files, 500 file limit). |
|
|
03f1a30 to
e7a2871
Compare
|
@coderabbitai review |
|
|
Merge upstream/master 90e947a..c7a7cc4. One conflict (justfile maintenance-test line) resolved as a union: fork keeps test_fork_changelog_check, upstream adds test_windows_cross. Notable upstream fixes absorbed: - libghostty-vt upgrade + terminal snapshot consistency while scrolling (herdrdev#3906, herdrdev#3928) - conditional sidebar token hiding (herdrdev#3925) - route cli commands to saved ssh machines (herdrdev#3918) - detect cline launchers and idle states (herdrdev#3959) - recognize claude unicode spinner during active turns (herdrdev#3953) - flush windows codex paste burst before prompt submit (herdrdev#3961) - lint all targets on windows (herdrdev#3963) - preserve local direct kitty graphics transport (herdrdev#3957) - preserve plugin registry symlinks (herdrdev#3927) - explain zig version requirement on build failure (herdrdev#3931) New build prerequisite: zig 0.16.0 (see FORK-CHANGELOG gotchas).
Summary
Upgrade vendored libghostty-vt from
c5a21edfto44f2a44dand Zig from 0.15.2 to 0.16.0, preserving Herdr's terminal, input, clipboard and replay behavior.Local patches remaining
0002: authoritative modifyOtherKeys scalar query, rebased away from an upstream enum collision.0004: forward the Windows libc configuration to Wuffs translation and restrict allocator stubs to freestanding targets. The hosted stubs otherwise override Rust's allocator and abort non-SIMD Linux builds.The patch index records verification and removal conditions. Snapshot persistence, clipboard reads and animation scheduling are deliberately not adopted here. Keyboard encoding fallbacks remain: native comparisons still showed behavior differences.
Validation
just checkafter rebasing onto master90e947a6: 3,333 Rust tests passed, plus maintenance/architecture/assets/docs checks and Windows cross-lint using Zig 0.16.0 with an actual MSVC SDK.e7a2871c, including the dirty-row follow-up, passed CI on Linux (including scalar ReleaseSafe), macOS and Windows, plus Nix flake build/all-system evaluation and Windows ConPTY packaging.Performance
No blanket speedup claim. Matched release builds at the same pre-migration Herdr base (
ffa0892e), with only the migration differing:100% means one logical CPU. Two alternating rounds, 5-second warmup and 15-second samples; all replayed final client grids matched, with equivalent input traffic. A separate two-round 60-second Linux comparison measured hidden output +3.4% and visible output -1.3%.
Windows resize correctness has a cost: 15 populated panes took 9.595ms before versus 13.769ms after in the release benchmark. Removing the preflush is faster but demonstrably loses pending repaint history, so this retains the correct behavior.
Dirty-row follow-up
The same-PR follow-up was compared against initial PR head
03f1a304, using the same compiler and vendor. Focused sparse collection at 80×24 improved from 6.514µs to 6.204µs for one pane and 97.627µs to 95.041µs for 15 panes. Idle timings were tiny and mixed; no app-wide speedup is promised.A separate 4m29s, two-round real-client comparison measured total CPU 0.67%→0.70% for Pi/one client, 1.60%→1.47% for Pi/three clients, and 2.47%→2.40% for 15 active panes. All 16 final replayed client grids matched, with identical input traffic. Sparse/clipped-row and fallback regressions passed against both the old and new collector; the incremental/full-render oracle also covers non-contiguous edits and palette changes.
Hosted review limits
Both hosted review bots were triggered but refused this vendor-sized PR: Greptile reports 651 files against its 500-file limit; CodeRabbit reports 613 reviewable files against its 300-file limit. These are not completed reviews or approvals. Local migration reviews are documented above; CI still applies normally.
Build note
Developers keeping Zig 0.15.2 as their default can select 0.16.0 per command with
ZIG=/path/to/zig-0.16.0/zig. No default PATH change is required.