The formatting of cells (colors and SGR attributes) is now interned per
screen in a StyleTable and cells store a 17 bit index into it in the
previously unused bits of CPUCell. Render data (sprite and mark) is kept
in a separate RenderCell array for screen lines and in a small render
cache for history lines being displayed, so the scrollback stores only
CPUCells, 12 bytes per cell instead of 32. GPUCell is now only the upload
format, built from the CPUCell, its style and its RenderCell.
When the table fills up, it is compacted at the start of drawing text,
reducing the color precision of cells in the scrollback if needed, cells
on screen always keep their exact styles. The map from styles to indices
is a verstable set of indices with a small cache of recent styles in
front of it.
benchmark.py throughput: ascii +48%, unicode +29%, csi +10%, truecolor
text -22%, truecolor half blocks -9%.
The child was reaped by the first waitpid() but since WIFEXITED was false the
loop continued and the next waitpid() raised ChildProcessError, hiding the
actual reason for the failure. Now report the signal and screen contents.
Implement revision 0.4 of the Program Status Protocol, which lets a
program report whether it is idle, working, done, blocked on the user
or failed, and why.
- Parse and validate reports per the spec: limits, base64 text without
control characters, malformed ids discard the report instead of
falling back to the root record, unknown states are ignored
- Keep up to 256 records per window (LRU eviction), with clear removing
a record and its descendants and app inherited from ancestors
- Reply to the feature detection query with supported states and kinds
- Lifetime: working/blocked/idle records are dropped at a new shell
prompt (OSC 133;A), done/error are dropped when the window gets focus,
a full reset (RIS) removes every record
- Expose records via tab.program_status in tab_title_template, the
output of kitten @ ls and a new on_program_status_change watcher
Spec: https://www.superlogical.com/rex/docs/build/program-status
Ref: ghostty-org/ghostty#14560, ghostty-org/ghostty#14630
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both axes of a scroll event are dispatched, so a diagonal gesture can fire
both, and the event is consumed if either axis is mapped. An unmapped event
continues a mapped gesture only if it scrolls along axes without any mappings.
- Only call into Python for scroll events when the wheel is mapped for the
current modifiers and mode, using a bitmap of wheel mappings built in
set_options(), and only when a step completes
- Do not swallow the momentum of an unmapped gesture that follows a mapped one
- Do not carry a partial step over to a different window or modifiers or
across unmapped scrolling
- Count wheel steps without relying on the mouse tracking mode semantics of
scale_scroll()
- Return the result of the mapped actions from on_mouse_event()
- Ignore mouse_selection for the wheel, it would never be released
- Add integration tests for scrolling with wheel mappings