charmbracelet / charmbracelet/x
Kitty graphics protocol options serialization drops negative z-index
- Dominant language
- Go
- Stars
- 314
- Forks
- 94
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 2
Description
### Description
The Kitty graphics protocol supports negative z-indexes, with anything between -1 and INT32_MIN/2 (inclusive) meaning "under the text", and anything below INT32_MIN/2 meaning "also under cells with non-default background colors". That's in what is currently the fourth paragraph of the ["Controlling displayed image layout"](https://sw.kovidgoyal.net/kitty/graphics-protocol/#controlling-displayed-image-layout) section of the graphics protocol spec.
The serialization code for kitty.Options however ignores any non-positive z-index. This means that code that should produce an interface that looks like
instead produces
### Version
v0.11.7 and master
### Environment
ghostty and kitty and iterm2
Contributor guide
Research direction
Start by locating the kitty.Options serialization code and compare its z-index handling with the negative ranges described in the linked graphics protocol specification. Add regression coverage for negative z-index values and verify that serialization preserves all supported values without changing positive z-index behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100