fix: honest SGR-Pixels (DECSET 1016) into nested child PTYs - #1
Draft
SLatz18 wants to merge 7 commits into
Draft
Conversation
Host 1016 now follows the focused child's encoding instead of kitty graphics demand, so ordinary nested TUIs get pane-local pixels. Cell input while 1016 is SET is promoted using TIOCGWINSZ cell size. pixel_mouse stays independent of is_remote_client_process / file-frame. refs herdrdev#3074 Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
Host SGR 1016 no longer consults pane graphics layers, so active_for_pane is unused and trips -D warnings. Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
Client-shell mapping uses real host chrome geometry. Headless pane input returns false when it does not request a re-render; assert the encoded PTY bytes instead. Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
refs herdrdev#3074 Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
Bubble Tea re-sends DECSET 1006 after the child enables 1016. Ghostty's mouse_format flag then becomes SGR while mode 1016 stays SET, so the encoder converted pane-local pixels back to cell indices. Nested TUIs interpreted those cells as pixels and collapsed to column 1. refs herdrdev#3074 Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
Ghostty's ws_xpixel includes window padding, so index * extent / cols stretches the modeled pitch (~10.048 vs 10). Forwarded pixels slip left, worse across the line. Prefer CSI 16 t cell size and map with index * cell, treating leftover as a fixed inset. refs herdrdev#3074 Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
Keep honest child-PTY 1016, encode-as-pixels after a later 1006h, and true cell pitch (ioctl leftover is a fixed inset). Drop HostAxis, handshake wrappers, debug traces, and duplicate ClientShell/headless tests. refs herdrdev#3074 Co-authored-by: Scott Latz <SLatz18@users.noreply.github.com>
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.
Honest SGR-Pixels (DECSET 1016) into ordinary nested child PTYs.
Behavior is unchanged. This revision only shrinks the PR surface for upstreamability.
Kept
1006h(the Col-1 collapse).ws_xpixel − cols × cell) off the extent soindex * extent / colsisindex * cell. Prefer CSI 16 t when it fits. Ghostty SGR-Pixels is already terminal-space.Deleted vs earlier revisions
HostAxis/ parallel boundary APIs /cell_origin_pixel— mapping snaps padding inHostGeometry::newinsteadadvertised_pixel_mouse,pixel_geometry_collection_enabled) — inlined the one ioctl-collection change; hellopixel_mouseis back toexact_cell_size && cfg!(unix)Issues
Tests kept
\x1b[<0;41;1M/ motion\x1b[<35;41;121M, not cell 51006hthen1016hthen1006hstill encodes pixelscargo fmt,clippy -D warnings, focused nextest (21) green.Size
Out of scope
herdrdev#3480, plugins, markedit2d, ME2D_PX_CAL.
Do not merge. Fork PR because this account is not a herdrdev maintainer / approved contributor.