fix(host): preserve query-time cursor replies - #25
Merged
Conversation
This was referenced Sep 2, 2026
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.
Why
An application requesting
CSI 6 nunder--host opentuireceives no standalone cursor-position response, even though Ghostty has already generated the correct reply. The OpenTUI startup bundle instead injects three hardcoded home-position reports, including when no cursor query was sent.What Changes
Forward actual query-time cursor reports while retaining the OpenTUI host's other overrides.
CSI 6 nat row 3, column 7ESC[3;7RCSI 6 nat row 9, column 11ESC[9;11Ron completionESC[1;1RreportsGhostty remains responsible for VT parsing and cursor state, including hidden cursors and origin-relative coordinates. Preserve its callback boundaries, select complete ASCII-digit CPR records for OpenTUI, and seed the existing host response before appending its overrides. The combined response is sent once and returned unchanged for recording. Default hosting still concatenates all Ghostty replies in their original order.
Includes a patch Changeset for the existing fixed six-package release group; no versions are bumped.
Scope
This addresses cursor replies in the shared terminal response path. Related #16; this does not implement that PR's Windows session transport or ConPTY teardown work.
Verification
respond_to_outputseam fail before the fix and pass after it on the same Rust 1.95 toolchain.qbefore and after. Three received CPRs match three emitted queries and the recorded host CPRs. Non-CPR host bytes are identical between recordings; width, scaling, and pixel-mode capability values remain unchanged. No owned fixture processes remain.Additional
bun run --cwd packages/opentui release:checkpacks successfully but fails atnpm publish --dry-run --access publicbecause unchanged version1.1.0is already published:You cannot publish over the previously published versions: 1.1.0.No publish or version change was performed.