Summary
Dynamic overlay width based on image columns caused Kitty image sequences to be truncated by overlay compositing. Result: overlay clears the background rectangle but the game image is not visible.
Findings
- Overlay compositing in pi-tui truncates each overlay line to
overlay width.
- Kitty image line contains raw
ESC_G...ESC\\ sequence.
visibleWidth() does not treat ESC_G as zero-width, so the compositor slices the escape sequence mid-stream.
- Kitty ignores the truncated sequence → cleared overlay region with no image.
- Previously the overlay width was
90%, which was wide enough to keep the full ESC_G sequence, so the image rendered (but occluded background).
Steps
- Use image renderer in Kitty.
- Set overlay width to the exact image columns.
- Overlay clears background, image disappears.
Short-term fallback
- Keep overlay width at 90% (restores image but keeps occlusion).
Proper fix (upstream)
- In pi-tui: treat
ESC_G...ESC\\ as zero-width in visibleWidth()/extractAnsiCode() or skip truncation for image lines.
Summary
Dynamic overlay width based on image columns caused Kitty image sequences to be truncated by overlay compositing. Result: overlay clears the background rectangle but the game image is not visible.
Findings
overlay width.ESC_G...ESC\\sequence.visibleWidth()does not treatESC_Gas zero-width, so the compositor slices the escape sequence mid-stream.90%, which was wide enough to keep the fullESC_Gsequence, so the image rendered (but occluded background).Steps
Short-term fallback
Proper fix (upstream)
ESC_G...ESC\\as zero-width invisibleWidth()/extractAnsiCode()or skip truncation for image lines.