fix(pi-tui): prefer iTerm2 inline images over kitty on WezTerm - #2539
Open
nothankyouzzz wants to merge 2 commits into
Open
fix(pi-tui): prefer iTerm2 inline images over kitty on WezTerm#2539nothankyouzzz wants to merge 2 commits into
nothankyouzzz wants to merge 2 commits into
Conversation
WezTerm's cell-anchored kitty placement loses image content wherever text rows are (re)written over it; a scrolling transcript constantly rewrites rows, so pasted screenshots degrade to a one-row sliver (wezterm#986). Its iTerm2 inline images are line-attached and scroll with the buffer, surviving the diff-render redraw model. Detect WezTerm as images: "iterm2" and register the fork divergence in AGENTS.md.
🦋 Changeset detectedLatest commit: 93a1c2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93a1c2b31c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Related Issue
Resolve #2538
Problem
See linked issue. On WezTerm, inline images in the transcript (e.g. pasted image thumbnails) degrade to a one-row sliver: the vendored pi-tui emits a one-shot, cell-anchored kitty placement, and WezTerm drops image content wherever transcript redraws rewrite text rows over it (wezterm#986).
What changed
detectCapabilities()inpackages/pi-tuinow reports the iTerm2 inline-image protocol for WezTerm instead of kitty. iTerm2 images are attached to the emitting line and scroll with the buffer, so they survive the transcript's redraw model.Why this approach: current upstream
@earendil-works/pi-tui(0.83.0) solves the same class of problem with scroll-aware kitty cropping (cropKittyImageLine), but that machinery hangs off upstream's newlayout.tsrenderer, which the vendored snapshot does not have — backporting it would mean rewriting the renderer. Preferring iTerm2 on WezTerm is a one-branch change, uses a protocol WezTerm natively supports, and was verified end-to-end: thumbnails render fully and survive scrolling. The vendored fork keeps kitty for kitty/ghostty/warp, where cell-anchored placement works.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.